<!DOCTYPE html Public “-//w3c//DTD XHTML 1.0 Transitional//EN”
>
<html>
<head>
<title>The Labyrinth</title>
</head>
<body>
<a name=”top”><h1>The Labyrinth: Old Books/New Readers</h1></a>
<blockquote>
“Reading is so fun”<br />
- Tom Wolfe, <cite>Books in NYC</cite>
</blockquote>
<p>The Labyrinth<br />
151 Varick St.<br />
Manhattan, NY 10013<br />
(212) 555-1234
</p>
<a name=”contents”><h2>Contents</h2></a>
<ul>
<il><a href=”#about”><h2>About The Labyrinth</a></li>
<li><a href=”#recent”><h2>Recent Titles</a><li>
<li><a href=”#upcoming”><h2>Upcoming Events</a><li>
</ul>
<hr />
<a name=”about”><h2>About The Labyrinth</h2></a>
<p>The Labyrinth is not the typical bookstore offering customers a maze with fantastic reads all the way through.
The Labyrinth offers:</p>
<ul>
<li>Dungeon walls and maze for the adventurous
<li>Courteous and helpful staff
<li>New releases and updated New York Times Best Seller section
</ul>
<p>Our hours are <strong>10am to 12pm</strong> weekdays,<strong>noon to 10<7</strong> on weekends.</p>
<p><a href=”contents”>Back To Contents</a> | <a href=”top”>Back to Top</a></p>
<hr />
<a name=”recent”><h2>Recent Titles (as of 17-Nov-2007)</h2></a>
<ul>
<li>Ian Ayers, <a href=”supercrunchers.html”>
<cite>Supercrunchers</cite></a></li>
<li>John Perkins, <a href=”confessions of an economic hitman.html”
<cite>Confessions of an Economic Hitman</cite></a></li>
</ul>
<p><a href=”#contents”>Back to Contents</a> <a href=”#top”> Back to Top</a></p>
<hr />
<a name=”upcoming”><h2>Upcoming Events</h2></a>
<ul>
<li><b>Coffee and Liquer</b>Show up between 5pm and 7pm on Wednesday and receive complimentary coffees and drinks(adults only).</li>
<li><b>Monday Madness</b>Monday Sale; buy any two books receive the third one for free.</li>
</ul>
<p><a href=”#contents”>Back to Contents</a> | <a href=”#top”>Back to Top</a></P>
<hr />
<address>
Last Updated: 17-Nov-2007<br />
Webmaster: Michael Westfield <br />
&#169; copyright 2007 the Labyrinth<br />
</address>
</body>
</html>

Dani AI

Generated

Good catches already: flagged the list/anchor problems, called out unclosed headings, noted the missing code presentation, and posted a cleaned-up XHTML rewrite. Those fixes address the obvious markup errors. A few further, commonly missed issues will help the page validate, behave more consistently across browsers, and be easier to maintain.

First, replace the malformed DOCTYPE and any “smart” (curly) quotes in the source with plain ASCII quotes; curly quotes in markup will break parsers. Move away from the deprecated name anchor pattern and from wrapping block-level headings in anchors (for example, avoid <a name="top"><h1>…</h1></a>). Instead give the heading an id and link to it (use id on the heading and href="#id" from the link). Also avoid spaces in filenames — rename confessions of an economic hitman.html to a hyphenated name or use percent-encoding.

A short, practical workflow:

  1. Run a validator and an HTML linter to find unclosed/misnested tags.
  2. Use id on headings for jump targets (for example, give the section <h2 id="about">About</h2> and link with <a href="#about">).
  3. Add a charset meta (for modern pages use <!DOCTYPE html> and <meta charset="utf-8">).
  4. Rename files to remove spaces and test links on a local server.

After the syntax fixes already suggested by and , focus on semantics (use semantic sections or HTML5 structural elements), consistent encoding, and accessible linking. Those changes will make the page validate, improve accessibility, and reduce cross-browser surprises.

Recommended Answers

All 4 Replies

1. Line 20 - <il> should be <li>
2. Line 21/22 - end tags should be </li>, instead of <li>
3. Line 29/30/31 - add </li> to the end of each line
4. Line 34 - each href should begin with the pound sign... as in <code><a href="#contents"></code>

That's all I see, but it might help with a few of your issues. Anyone else?

for each <li> put closing </li> and also for each <h2> put closing </h2> tag.

i guess the first mistake are the missing code tags

Try this...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>The Labyrinth</title>
  </head>
  
  <body>
    
    <a name="top"><h1>The Labyrinth: Old Books/New Readers</h1></a>
    
    <blockquote>
      &quot;Reading is so fun&quot;<br />
      - Tom Wolfe, <cite>Books in NYC</cite>
    </blockquote>
    
    <p>
      The Labyrinth<br />
      151 Varick St.<br />
      Manhattan, NY 10013<br />
      (212) 555-1234
    </p>
    
    <a name="contents"><h2>Contents</h2></a>
    
    <ul>
      <li><a href="#about"><h2>About The Labyrinth</h2></a></li>
      <li><a href="#recent"><h2>Recent Titles</h2></a></li>
      <li><a href="#upcoming"><h2>Upcoming Events</h2></a></li>
    </ul>
    
    <hr />
    
    <a name="about"><h2>About The Labyrinth</h2></a>
    
    <p>
      The Labyrinth is not the typical bookstore offering customers a maze with fantastic reads all the way through.
      The Labyrinth offers:
    </p>
    
    <ul>
      <li>Dungeon walls and maze for the adventurous</li>
      <li>Courteous and helpful staff</li>
      <li>New releases and updated New York Times Best Seller section</li>
    </ul>
    
    <p>Our hours are <strong>10am to 12pm</strong> weekdays,<strong>noon to 10pm</strong> on weekends.</p>
    <p><a href="#contents">Back To Contents</a> | <a href="#top">Back to Top</a></p>
    
    <hr />
    
    <a name="recent"><h2>Recent Titles (as of 17-Nov-2007)</h2></a>
    
    <ul>
      <li>Ian Ayers, <a href="supercrunchers.html"><cite>Supercrunchers</cite></a></li>
      <li>John Perkins, <a href="confessions of an economic hitman.html"><cite>Confessions of an Economic Hitman</cite></a></li>
    </ul>
    
    <p><a href="#contents">Back To Contents</a> | <a href="#top">Back to Top</a></p>
    
    <hr />
    
    <a name="upcoming"><h2>Upcoming Events</h2></a>
    
    <ul>
      <li><b>Coffee and Liquer</b> Show up between 5pm and 7pm on Wednesday and receive complimentary coffees and drinks(adults only).</li>
      <li><b>Monday Madness</b> Monday Sale; buy any two books receive the third one for free.</li>
    </ul>
    
    <p><a href="#contents">Back To Contents</a> | <a href="#top">Back to Top</a></p>
    
    <hr />
    
    <address>
      Last Updated: 17-Nov-2007<br />
      Webmaster: Michael Westfield <a href="mailto:michael@thelabyrinth.com">michael@thelabyrinth.com</a><br />
      &copy; copyright 2007 the Labyrinth<br />
    </address>
    
  </body>
</html>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.