How It Works: Formatting Our HTML Page
In this lesson, we'll understand how to format our HTML pages. Let’s begin!
We'll cover the following...
How it works
Let’s go over the key lines of code in detail together:
<!DOCTYPE html><html><head><title>Table of Contents</title></head><body style="font-family: Verdana, Arial, sans-serif"><h1 style="color: white; background-color:#61b3e7 ">Introduction</h1><p style="margin-left: 40px; margin-top: 80px;">We'll create more content later...</p><p style="margin-left: 40px;">Live coding works!</p></body></html>
Line 6: The style attribute in <body>
defines the font type to be used with the font-family property. The property value is set to Verdana, Arial, sans-serif and as a result, the browser tries using the Verdana font first. If that is not found, it falls back to Arial, and in the worst-case assuming that ...