HTML Styles

HTML Styles

<!DOCTYPE html>
<html>
<head>
<title>HTML styles</title>title>
</head>
<body>
<p>I am normal</p>
<p style=”color:red;”>I am red in color</p>
<p style=”color:green;”>I am green in color</p>
<p style=”font-size:100px;”>I am big in size</p>
</body>
</html>
HTML Styles

HTML Background color

<!DOCTYPE html>
<html>
<head>
<title>HTML Background color</title>
</head>
<body style=”background-color:rgb(200, 162, 200);”>
<b><p>Background color is lilac</p></b>
</body>
</html>
HTML Styles

HTML Text color

<!DOCTYPE html>
<html>
<head>
<title>HTML Text color</title>
</head>
<body>
<h2 style=”color:blue;”>Heading text is in blue color</h2>
<p style=”color:red;”>Paragraph text is in red color</p>
</body>
</html>

HTML Text Font

<!DOCTYPE html>
<html>
<head>
<title>HTML Text Font</title>
</head>
<body>
<h2 style=”font-family:verdana;”>Heading is in verdana font</h2>
<p style=”font-family:courier;”>Paragraph is in courier font</p>
</body>
</html>

HTML Text Size

<!DOCTYPE html>
<html>
<head>
<title>HTML Text Size</title>
</head>
<body>
<h2 style=”font-size:300%;”>Heading</h2>
<p style=”font-size:160%;”>Paragraph.</p>
</body>
</html>
HTML styles

HTML Text Alignment

<!DOCTYPE html>
<html>
<head>
<title>HTML Text Alignment</title>
</head>
<body>
<h2 style=”text-align:center;”>Heading is in Center</h2>
<p style=”text-align:center;”>Paragraph is in Center</p>
</body>
</html>
HTML styles

If you like the post HTML styles, please share your feedback!

also see

C Programming language
Go Programming language
Linked List Array
Simplification Queue
DBMS Reasoning
Aptitude HTML
Previous articleLoop Control Structures in C
Next articleHTML Lists

LEAVE A REPLY

Please enter your comment!
Please enter your name here