HTML Style is used to change or add the style on existing HTML elements. There is a default style for every HTML element e.g. background color is Blue, text color is white etc.
The style attribute can by used with any HTML tag. To apply style on HTML tag, you should have the basic knowledge of css properties e.g. color, background-color, text-align, font-family, font-size etc.
The syntax of style attribute is given to Program.
HTML Style color
The color property is used to define the text color.
Let's see a simple program of styling html tags by color property of css.
HTML Style background-color
The background-color property is used to define background color for the HTML tag.
Let's see an program of styling html tag by of css background-color property.
HTML Style font-family
The font-family property specifies the font family of the HTML tag.
Let's see an program of styling html tag by css font-family property.
HTML Style font-size
The font-size property is used to define the text size of the HTML tag.
Let's see an example of font-size property.
Example:
Output:
HTML Style color :
This is Blue Color
This is Magenta Color
HTML Style background-color :
This is skyblue background
This is red background
HTML Style font-family :
This is times new roman font family
This is arial font family
HTML Style font-size :
This is 200% h3 tag
This is 200% p tag
Do you Know?
Progamming is what actually means ?What is software development ?
How we categorized software development in different manner.
C Plus Plus
Python
Java Development
Web Designing
Javascript
Mysql
Oracle