Attribute | Description |
---|---|
font-size | Specifies font size. Example: font-size:20px; |
color: | Specifies font color. color:red; |
font-family: | Sets the current fonts typeface. Example:font-family:arial; |
background-color | background-color property defines the background color for an element Example:background-color:green |
text-align | text-align property specifies the alignment(center,left,right) of text in an element Example:text-align:center |
Example 1:
<html>
<body style="background-color:yellow">
<h2 style="background-color:red">BACK GROUND</h2>
<p style="background-color:green">WELCOME.</p>
</body>
</html>
Example 2:
<html>
<body>
<h1 style="font-family:verdana">FONT</h1>
<p style="font-family:arial;color:red;font-size:20px;">WELCOME.</p>
</body>
</html>
Example 3:
<html>
<body>
<h1 style="text-align:center">TEXT ALIGNMENT</h1>
<p>WELCOME.</p>
</body>
</html>
No comments:
Post a Comment