Style Attribute in HTML:-

we can set style of an html element with the help of style attribute.
Syntax of HTML Style Attribute is as Follow.

<tagname style="property or value;">


The property is a CSS property. The value is a CSS value. IF you want to learn CSS then click on this link

HTML Background Color:-

The background-color property defines the background color for an HTML element.
This example sets the background color for a page to ligtpink:

<body style="background-color:powderblue;">

<h1>This is a heading</h1>
<p>This is a paragraph.</p>

</body>


Text Color in HTML:-


The color property defines the text color for an HTML element.

<h1 style="color:lightpink;">This is a heading</h1>
<p style="color:lightgreen;">This is a paragraph.</p>




Fonts in HTML:-

The font-family  property is used for the font size of the HTML element. 

<h1 style="font-family:Arial;">This is a heading</h1>
<p style="font-family:Time;">This is a paragraph.</p>

Text Size in HTML:-

Then font-size  is used for increase or decrease the font size. 

<h1 style="font-size:32px;">This is a heading</h1>
<p style="font-size:50px;">This is a paragraph.</p>

Text Alignment in HTML:-

The text-align property defines the horizontal text alignment for an HTML element. 

<h1 style="text-align:right;">right Heading</h1>
<p style="text-align:left;">left paragraph.</p>
<h1 style="text-align:top;">top Heading</h1>
<p style="text-align: bottom ;">bottom paragraph.</p>
<h1 style="text-align:right;"> Heading</h1>


IF you have any question about this lecture you can comment blow. feel free to contact me.

0 comments:

Post a Comment

Thanks

 
Blogger Templates1 school © 2013. All Rights Reserved. Powered by Blogger
Top