October 4, 200818 yr Hi, I've been working on a site for something to do and I have come up with a problem, http://www.alternativestuff.co.uk/cakes/index.html does not validate, I do not know why and i cant think of a way of fixing it, can someone please tell me how it is done?
October 4, 200818 yr It's very easy to validate your particular website. Go here: http://validator.w3.org/check?verbose=1&am...es%2Findex.html Now scroll down and it will tell you what the problems are. Go to each file and edit them, then re-upload them. It's mostly quotes you missed after an attribute. Example, your code looks like this: <img src=#" Rather than: <img src="#" Notice the quotes. Have fun, Meshach
October 4, 200818 yr Author oh rite ... now try and validate http://www.alternativestuff.co.uk/cakes/contact.php .. now there is a challenge. I looked at the code and all the quotation marks are fine, all there and everything.. still not validating.
October 4, 200818 yr oh rite ... now try and validate http://www.alternativestuff.co.uk/cakes/contact.php .. now there is a challenge. I looked at the code and all the quotation marks are fine, all there and everything.. still not validating. You need to make sure all your tags are properly closed/opened. Example: <p>Lorem Ipsum</p> <p>Lorem Ipsum<p> *Notice the closing slash.
October 4, 200818 yr Author I have been web designing for 2 years and do know all of that, all of those are closed and everything I have noticed works fine :S Although there maybe some in the contact.php page as I took the script from a tutorial, but the index is perfectly marked up, just look at the script.
October 4, 200818 yr I have been web designing for 2 years and do know all of that, all of those are closed and everything I have noticed works fine :S Although there maybe some in the contact.php page as I took the script from a tutorial, but the index is perfectly marked up, just look at the script. This should validate your contact page <!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>Cakes R Us | Contact</title> <link href="assets/contact.css" rel="stylesheet" type="text/css" media="screen" /> </head> <body> <div id="Nav"><a href="index.html"><img src="assets/PageParts/homebut.gif" alt="Home button" /></a><a href="gallery.html"><img src="assets/PageParts/gallerybut.gif" alt="Cake Gallery Button" /></a><a href="contact.php"><img src="assets/PageParts/contactbut.gif" alt="Contact Button" /></a></div> <div id="Header"><p></p></div> <div id="cont"> <div id="main"> <p>If you would like to get in contact with Cakes R Us, please fill out this easy form and we will get back to you as soon as possible. </p> <form id="feedback" method="post" action=""> <p> <label for="name">Name: </label> <input name="name" id="name" type="text" class="formbox" /> </p> <p> <label for="email">Email: </label> <input name="email" id="email" type="text" class="formbox" /> </p> <p> <label for="comments">Message: </label> <textarea name="comments" id="comments" cols="60" rows="8"></textarea> </p> <p> <input name="send" id="send" type="submit" value="Send message" class="button" /> </p> </form> </div> <div id="ftr"> <p> Made By Luke Day</p> </div> </div> </body> </html> you had one <p> open when it dhouldnt be and a </p> where ot shouldnt be Pat EDIT: your index page wont validate as the embed tag is deprecated in xhtml, to sort it look here http://wordpress.jdwebdev.com/blog/embed-x...ompliant-flash/
October 4, 200818 yr Most decent code editors have validation tools that can help you identify any errors in your code - have a look at your editor to see if it has them - they can be a great help in weeding out stuff like this
October 4, 200818 yr I use the firefox extension HTML Validator. It shows an icon in the bottom right hand corner of the browser telling you if the page is valid or not. If it's not, simply double click the icon and it will tell you what you've done wrong. Dan
October 4, 200818 yr You also have an emtpy <p> tag in your header on line 13 - this isn't accepted by W3C.
October 4, 200818 yr Author Doing that to the contacts page gets rid of the php so there will be no verification, like if you dont enter something in a field or have an incorrect email address.. i want it to verify !! This should validate your contact page <!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>Cakes R Us | Contact</title> <link href="assets/contact.css" rel="stylesheet" type="text/css" media="screen" /> </head> <body> <div id="Nav"><a href="index.html"><img src="assets/PageParts/homebut.gif" alt="Home button" /></a><a href="gallery.html"><img src="assets/PageParts/gallerybut.gif" alt="Cake Gallery Button" /></a><a href="contact.php"><img src="assets/PageParts/contactbut.gif" alt="Contact Button" /></a></div> <div id="Header"><p></p></div> <div id="cont"> <div id="main"> <p>If you would like to get in contact with Cakes R Us, please fill out this easy form and we will get back to you as soon as possible. </p> <form id="feedback" method="post" action=""> <p> <label for="name">Name: </label> <input name="name" id="name" type="text" class="formbox" /> </p> <p> <label for="email">Email: </label> <input name="email" id="email" type="text" class="formbox" /> </p> <p> <label for="comments">Message: </label> <textarea name="comments" id="comments" cols="60" rows="8"></textarea> </p> <p> <input name="send" id="send" type="submit" value="Send message" class="button" /> </p> </form> </div> <div id="ftr"> <p> Made By Luke Day</p> </div> </div> </body> </html> you had one <p> open when it dhouldnt be and a </p> where ot shouldnt be Pat EDIT: your index page wont validate as the embed tag is deprecated in xhtml, to sort it look here http://wordpress.jdwebdev.com/blog/embed-x...ompliant-flash/
October 4, 200818 yr Doing that to the contacts page gets rid of the php so there will be no verification, like if you dont enter something in a field or have an incorrect email address.. i want it to verify !! How does removing a <p> tag ged rid of your php Pat
October 4, 200818 yr I think he's reffering to the quote he put under his post. For future reference, place a post quote above your own
October 4, 200818 yr Author Yeh sorry about that i noticed it after I had posted it. And im going through the code now to see if i can fix it.. cheers.
October 5, 200818 yr Author I change to code to the one in the tutorial someone gave above but it still did not validate, what is the correct code you are meant to use to embed swf objects?
October 5, 200818 yr An example of a valid swf embed: <embed src="player.swf" width="300" height="300" allowscriptaccess="always" allowfullscreen="true" flashvars="file=playlist.xml&autostart=true"/>
October 5, 200818 yr An example of a valid swf embed: <embed src="player.swf" width="300" height="300" allowscriptaccess="always" allowfullscreen="true" flashvars="file=playlist.xml&autostart=true"/> With that bit of code alone and nothing else on the page you get 10 errors on validation when validating to xhtml transitional (the doctype they are using) Reason why it isn't valid to use embed: Its was created for Netscape as their method of embedding plugins into their browser. As such it is not really a tag and not part of XHTML, so the use of any <embed> tag when using a xhtml doctype will never ever validate. Here is a bit of code that will validate: <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,22,0" width="1000" height="1000"> <param name="movie" value="NAME.SWF" /> <param name="quality" value="high" /> <!--[if !IE]> <--> <object data="NAME.SWF" width="1000" height="1000" type="application/x-shockwave-flash"> <param name="quality" value="high" /> <param name="pluginurl" value="http://www.macromedia.com/go/getflashplayer" /> </object> <!--> <![endif]--> </object> Change the widths and heights to the right size and change NAME.SWF to your file. note that all of these are repeated twice in the code.
Create an account or sign in to comment