Sunday, October 3, 2010

HTML - Style ( FONT ,Background color ,Alignment)

HTML styles, styles can be added to HTML elements directly by using the style attribute, or indirectly in separate style sheets (CSS files).


AttributeDescription
font-sizeSpecifies font size.
Example: font-size:20px;
color:Specifies font color.
color:red;
font-family:Sets the current fonts typeface.
Example:font-family:arial;
background-colorbackground-color property defines the background color for an element
Example:background-color:green
text-aligntext-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

Send your Design, Code or any other Creations to qualitypointmail@gmail.com for showing them here. You can mention your contact details(email id, phone) also

If you are an Expert, you can give review comments or feedback to show your skills

This blog will help you to get more opportunities as this blog will be linked to our other blogs and sites which attract more visitors.

A Good Beginning Is Half Done

Start Freelancing