September 2, 201115 yr Have just run my page through a validator and it came up with about 60 errors. Most of them seem to be relating to < > = " erors like this are appearing end tag for "p" omitted, but OMITTAG NO was specified document type does not allow element "p" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag character "<" is the first character of a delimiter but occurred as data are these common errors and is there anyway to fix them??
September 2, 201115 yr If you read carefully, it is saying that you're using the "p" tag incorrectly. Can we see the code that you have, and what doctype you are using?
September 2, 201115 yr Author thanks. Im still very new to building websites so don't always understand the jargon. I got rid of most of my errors but the two im stuck with are:- there is no attribute "src" <embed src="http://www.youtube.com/watch?v=VtxuU_F5Ab0?f=videos&app=youtube… there is no attribute "wmode"…"application/x-shockwave-flash" wmode="transparent" width="310" height="227"><… there is no attribute "type"…?f=videos&app=youtube_gdata" type="application/x-shockwave-flash" wmode="t… there is no attribute "width"…cation/x-shockwave-flash" wmode="transparent" width="310" height="227"></embed> there is no attribute "height"…cation/x-shockwave-flash" wmode="transparent" width="310" height="227"></embed> element "embed" undefined… cation/x-shockwave-flash" wmode="transparent" width="310" height="227"></embed> I have specified different CSS files for IE and other browsers and this is also throwing up errors. character "<" is the first character of a delimiter but occurred as data <!–-[if IE]><link rel="stylesheet" type="text/css" href="style-ie.css" /><![end… character data is not allowed here <!–-[if IE]><link rel="stylesheet" type="text/css" href="style-ie.css" /><![end "endif" is not a reserved name… f IE]><link rel="stylesheet" type="text/css" href="style-ie.css" /><![endif]-–> "if" is not a reserved name <![if !IE]><link rel="stylesheet" type="text/css" href="style.css" /><![endif]> "endif" is not a reserved name <![if !IE]><link rel="stylesheet" type="text/css" href="style.css" /><![endif]>
September 3, 201115 yr Also check your doc type at the beginning at your html to make sure it is correct.
September 3, 201115 yr I suggest you use a transitional doctype, if it's strict/intermediate you are going to have to use stricter methods of coding, and a more "correct" coding structure. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> this may solve the errors, if it doesn't the meaning "attribute" is something like "src" or "href" etc. and the validation checker says that they are invalid this means you can't use it.
September 4, 201115 yr Sometimes it's daunting seeing so many errors in your validation, but what you may find is that if you've missed a closing tag, it ripples through your code. Usually fixing the first error sorts this and your error count drops significantly
September 4, 201115 yr i wouldn't suggest using a transitional doctype because then you will be probably be using deprecated elements and not learning how to code properly. stick with a strict one and whittle down the errors
September 4, 201115 yr I suggest you use a transitional doctype, if it's strict/intermediate you are going to have to use stricter methods of coding, and a more "correct" coding structure. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> this may solve the errors, if it doesn't the meaning "attribute" is something like "src" or "href" etc. and the validation checker says that they are invalid this means you can't use it. I, personally, would be using the HTML5 DocType: <!DOCTYPE HTML> Get this in there now and start learning how HTML5 works so you can future proof your site. No point creating a site that will be outdated within a year and have the potential to fail on various browsers.
September 4, 201115 yr thanks. Im still very new to building websites so don't always understand the jargon. I got rid of most of my errors but the two im stuck with are:- there is no attribute "src" <embed src="http://www.youtube.com/watch?v=VtxuU_F5Ab0?f=videos&app=youtube… there is no attribute "wmode"…"application/x-shockwave-flash" wmode="transparent" width="310" height="227"><… there is no attribute "type"…?f=videos&app=youtube_gdata" type="application/x-shockwave-flash" wmode="t… there is no attribute "width"…cation/x-shockwave-flash" wmode="transparent" width="310" height="227"></embed> there is no attribute "height"…cation/x-shockwave-flash" wmode="transparent" width="310" height="227"></embed> element "embed" undefined… cation/x-shockwave-flash" wmode="transparent" width="310" height="227"></embed> These errors are all caused because embed isn't part of the xhtml spec, and thus it's attributes aren't valid (one error, rippling through the document), instead you should be using object. <object type="application/x-shockwave-flash" style="width:425px; height:350px;" data="http://www.youtube.com/embed/cud_k9f6tqk"> <param name="movie" value="http://www.youtube.com/embed/cud_k9f6tqk" /> </object> I have specified different CSS files for IE and other browsers and this is also throwing up errors. character "<" is the first character of a delimiter but occurred as data <!–-[if IE]><link rel="stylesheet" type="text/css" href="style-ie.css" /><![end… For you're endif issues, i would have to see where/how you're placing them, but see this quick example I've taken from this guide and rewritten for xhtml validation. My guess would be that you are missing a tag from a former error, or that you not structuring your document correctly. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Test</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link href="all_browsers.css" rel="stylesheet" type="text/css" /> <!--[if IE]> <link href="ie_only.css" rel="stylesheet" type="text/css" /> <![endif]--> <!--[if lt IE 7]> <link href="ie_6_and_below.css" rel="stylesheet" type="text/css" /> <![endif]--> <!--[if !lt IE 7]><link href="recent.css" rel="stylesheet" type="text/css" /><![endif]--> <!--[if !IE]> <link href="not_ie.css" rel="stylesheet" type="text/css" /><![endif]--> </head> <body> <p>Test</p> </body> </html> You can run everything i've said here through the validator (xhtml strict) and you should get 0 errors. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Test</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link href="all_browsers.css" rel="stylesheet" type="text/css" /> <!--[if IE]> <link href="ie_only.css" rel="stylesheet" type="text/css" /> <![endif]--> <!--[if lt IE 7]> <link href="ie_6_and_below.css" rel="stylesheet" type="text/css" /> <![endif]--> <!--[if !lt IE 7]><link href="recent.css" rel="stylesheet" type="text/css" /><![endif]--> <!--[if !IE]> <link href="not_ie.css" rel="stylesheet" type="text/css" /><![endif]--> </head> <body> <div> <object type="application/x-shockwave-flash" style="width:425px; height:350px;" data="http://www.youtube.com/v/7_6B6vwE83U"> <param name="movie" value="http://www.youtube.com/v/7_6B6vwE83U" /> </object> </div> </body> </html> Edited September 4, 201115 yr by bocaj
Create an account or sign in to comment