A few days ago i decided that i want to learn some of the basics on html. I dont need it but its good to know. So i created something and i tried validating it i received about 60 errors. I corrected most of them, but now i am down to 4 errors which i cannot figure out. The errors it's giving me are: 1. Error Line 43, Column 4: document type does not allow element "ul" here; assuming missing "li" start-tag <ul> ✉ 2. Error Line 48, Column 5: end tag for "li" omitted, but OMITTAG NO was specified </ul> ✉ You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">". 3. Info Line 43: start tag was here ><ul> 4. Error Line 51, Column 4: document type does not allow element "ul" here; assuming missing "li" start-tag <ul> ✉ 5. Error Line 56, Column 5: end tag for "li" omitted, but OMITTAG NO was specified </ul> ✉ You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">". 6. Info Line 51: start tag was here ><ul> Code (markup): Here is the full code: 1. <?xml version="1.0" encoding="UTF-8" standalone="no" ?> 2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 3. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 4. <html xmlns="http://www.w3.org/1999/xhtml"> 5. 6. <!-- 7. Dave's Devil Sticks 8. Basic Stick 9. Author: Daniel Daskaloski 10. Date: 2/6/2010 11. --> 12. 13. <head> 14. <title>Basic Sticks</title> 15. </head> 16. 17. <body> 18. 19. <h1 style="text-align: center"><img src="logo.jpg" alt="Dave's Devil Sticks: The Basic Stick"></img></h1> 20. 21. <h2><font color="red"> The Basic Stick </font> </h2> 22. The Basic Stick is the perfect stick for beginners. The stick rotates slowly to provide extra time for performing stick tricks, but is flashy enough to impress your friends. 23. 24. <blockquote> 25. <hr /> 26. <b>Patented Dura-Coat® finish</b> ensures sticks can withstand all weather conditions. More durable than other sticks, these props will keep looking like new for as long as you own them. 27. <br /> 28. <br /> 29. <b>Enhanched stick flexibility</b> provides more bounce, allowing for better tricks. A soft rubber core adds a whole new element to the sticking experiene that you have to feel to believe! 30. <br /> 31. <br /> 32. <b>Full customization</b> will give you the change to own a pair of sticks unlike any others out there. I make exactly what you want, with your colors and your designs. 33. <br /> 34. <br /> 35. <b>A personal touch </b> through both my customization options and hand-crafted designs. 36. <br /> 37. <hr /> 38. </blockquote> 39. 40. <h2><font color="red"> Specifications </font> </h2> 41. <ul> 42. <li>Main Stick</li> 43. <ul> 44. <li>Weight: 7 oz.</li> 45. <li>Length: 24 inches</li> 46. <li>Tape: Dura-Coat® finish with laser-style color choices</li> 47. </ul> 48. </ul> 49. <ul> 50. <li>Handle Sticks (one pair)</li> 51. <ul> 52. <li>Weight: 2 oz.</li> 53. <li>Length: 18 inches</li> 54. <li>Tape: Soft ivory tape with rubber core</li> 55. </ul> 56. </ul> 57. 58. 59. 60. <hr /> 61. <center><address> 62. Dave's Devil Sticks ♦ 541 West Highland Dr. ♦ Auburn, ME 04210 ♦ 63. </address></center> 64. 65. </body> 66. 67. </html> HTML: Any help is appreciated.
You can nest a ul inside another ul, but the nested ul should be within a li Here is an example using the code posted above: <ul> <li>Main Stick <ul> <li>Weight: 7 oz.</li> <li>Length: 24 inches</li> <li>Tape: Dura-Coat® finish with laser-style color choices</li> </ul> </li> </ul> <ul> <li>Handle Sticks (one pair) <ul> <li>Weight: 2 oz.</li> <li>Length: 18 inches</li> <li>Tape: Soft ivory tape with rubber core</li> </ul> </li> </ul> HTML: Other than that, it all looks good.
Why the <blockquote>? Whom are you quoting? If you want the indentation, use a <div>, the non-semantic, aggregating container, and give it the 40px lateral margins. Mark those statements as <p>s, rather than using <br />s to insert linefeeds. Or, you could mark the block as a list, giving <ul> the lateral margins. cheers, gary
Thank you very much. That fixed it. I am following a book and thats what they told me. Whats the difference? Im doing this from a book and thats what I was told to use.
Then, the book is wrong. A blockquote is for an extended quotation. Its child elements may only be block elements. Raw text, as you have is invalid. <p> elements are block level, as is a list. So your book led you to use semantically wrong elements and to do so with invalid markup. Sorry, you got a crap book. Will you please post its name and author so we can specifically recommend against others buying it? cheers, gary