Share on Google+Share on Google+

html5 style tag.

Advertisement
In this section, you will see implementation of style tag.

html5 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:
There are following attributes..
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.


Declaration Syntax :

Declaration syntax of form in HTML5.

                     <style type=""> ....... <style>

Example of <form> in HTML5:

Code:
SelectTag.html
<!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 &lt;style&gt; tag.</h1>
<p class="b">Bharat Singh</p>
<style type="text/css" scoped>
.b
{background-color:#66FF99
}
}
</style>
<p class="bharat">For&nbsp; dynamic web site css is important.
</body>
</html>
Output:

Download this code

Difference Between HTML5 and HTML4.01:

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.

Advertisements

Advertisement

Posted on: September 15, 2010 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.