The HTML Style Attribute
It introduces the use of CSS in HTML.
<html>
<body style="background-color:gray;">
<h1>Look! Styles and colors</h1>
<p style="font-family:verdana;color:red">
This text is in vardana and red</p>
<p style="font-family:times;color:green">
This text is in Times and green</p>
<p style="font-size:30px">This text is 30 pixels high</p>
</body>
</html>
Deprecated Tags and Attributes
TAGS
<center>
<font> and <basefont>
<s> and <strike>
<u>
ATTRIBUTES
align
bgcolor
color
Common HTML Styles
Backgroung Color
<body style="background-color:gray">
<html>
<body style="background-color:gray">
<h2>Look:colored Background!</h2>
</body>
</html>
<html>
<body bgcolor="gray">
<h2>Look:colored Background!</h2>
<p>For future-proof HTML, use HTML styles instead:</p>
<p>style="background-color:gray"</p>
</body>
</html.
Font Family,Color, and Size
<html>
<body>
<h1 style="font-family:vardana">A heading</h1>
<p style="font-family:courier new; color:red; font-size:20px;">A paragraph</p>
</body>
</html>
<html>
<body>
<p><font size="2" facce="vardana">
THis is a paragraph
</font></p>
<p><font size="5" face="Times" color="red">
This is another paragraph.
</font></p>
</body>
</html>
Text Alignment
<h1 style="text-alighn:center">
<html>
<body>
<h1 style="text-alighn:center">This is heading1</h1>
<p>The heading above is aligned to the center of this page.
The heading above is aligned to the center of this page.
The heading above is aligned to the center of this page.
</p>
</body>
</html>
<html>
<body>
<h1 align="center">This is heading 1</h1>
<p>The heading above is aligned to the center of this page.
The heading above is aligned to the center of this page.
The heading above is aligned to the center of this page.
</p>
</body>
</html>
It introduces the use of CSS in HTML.
<html>
<body style="background-color:gray;">
<h1>Look! Styles and colors</h1>
<p style="font-family:verdana;color:red">
This text is in vardana and red</p>
<p style="font-family:times;color:green">
This text is in Times and green</p>
<p style="font-size:30px">This text is 30 pixels high</p>
</body>
</html>
Deprecated Tags and Attributes
TAGS
<center>
<font> and <basefont>
<s> and <strike>
<u>
ATTRIBUTES
align
bgcolor
color
Common HTML Styles
Backgroung Color
<body style="background-color:gray">
<html>
<body style="background-color:gray">
<h2>Look:colored Background!</h2>
</body>
</html>
<html>
<body bgcolor="gray">
<h2>Look:colored Background!</h2>
<p>For future-proof HTML, use HTML styles instead:</p>
<p>style="background-color:gray"</p>
</body>
</html.
Font Family,Color, and Size
<html>
<body>
<h1 style="font-family:vardana">A heading</h1>
<p style="font-family:courier new; color:red; font-size:20px;">A paragraph</p>
</body>
</html>
<html>
<body>
<p><font size="2" facce="vardana">
THis is a paragraph
</font></p>
<p><font size="5" face="Times" color="red">
This is another paragraph.
</font></p>
</body>
</html>
Text Alignment
<h1 style="text-alighn:center">
<html>
<body>
<h1 style="text-alighn:center">This is heading1</h1>
<p>The heading above is aligned to the center of this page.
The heading above is aligned to the center of this page.
The heading above is aligned to the center of this page.
</p>
</body>
</html>
<html>
<body>
<h1 align="center">This is heading 1</h1>
<p>The heading above is aligned to the center of this page.
The heading above is aligned to the center of this page.
The heading above is aligned to the center of this page.
</p>
</body>
</html>
1 comment:
nice article for beginners.thank you.
python tutorial
java tutorial
Post a Comment