Forex Trading

Tuesday, May 26, 2009

HTML Attributes

Attributes provide additional information about HTML elements.
HTML Attributes:
HTML elements can have attributes
Attributes provide additional information about the element
Attributes are always specified in the start tag
Attributes come in name/value pairs like: name="value"

Attribute Example



HTML links are defined with the <a> tag. The link address is provided
as an attribute:


<a href="http://learn-html-khan.blogspot.com">This is a link</a&gt

Always Quote Attribute Values


Attribute values should always be enclosed in quotes.


Double style quotes are the most common,
but single style quotes are also allowed.


In some rare situations, like when the attribute value itself contains
quotes, it is necessary to use single quotes:



name='John "ShotGun" Nelson'



HTML Tip: Use Lowercase Attributes


Attribute names and attribute values are case-insensitive.


However, the World Wide Web Consortium (W3C) recommends lowercase
attributes/attribute values in
their HTML 4 recommendation


Newer versions of (X)HTML will demand
lowercase attributes.


HTML Attributes Reference



A full list of legal attributes for each HTML element is listed in given link below:


Complete HTML Reference


Below is a list of some attributes that are standard for most HTML elements:





























AttributeValueDescription
classclass_rule or style_ruleThe class of the element
idid_nameA unique id for the element
stylestyle_definitionAn inline style definition
titletooltip_text A text to display in a tool tip

For more information about standard attributes a link is given below


HTML Standard Attributes Reference

No comments:

Post a Comment