In this section, you will see how to use <style> in HTML5. It is a best way for adding style in web page. It is required for dynamic web page. In HTML5 , it can be used in body tag if scoped attribute present. If scoped attribute does not present in <style> tag. It can be used only in <head> tag.
Attributes of form:| Attributes | value | Description |
| type | text/css | defines type of style. |
| media | all, screen, tv tty etc |
define media for rendering program. |
| scoped | scoped | style can be apply only its child and parents. |
| <style type=""> ....... <style> |
|
<!doctype html > <html> <head> <title>Title </title> <style type="text/css"> h1{ color:green; } .bharat { color:navy; font-variant:small-caps; } } </style> </head> <body> <h1>Example of <style> tag.</h1> <p class="b">Bharat Singh</p> <style type="text/css" scoped> .b {background-color:#66FF99 } } </style> <p class="bharat">For dynamic web site css is important. </body> </html> |

The form tag is available in both HTML5 and HTML4.01. But there is some attribute in HTML5, that is not supported by HTML4.01.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.