HTML Styles

HTML Background Color

<!DOCTYPE html>
<html>
<body style=”background-color:powderblue;”>

<h1>This is a heading</h1>
<p>This is a paragraph.</p>

</body>
</html>

HTML Text Color

<!DOCTYPE html>
<html>
<body>

<h1 style=”color:blue;”>This is a heading</h1>
<p style=”color:red;”>This is a paragraph.</p>

</body>
</html>

HTML Fonts

<!DOCTYPE html>
<html>
<body>

<h1 style=”font-family:verdana;”>This is a heading</h1>
<p style=”font-family:courier;”>This is a paragraph.</p>

</body>
</html>

HTML Text Size

<!DOCTYPE html>
<html>
<body>

<h1 style=”font-size:300%;”>This is a heading</h1>
<p style=”font-size:160%;”>This is a paragraph.</p>

</body>
</html>

HTML Text Alignment

<!DOCTYPE html>
<html>
<body>

<h1 style=”text-align:center;”>Centered Heading</h1>
<p style=”text-align:center;”>Centered paragraph.</p>

</body>
</html>

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *