Introduction to Html
Component of Html
With style attribute,we can provide style to our HTML element. The HTML style attribute has the following syntax:
Syntax : <tagname style="property:value;">
1. Background color
You can set the background color for HTML elements:
Let's understand this by the following example:
2. Text Color
You can set the color of text.
Let's understand this by the following example:
3. HTML Fonts
The font-family property defines the font to be used for an HTML element.
Let's understand this by the following example:
4. HTML Text Size
The font-size property defines the text size for an HTML element.
Let's understand this by the following example:
5. HTML Text Alignment
The text-align property defines the horizontal text alignment for an HTML element.
Let's understand this by the following example: