Pages

Tuesday, August 25, 2009

Style Attribute in HTML is the lastest Addition of CSS to HTML

Style attribute(assign) is used with every tag you use to customize what you see the browser/html page you made.


[Code]

<html>

<body style="background-color:#AEDFFF">
<p style="font-family:Arial Black; color:black; font-size:20px">
<h6 style="text-align:center">This is style heading in size 6</h6>

</body>
</html>

[Output]

muwasalat.com, style tag output

____________________________________________________________________________
Note:
Please review the previous posts so that you know what <p>... </p> and other tags stands for. Style is an attribute or you can simply say that you are assinging/attaching certain characteristics to your body of html or paragrah in html.

It's simple. And it is meant to be simple.

Style has replaced a bunch of attributes and tags and now those tags should be avoided and instead HTML Style attribute should be used:

FMI - For More Info :
http://www.w3schools.com/html/html_styles.asp

No comments:

Post a Comment