HTML Style
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 white, text color is black 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 below:
Example:
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body style="background-color:pink;">
<h1 style="color:red;">I am Red</h1>
<h1 style="color:blue;">I am blue</h1>
<h1 style="font-size:30;text-align:center;font-family:comic sans MS;">
Hi Everyone</h1>
</body>
</html>
Nice content
ReplyDelete