In this section, you will see implementation of style tag.
In this section, you will see implementation of style tag.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.