w3-video.com logo

HTML5 Tutorial

Home HTML5 XAMPP .htaccess Firefox Notepad++

Share it



style type attribute

The type attribute on the style element:

Examples

<styleattribute="value(s)">...<⁄style>example
2.type=MIME type<style type="text/css"> CSS rules <⁄style>

Video demonstration style type attribute

HTML5 style type attribute Tutorial

min video details
00:08 video tutorial style element, type attribute
objective: adding the corresponding MIME type to the internal style sheet
00:15 - the type attribute is optional
- if missing, like in our case, the default media type is text⁄css
00:22 - the rules inside the style element belong to CSS
- the corresponding MIME type for CSS is: text⁄css → the value of the type attribute will be: text⁄css
00:29 as we said, adding the type attribute is optional, more, is the type attribute is missing, the default value is text⁄css, BUT for example purpose we will add the type attribute to the style element with the value text⁄css
00:37 adding the type attribute to the style element represents useful information for user agents
00:37 note: this kind of information does not display in browser
style intro style optional style browser display style parents - CSS rules style ELEMENT vs style ATTRIBUTE style syntaxstyle media attributestyle scoped attributestyle title attribute