The HTML code for this lesson that contains a single paragraph of text is shown in Listing 4.1. Listing 4.1. HTML Code Containing the Markup for Lesson 4<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title>Lesson 4</title> </head> <body> <p> Lorem ipsum dolor sit amet, consectetuer adipiscing elit... </p> </body> </html> In this lesson, the <p> element will be styled with font-family, width, background-color, margin, and padding. These styles can be applied to <p> elements using three methods: inline styles, header styles, and external style sheets. Although each method will be explained, external style sheets are the preferred option because they do not add CSS to the HTML markup. |