Check Your Markup


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.

HTML for Project 4

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 &quot;How to Do Everything with  HTML &amp; XHTML.&quot; <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 &quot;How to Do Everything with HTML &amp; XHTML.&quot; <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 &quot;How to Do Everything with HTML &amp; XHTML.&quot; <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>

HTML for Project 5

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 &quot;How to Do Everything with HTML &amp; XHTML.&quot; 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 &quot;How to Do Everything with HTML &amp; XHTML.&quot; 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 &quot;How to Do Everything with HTML &amp; XHTML.&quot; 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>




How to Do Everything with HTML & XHTML
How to Do Everything with HTML & XHTML
ISBN: 0072231297
EAN: 2147483647
Year: 2003
Pages: 126

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net