Home  >  Article  >  Web Front-end  >  what are html attributes

what are html attributes

藏色散人
藏色散人Original
2021-03-31 11:18:016867browse

html attributes are additional information provided by HTML elements, that is, attributes possessed by each tag; HTML tags can have attributes, and attributes provide more information about HTML elements.

what are html attributes

The operating environment of this article: Windows 7 system, HTML5 version, DELL G3 computer

The so-called html attributes refer to the attributes of each tag

The most common attributes include: id, class, name, style, type, value, etc.

Different tags have their own exclusive attributes, such as colspan rowspan for table elements

html attributes are written in tags, such as:

<input type="text" name="" id="">

input is the tag name, and type, name, and id are all attributes of this tag

Of course, users can also Custom properties.

HTML attribute introduction:

Attributes provide additional information for HTML elements.

HTML tags can have attributes. Attributes provide more information about HTML elements.

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

Attributes are always specified in the opening tag of an HTML element.

Attribute Example

HTML links are defined by the 3499910bf9dac5ae3c52d5ede7383485 tag. The link address is specified in the href attribute:

<a href="http://www.w3school.com.cn">This is a link</a>

Recommended learning: "HTML video tutorial" "css video tutorial"

The above is the detailed content of what are html attributes. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn