HTML - Help Validating Code On My Page
Hi there,
On one of the pages of my website i'm getting a few errors from the validator, all of them problems with the table i'm using. Here are some of the errors... Quote: Line 81 column 51: there is no attribute "align". <td><table width="99%" border="0" align="left" cellpadding="1" cellspacing="2"> Quote: Line 83 column 24: there is no attribute "width". <td width="99%" height="13" valign="top" bgcolor="#DDDDDD"><table Would really appreciate any help offered Thanks. Matt Similar TutorialsThis peace of code is the only part of my page not validating. <style type="text/css" media="screen"> #header { background: url("http://SITEADDRESS.com/img/header2.jpg") no-repeat bottom center; } </style> How can I get it to validate? Well hi there, I've been altering and adding to my website over the last few months, and I've decided it's almost complete. I decided to try and make what was already complete w3c compliant (using the w3c validator), and I've hit a tree. This is involves my index.html which uses frames. Well after I discovered that I must set the doctype to HTML frameset, there were two remaining errors which I could not resolve. I have spent ages googling but I haven't found much useful. here are the errors Quote: Line 15, Column 6: end tag for element "HEAD" which is not open. </head> The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem. If this error occurred in a script section of your document, you should probably read this FAQ entry. Line 16, Column 5: document type does not allow element "BODY" here. <body> The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed). One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error). Here is my index.html (yes I know I used loads of br's): Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> <meta http-equiv="Content-Language" content="EN-GB"> <link rel="stylesheet" type="text/css" href="theme.css"> <title>Revelations of the Ancients</title> <frameset cols="16%,84%"> <frameset rows="80%,20%"> <frame name="sect" id="sect" src="sections.html"> <frame name="val" id="val" src="val.html"> </frameset> <frame name="main" id="main" src="home.html"> </frameset> </head> <body> <center> <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br> <p>Revelations of the Ancients is a game made with the X-Realms engine.<br> Affiliate site: <a href="http://www.newworlddynasty.com/">www.newworlddynasty.com</a></p> <h1><u>News</u></h1> <p>17.12.07: People who want to play the game once it enters <b>open beta stage</b> view this thread <a href="http://rota.freeforums.org/viewtopic.php?p=10#10"target="_blank">here</a>!</p> <b><a href="news.html">View all news</a></b> </center> </body> </html> Hi, Im really new to this site and to HTML in general. I am having trouble validating this page and would greatly appreciate some help. I am attaching the text file if anyone can help. Thanks in advance. Yes, I have read the sticky but am still a little stuck. Damn, am I needy or what? Could someone tell me why my code is not validating. HTML Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>Welcome to Streams of Dreams Fly Shop - NJ's premier fly fishing source!</title> <style type="text/css"> #wrapper {margin: 0px auto; padding: 0px; width: 850px; text-align: center; } #banner {width: 850px; height: 135px; } #banner img {width: 850px; height: 135px; } #menuh {width: 850px; height: 21px; } #menuh ul{margin-left: 0px; padding-left: 0px; list-style: none; float: left; } #menuh ul li{float: left; width: 100%; } #menuh a {height: 1%; font: bold 0.7em/1.4em arial, sans-serif; } #menuh-container { position: center; top: 0; left: 0; width: 850px; } #menuh { font-size: small; font-family: arial, helvetica, sans-serif; width:100%; float:left; margin:0; margin-top: 0; } #menuh a { text-align: center; display: block; border: 1px solid #555; white-space: nowrap; margin: 0; padding: 0.3em; } #menuh a:link, #menuh a:visited, #menuh a:active /* menu at rest */ { color: white; background-color: #003459; text-decoration: none; } #menuh a:hover /* menu at mouse-over */ { color: white; background-color: cornflowerblue; text-decoration: none; } #menuh a.top_parent, #menuh a.top_parent:hover /* attaches down-arrow to all top-parents */ { background-image: url(navdown_white.gif); background-position: right center; background-repeat: no-repeat; } #menuh a.parent, #menuh a.parent:hover /* attaches side-arrow to all parents */ { background-image: url(nav_white.gif); background-position: right center; background-repeat: no-repeat; } #menuh ul { list-style: none; margin: 0; padding: 0; float: left; width: 94.4px; /* width of all menu boxes */ } #menuh li { position: relative; min-height: 1px; /* Sophie Dennis contribution for IE7 */ vertical-align: bottom; /* Sophie Dennis contribution for IE7 */ } #menuh ul ul { position: absolute; z-index: 500; top: auto; display: none; padding: 0; margin: 0; } #menuh ul ul ul { top:0; left:100%; } div#menuh li:hover { cursor: pointer; z-index: 100; } div#menuh li:hover ul ul, div#menuh li li:hover ul ul, div#menuh li li li:hover ul ul, div#menuh li li li li:hover ul ul {display: none;} div#menuh li:hover ul, div#menuh li li:hover ul, div#menuh li li li:hover ul, div#menuh li li li li:hover ul {display: block;} #content1 {width: 850px; height: 20px; vertical-align: top; } #content2 {width: 850px; height: 306px; vertical-align: top; } #content3 {width: 850px; height: 250px; vertical-align: top; } #copyrite {width: 850px; height: 72px; } #copyrite img {width: 850; height: 72px; } .style1 {color: #663333} </style> </head> <body> <div id="wrapper"> <div id="banner"> <img src="Images/Banners/nwbanner.jpg" alt="nwbanner" width="850" height="144" /></div> <div id="menuh-container"> <div id="menuh"> <ul> <li><a href="#" class="top_parent">Home</a> </ul> <ul> <li><a href="#" class="top_parent">Fly Shop</a> <ul> <li><a href="#" class="parent">Rods</a> <ul> <li><a href="#">Thomas and Thomas</a></li> <li><a href="#">Scott</a></li> <li><a href="#">Beulah</a></li> <li><a href="#">Temple Fork</a></li> </ul> </li> <li><a href="#" class="parent">Reels</a> <ul> <li><a href="#">Abel</a></li> <li><a href="#">Mako</a></li> <li><a href="#">Saracione</a></li> <li><a href="#">Hatch</a></li> </ul> </li> <li><a href="#" class="parent">Waders</a> <ul> <li><a href="#">Dan Bailey</a></li> <li><a href="#">Chota</a></li> <li><a href="#">Hodgman</a></li> <li><a href="#">Patagonia</a></li> </ul> </li> <li><a href="#" class="parent">Wading Shoes</a> <ul> <li><a href="#">Chota</a></li> <li><a href="#">Patagonia</a></li> <li><a href="#">Hodgman</a></li> <li><a href="#">Simms</a></li> </ul> </li> <li><a href="#" class="parent">Accessories</a> <ul> <li><a href="#">Fly Lines</a></li> <li><a href="#">Fly Boxes</a></li> <li><a href="#">Nets</a></li> <li><a href="#">Clothing</a></li> </ul> </li> </ul> </li> </ul> <ul> <li><a href="#" >Photos</a> </ul> <ul> <li><a href="#" >Destinations</a> </ul> <ul> <li><a href="#" >Events</a> </ul> <ul> <li><a href="#" >Lessons</a> </ul> <ul> <li><a href="#" >Spey</a> </ul> <ul> <li><a href="#" >Bios</a> </ul> <ul> <li><a href="#" >Contact Us</a> </ul> </div> <!-- end the menuh-container div --> </div> <!-- end the menuh div --> <div id="content1"></div> <div id="content2"></div> <div id="content3"></div> <div id="copyrite"><img src="Images/Banners/copyrightbar.jpg" alt="CopywriteBar" /></div> </div> </body> </html> I need to make sure my site is validated with XHTML but i don't think Dreamweaver is doing it right. I made one page and it said it was all good but i left some span tags open. It never mentioned that though. So how do i validate in Dreamweaver against XHTML? Where do i check what it validates against? In the Validate menu it says "If no DOCTYPE is detected, validate against" then has a list of HTML 2, 3, 4, XHTML 1..etc Does that mean i need to remove the DOCTYPE that's in the code or just make sure it's the right one I'm validating againt? Thanks for any help. whats wrong here? its been bugging me for ages!!! Code: <script> function Blank_TextField_Validator() { // Check the value of the element named visitor_name // from the form named my_form if (my_form.visitor_name.value == "") { // If null display and alert box alert("Please fill in the text field."); // Place the cursor on the field for revision text_form.text_name.focus(); // return false to stop further processing return (false); } // If text_name is not null continue processing return (true); } </script> <form id="my_form" action="#" name="my_form"> <p>Please enter your name:</p> <input type="text" name="visitor_name" id="visitor_name" /> <input type="submit" value="Submit" /> </form> Hello everyone, I'm new here and need a little help. I'm getting two errors on my validate and was hoping someone can see something I'm not seeing. I'm new to xhtml/html so any help I would be very grateful. Here are the two errors Code: Error Line 209, Column 33: document type does not allow element "ul" here; assuming missing "li" start-tag <ul class="children"> ✉ Error Line 248, Column 15: end tag for "li" omitted, but OMITTAG NO was specified </ol><!-- /end msgs-list --> ✉ You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">". Info Line 209, Column 13: start tag was here <ul class="children"> and here is the code HTML Code: <ol class="msgs-list"> <li> <div class="msg-entry"> <div class="author"> <p><a href="#">Author Name</a></p> <p>Posted: 01-01-11<span class="sep">12:41</span></p> </div> <div class="msg-body"> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p> </div> </div> </li> <ul class="children"> (LINE 209) <li> <div class="msg-entry"> <div class="author"> <p><a href="#">Author Name</a></p> <p>Posted: 01-01-11<span class="sep">12:41</span></p> </div> <div class="msg-body"> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p> </div> </div> </li> </ul> <ul class="children"> <li> <div class="msg-entry"> <div class="author"> <p><a href="#">Author Name</a></p> <p>Posted: 01-01-11<span class="sep">12:41</span></p> </div> <div class="msg-body"> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p> </div> </div> </li> </ul> <ul class="children"> <li> <div class="msg-entry"> <div class="author"> <p><a href="#">Author Name</a></p> <p>Posted: 01-01-11<span class="sep">12:41</span></p> </div> <div class="msg-body"> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p> </div> </div> </li> </ul> </ol><!-- /end msgs-list -->(LINE 248) Many thanks I am setting up a newsletter.I have validated it and have this one annoying error. document type does not allow element "P" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag Now, I dont want to use css since as im not sure how many email programs will pick it up..so to be safe im using just the basic font tag system. I get the above error from this example. <font face="Verdana, Arial, Helvetica, sans-serif" size="2"> <P>Testing testing </> </font> I also tried putting a style in the body but the outlook doesnt pick it up,well mine anyways since its outlook 2000. any advice thanks Hi, Just a quick post here to ask for some help. My website (http://www.anewtake.com/ted) which I am making, works fine in Safari and Chrome. However, it does not work quite in Firefox: the top bar, where it says 'welcome' is placed too far over to the right. I'm not sure whether it works in IE7 or IE8, because it won't install on my computer! And I'm not bothered about IE6 because it's just old. So my question is; can anyone help me with getting this page to work in Firefox and validate? Thanks, Ted Hi I have a problem with rev= tag that wont validate. I am using Lightbox on the first 2 images on my webpage http://www.colletts.co.uk/colletts_n..._holidays.html where the caption on the lightbox image is linked to the relevant page with a rev link. This however doesn't verify 'Line 100, Column 120: character "/" is not allowed in the value of attribute "rev".' Does anyone know a way around this or should I just drop the link? Whadyareckon HTML Code: <a href="lightbox/via_ferrata_dolomites_tofana.jpg" rel="lightbox" title="Via Ferrata in the Dolomites" rev="http://www.colletts.co.uk/via_ferrata_and_klettersteig.html"> <img src="http://www.colletts.co.uk/images/via_ferrata_dolomites_italy.jpg" alt="Via Ferrata in the Dolomites" width="238" height="314" class="rpadding" longdesc="http://www.colletts.co.uk/images/via_ferrata_dolomites_italy.jpg"/> <form method="post" enctype="text/plain" action="mailto:paradox@hotmail.com"> <table cellpadding="10"> <tr> <td class="style4">Full name:</td> <td colspan="2"><br><input type="text" name="first" size="30"></td> </tr> <tr> <td class="style4">Company name:</td> <td colspan="2"><input type="text" name="surname" size="30"></td> </tr> <tr> <td class="style4">Email address:</td> <td colspan="2"><input type="text" name="sender" size="30"></td> </tr> <tr> <td class="style4">Phone number:</td> <td colspan="2"><input type="text" name="phone" size="30"></td> </tr> <tr> <td class="style4">I prefer contact by:</td> <td><input type="radio" name="contactpreference" value="email"><span class="style4">Email</span></td> <td><input type="radio" name="contactpreference" value="phone"><span class="style4">Phone</span></td> </tr> <tr> <td class="style4">Service of Interest:</td> <td colspan="2"> <select name="q" size="1"> <option>Anatomy Web design and development</option> <option>Anatomy E-learning</option> <option>Anatomy Graphics</option> <option>Anatomy Flash</option> </select> </td> </tr> <td class="style4">Comments/Feedback</td> <td colspan="2"><br><textarea cols=40 name="Comments" rows="6"></textarea></td> <tr> <td id="botton" colspan="3"><input type="reset" value="Reset"><input type="submit" value="Submit"></td> </tr> </table> </form> I am finishing up a section of my site and I am validating it now and correcting all the areas. I have one section that I am having problems with and not sure how to correct... http://www.mesquitechristmas.com/loc...action=promote FYI, I am aware of the error at the top. This is a restricted page so I removed the session so it can be made viewable by the general public. This is the error I am getting.... http://validator.w3.org/check?uri=ht...idator%2F1.591 The second error is because of the first, so how do I go about fixing the first error so it will validate. Tidy is no help and I can not find any information on how to correct this. -Thanks hello i can't get my web page to display a picture from picture folder i have to use notepad its for my college assignments. anyone have any ideas what i'm doing wrong? I'd like to display code in my page such as java/c#/html etc. like PHP Code: import java.applet.Applet; import java.awt.Graphics; public class HelloWorld extends Applet { public void paint(Graphics g) { g.drawString("Hello world!", 50, 25); } } In other words I need the php tag functionality. How to? Thanks A site I work for is using a habbo fansite forum. There using a rare values system by Bobboid. (Project Rare Value) But the page that the forum users are meant to see (with the values on) is completely blank. The system has a CP. Ive been given admin so i can fix it. But the source code is giving me no clues as to whats wrong! Heres the code for the CP. (when you add a value) Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Bobboid Rare Values</title> <link rel="stylesheet" HREF="style.css" TYPE="text/css" media="screen"></head> <body> <div id="main"> <p><img src="banner.png" width="500" height="175" /></p> <div id="navigator"> <p><strong>Navigator</strong></p> <p><br /> <a href="admin_home.php">Home</a><br /> <a href="admin_password.php">Change Password</a><br /> <a href="admin_logout.php">Logout</a><br /> <a href="admin_editrarevalues.php"><br /> Edit Rare Values</a><br /> <a href="admin_editseasonalvalues.php">Edit Seasonal Values</a><br /> <a href="admin_editsupervalues.php">Edit Super Rare Values</a><br /> <a href="admin_editbankvalues.php">Edit Bank Item Values</a> </a><br /> <a href="admin_editseasonalvalues.php">Edit Other Rare Values</a><br /> <br /> <br /> <a href="admin_addrare.php">Add Rare</a><br /> <a href="admin_editrare.php">Edit/Delete Rare</a><br /> <a href="admin_viewhistory.php">View History </a><br /> <br /> <br /> <br /> <a href="admin_adduser.php">Add User</a><br /> <a href="admin_removeuser.php">Remove User</a><br /> <a href="admin_edituser.php">Edit User</a><br /> <br /> <br /> <br /></p> <p> </p> </div> <div id="content"> <p><strong>Add a Rare </strong></p> <form id="form1" name="form1" method="post" action=""> <label><em><strong>Details</strong></em><br /> <br /> Rare Name <input name="name" type="text" id="name" /> </label> <br /> <label>Rare Type <select name="type" id="type"> <option value="rare">Rare</option> <option value="seasonal">Seasonal</option> <option value="super">Super Rare</option> <option value="bank">Bank</option> <option value="other">Other</option> </select> And heres the code for the page that the forum users are meant to see the values and that on: PHP Code: Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"></HEAD> <BODY></BODY> <META content=ORTNQESHAF name=SKYPE_FRAMEID></HTML> Are there any clues as to how i can rebuild the code for that page? Because someone has deleted it! Please help il find some way to thank you! I'm new to HTML and I need help with posting up c++ code. I have very bland formatting for code in my blog. I need to be able to post up c++ code like in this guy's Blog Or like this guys site Notice how the c++ code is formatted nicely to show line numbers and colors. What tags or techniques does one use to get this kind of formatting? |