|
Earlier in this chapter, you had the opportunity to experiment with structure and presentation by creating a page with simple text elements, then modifying it with CSS. Hopefully you were able to complete the projects successfully; however, if you need a little help you’ll find the code for the projects in the following paragraphs.
The HTML markup that follows might not look exactly like what you came up with, and that’s perfectly acceptable. It is included here to provide you with a reference to check on your own code-writing abilities. The following code was used to create Figure 3-1:
<html> <head> <title>Text Formatting</title> </head> <body> <h1>A Sample Paragraph</h1> <p>This is a sample paragraph, written expressly for the book "How to Do Everything with HTML & XHTML." <br /> If you keep reading, you will notice that I have used the convenient copy and paste feature to cause this paragraph to reproduce endless times. In fact, I could create a very long, meaningless document by doing this, but I think I'll stop here.</p> <hr /> <p>This is a sample paragraph, written expressly for the book "How to Do Everything with HTML & XHTML." <blockquote>If you keep reading, you will notice that I have used the convenient copy and paste feature to cause this paragraph to reproduce endless times.</blockquote>In fact, I could create a very long, meaningless document by doing this, but I think I'll stop here.</p> <p>This is a sample paragraph, written expressly for the book "How to Do Everything with HTML & XHTML." <br /> If you keep reading, you will notice that I have used the convenient copy and paste feature to cause this paragraph to reproduce endless times. In fact, I could create a very long, meaningless document by doing this, but I think I'll stop here.</p> </body> </html>
The following code was used to create Figure 3-2. It is the same as what was written for Project 4, but has inline styles added. Check your code and compare it with this markup:
<html> <head> <title>Text Formatting</title> </head> <body> <h1 style="color: red; font-style: italic;"> A Sample Paragraph</h1> <p style="font-family: arial; font-weight: bold; font-size: 12pt; color: navy"> This is a sample paragraph, written expressly for the book "How to Do Everything with HTML & XHTML." If you keep reading, you will notice that I have used the convenient copy and paste feature to cause this paragraph to reproduce endless times. In fact, I could create a very long, meaningless document by doing this, but I think I'll stop here.</p> <hr /> <p style="font-family: arial; font-weight: bold; font-size: 12pt; color: navy;"> This is a sample paragraph, written expressly for the book "How to Do Everything with HTML & XHTML." If you keep reading, you will notice that I have used the convenient copy and paste feature to cause this paragraph to reproduce endless times. In fact, I could create a very long, meaningless document by doing this, but I think I'll stop here.</p> <p style="font-family: arial; font-weight: bold; font-size: 12pt; color: navy;"> This is a sample paragraph, written expressly for the book "How to Do Everything with HTML & XHTML." If you keep reading, you will notice that I have used the convenient copy and paste feature to cause this paragraph to reproduce endless times. In fact, I could create a very long, meaningless document by doing this, but I think I'll stop here.</p> </body> </html>
|