AIzaSyCSBAtE3BpAxQTGlq481leTTYyd4sj4Om0 Standard Attributes List | HyperText Markup Language Resource Page | Learn About, Share and Discuss Standard Attributes List | HyperText Markup Language At Defaultlogic.com




Standard Attributes List
TODO

Editor's note
Please do not create any further subpages of this subpage. Keep this subpage flat, using section headings to structure the material.

Below is a list of all attributes which are available for most elements in HTML.

You can also view a list of HTML elements.

Attributes

class

This attribute allows you to designate an element to be a member of a given class. Multiple elements can be assigned to the same class (eg. <p class="foo"> ... </p> <p class="foo"> ... </p>), as well as a single element belonging to multiple classes (eg. <p class="foo bar"> ... </p>).

code

codebase

dir

With this attribute you can define which direction the text is written for a given element, either ltr for left-to-right or rtl for right-to-left.

height

Setting this attribute with a numerical value defines the height of an element in pixels (eg. <div height="150"> ... </div>)

id

This attribute allows you to define a unique identifier for each element. This would be useful for hyperlinks that link to a specific section of a page or when styling using a style sheet.

lang

With this attribute you can specify a language that is used for an element.

style

This attribute allows you to apply specific styling to a given element.

title

With this attribute you can define what will be displayed when a user hovers the element. It is not available for base, head, html, meta, param, script, style, and title.

width

Setting this attribute with a numerical value defines the width of an element in pixels (eg. <div width="230"> ... </div>)

More attributes

accesskey

The accesskey attribute defines a keyboard shortcut for a hyperlink or form element. The combination of keys need to activate the shortcut varies from browser to browser. In Microsoft Internet Explorer the user must press Alt+accesskey. If the shortcut is for a link the user must then press Enter to follow the link. The choice of Alt+accesskey means that access keys can clash with shortcuts built-in to the browser.

It is quite common to use numbers for the access keys since these don't clash with any major browser's built-in shortcuts, e. g.

  • 1 = Home Page
  • 0 = List of access keys on this website.
  <div id="navigation">
    <h2>Navigation</h2>
    <ul>
      <li><a accesskey="1" href="/">Home page</a></li>
      <li><a accesskey="2" href="/about">About</a></li>
      <li><a accesskey="0" href="/accesskeys">Access keys</a></li>
    </ul>
  </div>

There is no standard way to let users know the access keys that are available on the page. Some suggestions can be found in Accesskeys: Unlocking Hidden Navigation.

tabindex


  This article uses material from the Wikipedia page available here. It is released under the Creative Commons Attribution-Share-Alike License 3.0.

HyperText_Markup_Language/Standard_Attributes_List
 



 

Connect with defaultLogic
What We've Done
Led Digital Marketing Efforts of Top 500 e-Retailers.
Worked with Top Brands at Leading Agencies.
Successfully Managed Over $50 million in Digital Ad Spend.
Developed Strategies and Processes that Enabled Brands to Grow During an Economic Downturn.
Taught Advanced Internet Marketing Strategies at the graduate level.


Manage research, learning and skills at defaultLogic. Create an account using LinkedIn or facebook to manage and organize your Digital Marketing and Technology knowledge. defaultLogic works like a shopping cart for information -- helping you to save, discuss and share.

Visit defaultLogic's partner sites below:
PopFlock.com : Music Genres | Musicians | Musical Instruments | Music Industry
NCR Works : Retail Banking | Restaurant Industry | Retail Industry | Hospitality Industry

  Contact Us