w3-video.com logo

HTML5 Tutorial

Home HTML5 XAMPP .htaccess Firefox Notepad++

Share it



a type attribute

The type attribute on the a element:



MIME types Examples for different resources:

Examples

<aattribute="value(s)">...<⁄a>example
7.type= MIME type<a href="file.php" type="text/html"> ... <⁄a>

Video demonstration a type attribute

HTML5 a type attribute Tutorial

min video details
00:08 video tutorial: a element, type attribute
objective: understanding the type attribute
00:16 the type attribute:
- is optional
- can be used only if href attribute is present
- allows you to specify the media type of the linked resource
00:24 we have 2 a elements, both have the href attribute → we can add the type attribute also
00:31 the 2 a elements, link the html file to 2 external different resources: html, css
00:34 1st resource is html type (opens an html page)
00:46 2nd resource is css type (opens a css page)
00:59 MIME types
00:59 the MIME type of these 2resource is different:
- the MIME type of the html file is: text⁄html
- the MIME type of the css file is: text⁄css
01:08 this information (the MIME type), useful for user agents, can be added through type attribute
a intro a browser display a parents - childrena content model: transparenta warninga syntaxa download attributea href attributea hreflang attributea rel attributea target attributea itemprop attribute