Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

HTML properties


May 02, 2021 HTML


Table of contents


HTML property


Property is additional information provided to HTML elements.


HTML properties

  • HTML elements can set the property
  • Properties can add additional information to an element
  • Properties are typically described in the Start label
  • Property always appears as a name/value pair, for example: name."value".

The instance of the property

HTML links are defined by the label. T he address of the link is specified in the href property:

<a href="https://www.w3cschool.cn">这是一个链接使用了 href 属性</a>

Try it out . . .


HTML properties often refer to property values

Property values should always be included in quotation marks.

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

HTML properties Tip: In some individual cases, such as when the property value itself contains double quotes, you must use single quotes, for example: name'John "ShotGun" Nelson'


HTML Tip: Use small-case properties

Properties and property values are not case sensitive.

However, the World Wide Web Federation recommends smaller properties/property values in its HTML 4 recommendations.

The new version of (X) HTML requires the use of small-case properties.


HTML property reference manual

View the full list of HTML properties: HTML tag reference manual.

The properties that apply to most HTML elements are listed below:

Attributes describe
class Define one or more class names for HTML elements (class names are imported from style files)
id Unique ID for defining elements
style Inline Style in the line style of the specified elements
title Describe additional information of the element (use as a toolbar)

More HTML Standard Properties Description: HTML Standard Properties Reference Manual .