English
German

HTML Style

HTML Style

The html style is a attribute :

To shows common way to style all HTML elements.

Styles was introduced with HTML version 4, as the new features and preferred way to style HTML elements. With HTML styles, styles can be added to HTML elements directly by using the style attribute. when ever for appling html style the result is showing attractive web pages.

You can learn everything about styles and CSS in our CSS Tutorial.

In this HTML tutorial we will use the style attribute to introduce you to HTML styles.


HTML Style Font Color and Size

The font-family, color, and font-size properties defines the font, color, and size of the text in an element in html style attribute

Style Example:

<html>
<body>
<h1 style="font-family:verdana">heading</h1>
<p style="font-family:arial;color:red;font-size:20px;">paragraph.</p>
</body>
</html>

Output

heading

paragraph.


HTML Style Text Alignment

The text-align property specifies the horizontal alignment of text in an element:
 

Text Alignment:

<html>
<body>
<h1 style="text-align:center">This is a heading</h1>
<p>The heading above is aligned to the center of this page.</p>
</body>
</html>
 

Output

Heading

paragraph is aligned to the center of this page.


HTML Tutorial,HTML Style, HTML Style example, learn HTML Style,explain example HTML Style online free training HTML Tutorial, HTML Tutorial example, learn HTML Style, online tutorial, download tutorial, HTML Tutorial books, HTML Tutorial videos, live videos HTML Tutorial, learn HTML Tutorial, HTML Tutorial topic HTML Style, live training HTML Tutorial, download free tutorial