style title attribute
The title attribute on the style element:
- → allows you to add a title to the alternative style sheet
- is a global attribute → can be applied on all html elements but the semantic in that case is different (= allows you to add advisory information for an element);
Examples
<style | attribute | = | "value(s)" | > | ... | <⁄style> | example |
---|---|---|---|---|---|---|---|
20. | title | = | text | <title="Lighter"> CSS rules <⁄ > |
Video demonstration style title attribute
HTML5 style title attribute Tutorial
min | video details |
---|---|
00:10 | video tutorial: style element, title attribute objective: adding a title to an alternative style sheet |
00:18 | adding the title attribute to style element |
00:22 | since the page is blue, we can call this style "blue"; this name represents the value of the title attribute which is the title of this internal style sheet |
00:31 | in browser, this title displays in: View → Page Style; |
00:33 | you can actually select the alternative style, by clicking on its name, moment when the existing style of the web page is replaced by this alternative style |
00:39 | adding another style to the page and a title to it |
00:59 | test: selecting the alternative style sheet, the green one |
01:02 | the green style applies to the web page |