Jun 17, 2016

Html style attribute


<div style="property:value;"></div>


property and value both are a CSS value.
Style Attribute  is  presented the documents on the web browsers and the characteristics of an HTML element define by the an attribute. Attribute property and attribute values are case-insensitive.

Suppose we have a  paragraph <p> element  and an attribute whose name is align, which we can use to indicate the alignment of paragraph on the page.

The value of the property to be set and always put within quotations it is called value of the property . The example of attributes is given below
There is three align attribute: left,  centre,  right

<!DOCTYPE html>
<title>Align Attribute </title>
<p align="left">I am a left  aligned</p>
<p align="centre">I am a centre aligned</p>
<p align="right">I am a right aligned</p>

Result will show :

I am a left aligned

I am a centre aligned

I am a right aligned

HTML Style is very limited when we need to presentation of document. It is very useful and simple way of presenting information.

It is easy to specify when it's work with CSS,  Background Color, HTML Text Color, HTML Fonts, HTML Text Size, the amount of space between elements,  HTML Text Alignment, adding border and outlines to the elements and a host of other styling.

These are the three styles Attribute
  • Inline styles
  • Embedded style
  • External style sheet