htmlnewbie23 Posted July 20, 2007 Share Posted July 20, 2007 I am sorry to bother the group, but I have spent hours trying everything I can think of but cannot resolve why the W3 validator does not like my <ul> placements. I've cleaned the page of 161 errors ! (mostly nesting errors) but these last 2 have me stomped. I pasted them into a separate html page and tested it separately (in case I had some unclosed tags) but get the same errors. I've added <li>, <br>, etc., nothing works. Why does the validator say: 1. Line 28 column 41: document type does not allow element "UL" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag.2. Line 38 column 41: document type does not allow element "UL" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag.This is the part of the code it does not like. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> <title> testing </title> </head> <body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080" alink="#ff0000"> <br> <a href="http://sites.huji.ac.il/archives/" target="new"> Name of place </a> . text.... <br> <ul style="list-style-type:none"> <li> <i> text .... <br> ONE <br> <ul style="list-style-type:none"> <li> text .... <br> text </li> </ul> TWO <br> <ul style="list-style-type:none"> <li> text <br> text <br> text </li> </ul> </i> </ul> <br> The <B> text .... </B> text .... <a href="http://www.library.ualberta.ca/" target="new"> link .... </a> . <BR> <ul style="list-style-type:none"> <li> <i> text .... </i> </li> </ul> <br> <b> text .... </b> , <br> </body></html> Link to comment Share on other sites More sharing options...
vchris Posted July 20, 2007 Share Posted July 20, 2007 What DTD does the validator indicate you are using? Link to comment Share on other sites More sharing options...
htmlnewbie23 Posted July 20, 2007 Author Share Posted July 20, 2007 What DTD does the validator indicate you are using?I am not sure what DTD means. Here is what the validator has at the top of the page:Fri Jul 20 13:29:40 2007Server: Microsoft-IIS/5.0Size: 1483Content-Type: text/htmlEncoding: iso-8859-1 (detect automatically)Doctype: HTML 4.01 Transitional (detect automatically)Does this help? Link to comment Share on other sites More sharing options...
vchris Posted July 20, 2007 Share Posted July 20, 2007 Yes it helped.The problem is your <i> element in your first <ul> and then is closed at the end. You should do this: <li><i>text</i></li> for each instead. I validated and no more errors. Link to comment Share on other sites More sharing options...
htmlnewbie23 Posted July 20, 2007 Author Share Posted July 20, 2007 Yes it helped.The problem is your <i> element in your first <ul> and then is closed at the end. You should do this: <li><i>text</i></li> for each instead. I validated and no more errors.Thank you so much. You have no idea how many different things I tried before asking. I was ready to tear my hair out - not that I have that many to spare <grin>.Thanks again. I'm learning! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.