Next, create the framework that all HTML files must include: the document structuring commands, a title, and some initial headings. Note that the title is descriptive bust short; you can save the longer title for the <h2> element in the body of the text. The four <h2> subheadings help you define the four main sections you’ll on your web page:
<! DOCTYPE html PUBLIC”-//W3C //DTD XHTML 1.0 transitional//EN”
“http: //www.w3.org/TR/xhtml1/transitional.dtd”>
<Html>
<Head>
<Title>the bookworm bookshop</title>
</Head>
<Body>
<h1> the bookworm: a better bookshop</h2>
<h2>recent titles (as of 11-jan. 2003)</h2>
<h2>upcoming events</h2>
</body>
</html>
Each of the headings you’ve placed on your page marks the beginning of a particular section. You’ll create an anchor at each of the topic headings so that you can jump from section to section with ease. The anchor names are simple: top for the main heading; contents for the table of contents; and about, recent, and upcoming for the three subsections on the page. The revised code looks like to following with the anchors in place:
INPUT
<! DOCTYPE html PUBLIC”-//W3C //DTDXHTML 1.0 transitional//EN”
“http: //www.w3.org/TR/xhtml1/transitional.dtd”>
<Html>
<Head>
<Title>the bookworm bookshop</title>
</Head>
<Body>
<A NAME=”TOP “> <h1> the bookworm: a better book store<h1></a>
<a name=”contents”> <h2>contents</h2></a>
<a name=”about”><h2>about the bookworm bookshop </h2></a>
<a name=”recent”><h2>recent titles (as of 11-jan-2003)/</h2></a>
<a name=”upcoming”><h2>upcoming events</h2></a>
</body>
</html>
No comments:
Post a Comment