The new attributes of the a tag in HTML5 include charset, shape, coords, downloadNew, etc. to modify the link style
The a tag in HTML5 has added many new attributes. Many new functions and styles have been added to hyperlinks. Today I will introduce in detail the attribute values in the new a tag in HTML5
HTML5 The main function of the tag is to be used for hyperlinks. You can link to other pages or other local files. The most important attribute of the element is the href attribute, which specifies the target of the link. If there is no href attribute, you cannot use attributes such as target and type.
【Recommended course: HTML5 course】
##Example:
<a href="http://www.php.cn/">PHP中文网</a>
New attribute of tag in HTML5
charset: not supported by html5, refers to the character encoding of the urlcoords: not supported by html5 , refers to the coordinates of the link. downloadNew: Specify the download link hreflang: The base language of the target URL, only used when the href attribute exists. mediaNew: The media type of the target URL, only used when the href attribute exists and the default value is all. name: HTML5 does not support the name of the anchor. rel: Not supported by html5, refers to the relationship between the target URL and the current document. shape: Not supported by html5, refers to the shape of the link. taget: refers to where to open the target URL, only used when the href attribute exists. type New: Specifies the MIME type of the target URL, only used when the href attribute exists.Case Sharing
Create a link shape for a star image with a circle shape<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> <img src="images/12.jpg" usemap="#xingxing" alt="What new attributes are added to the a tag in HTML5" > <map name="xingxing" id="xingxing"> <area href="https://baike.baidu.com/item/%E6%98%9F%E6%98%9F/5683398?fr=aladdin" shape="circle" coords="96,195,10" target="_blank"></area> </map> </object> </body> </html>
The above is the detailed content of What new attributes are added to the a tag in HTML5. For more information, please follow other related articles on the PHP Chinese website!