HTML attribute


Release date:2024-02-02 Update date:2024-02-23 Editor:admin View counts:52

Label:

HTML attribute

The property is HTML element to provide additional information.

HTML attribute

  • HTML element can set properties

  • Attribute can add additional information to the element

  • Attributes are generally described in the opening tag

  • Attributes always appear in the form of name / value pairs, such as: name= “value”.

Attribute instance

HTML Links are made up of <a> label definition. The address of the link is href property to specify:

Example

<ahref="http://www.runoob.com">This is a link</a>

Common reference property values for HTML properties

Attribute values should always be enclosed in quotation marks.

Double quotes are the most commonly used, but there is no problem with usingsingle quotes.

Tip: in some individual cases, for example, the attribute value itself contains double quotes, then you must use single quotes, such as name=’John “ShotGun” Nelson’

HTML hint: use lowercase attributes

Properties and property values are not case-sensitive.

However, the World wide Web Consortium recommends lowercase attribute / attribute values in its HTML 4 recommendation.

The new version of (X) HTML requires lowercase attributes.

HTML attribute reference manual

Check out the complete list of HTML attributes: the HTML tag reference manual.

The following lists the attributes that apply to most HTML elements:

Attribute

Description

Class

Define one or more class names for the html element (class namesare introduced from the style file)

Id

Define the unique id of the element

Style

Specifies the inline style of the element (inline style)

Title

Describes additional information about the element (used as a toolbar)

Powered by TorCMS (https://github.com/bukun/TorCMS).