HTML attributes

HTML Attributes
Attributes are additional information provided by HTML elements.
HTML elements can set attributes;

Attributes are generally described in the opening tag; attributes always appear in the form of name/value pairs, such as: name="value".

Attribute values should always be enclosed in quotes.

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

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

HTML Attribute List

AttributeDescription


accesskey

class Specifies the class name (classname) of the element. Define the text direction of the contents of the content in the content in the content of the content in the content of the content in the contents of the content in the content of the content in the content of the content in the content of the content in the content of the content in the content of the content in the content of the content in the content of the content in the content of the content in the content of the content in the content of the content in the content of the content in one or more class names.

##id .

# Style specifies the line style of the element.Title specifies the additional information of the element (can be displayed in the tool prompt, as used as a tool bar)

######################################## #HTML links are defined by the tag. The address of the link is specified in the href attribute: ######Instance###
    php中文网(php.cn) 
这是一个链接使用了 href 属性
###Output:######This is a link using the href attribute########### #Tips: #############1. Attributes and attribute values are not case-sensitive. ######It is recommended to use lowercase in the W3C standard, but the new version of (X)HTML requires the use of lowercase attributes. ######2. ###Attribute values should always be enclosed in quotes. #########Double quotes are the most commonly used, but there is no problem using single quotes. ###

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


Continuing Learning
||
php中文网(php.cn)

颜色的背景。

submit Reset Code
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!