Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Validation Errors.. quick help pls!

Featured Replies

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

oh rite :p... 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.

  • 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.

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/

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 :)

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

  • 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/

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

  • 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.

Youve not embedded your flash correctly.

 

Try googling swfobject.

  • 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?

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"/>

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.

  • Author

Oh rite, thanks Dizi :p Hope it works when i get the chance to add it.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.