Latest web development tutorials

HTML attributes

Additional property information is provided by the HTML element.


HTML attributes

  • HTML element can setproperties
  • You can addadditional attribute informationelement
  • Property generally described inthe start tag
  • Always attribute name / value pairs in the form of, forexample: name = "value".

Examples of property

HTML links are defined by <a> label. The link address is specified in thehref attribute:

Examples

<A href = "http://www.w3big.com"> This is a link </ a>

try it"


HTML attributes commonly cited attribute value

Property value should always be included in quotation marks.

Double quotes are the most common, but there is no problem to use single quotes.

RemarkTip: In some rare cases, such as the attribute value itself contains double quotes, you must use single quotes, for example: name = 'John "ShotGun" Nelson'


HTML Tip: Use lowercase property

Attributes and attribute values ​​are not case sensitive.

However, the World Wide Web Consortium recommended lowercase attributes / attribute values ​​in their HTML 4 recommendation standard.

The new version of (X) HTML requires the use of lowercase property.


HTML Attributes Reference Manual

View the complete list of HTML attributes: HTML Tag Reference .

Listed below are suitable for most HTML element attributes:

Attributes description
class Html element to define one or more class names (classname) (class name is introduced from style file)
id The only element of the definition of id
style Predetermined elements inline style (inline style)
title It describes the additional information element (to use as a tool bar)

More criteria Property Description: the HTML standard attributes Reference manual .