Syntax:
<div style="property:value;"></div>
style="property:value;"
|
property and value both are a CSS value.
Style Attribute has presented the documents on the web browsers and the characteristics of
an HTML element define by the attribute. Attribute property and attribute
values are case-insensitive.
Property
Suppose we have a paragraph <p> element and an attribute whose name is aligned, which
we can use to indicate the alignment of the paragraph on the page.
Value
The value of the property to be set and always put within
quotations it is called the value of the property. The example of attributes is
given below
There
is three align attribute: left, center, right
<!DOCTYPE html>
<html>
<head>
<title>Align Attribute </title>
</head>
<body>
<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>
</body>
</html>
|
The result will show :
I am
a left-aligned
I am a center-aligned
I am a right-aligned
|
HTML Style is very limited when we need the presentation
of document. It is a very useful and simple way of presenting the 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 a border and
outlines the elements and a host of another styling.
These
are the three styles Attribute
- Inline styles
- Embedded style
- External style sheet
No comments:
Post a Comment
Please do not enter any spam link in the comment box.