I am validating my website and I have an attribute value error help

Error Line 30, Column 44: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified

… <li id=“outs”><a href= title=“Information about you”>P

i don’t quite understand what the validator means by this.

You have wrongly coded link:

<a href= title=“Information about you”>

It should be:

<a href=“http://whatever” title=“Information about you”>

<a href=“link” title=“Information about you”>

Does that work for you?

My rough (and probably quite wrong) translation:
an attribute value specification ~ eg. “string”
must be an attribute value literal ~ string in quotes – (maybe empty quotes are OK??)
unless SHORTTAG YES is specified ~ unended code syntax is allowed.

In other words, the equal sign is “starting” but then you start another before ending it.

<a href= title=“Information about you”>
Without a href and then it was not accepting it, I was not going to use it so I decided to take it out now it is not showing that error.

You will get that incredible error message when the attribute is empty or without quotes. Another example:

<td width=“81%” valign=“top” style=padding-top:20px;padding-left:20px;>

Will give you the same error because the padding is without quotes.

I had that <a> tags just to have it in there for display purposes but then it was causing an error and as I have said I have delete to avoid that. Later I might add some content to it.

Now is this error

Error Line 119, Column 12: Attribute “src” exists, but can not be used for this element.

<embed src=“videos/vaideoplayer4.swf” width=“380” height=“240”>


You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the “Strict” document type with a document that uses frames (e.g. you must use the “Transitional” document type to get the “target” attribute), or by using vendor proprietary extensions such as “marginheight” (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.

I am using the

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>

The transitional doctype they have refered in the first paragrahp but still this is displaying.

Any ideas? I have check on the emmbed property and it uses the attribute width and height without qoutations like


I took from http://www.htmlcodetutorial.com/embeddedobjects/_EMBED_WIDTH.html
i have changed to have not double quotes but then it would throw more errors.

mitinague you says that empty quotes would work and not throw the error?

I have deleted, I will try with empty quotes

The empty quotes did worked! now it is displaying the text i wanted and it is not throwing the error.

The standards-compliant way of embedding Flash is to use the <object> tag. <embed> is obsolete. Try it with the <object> tag.

Don’t get flustered. As the EMBED error says in how to fix, XHTML must be lower-case embed.

There is no such HTML tag as <embed> in any version of HTML. The equivalent of that proprietary tag if you want your HTML to validate is the HTML <object> tag.

<embed> is not part of the XHTML specification and will prevent your page from validating. It is used by Netscape and similar browsers for displaying Flash movies. Parameters are passed within the element as name/value attribute pairs.

The <embed> element was created by Netscape as their method of embedding plug ins and players in web pages. It’s not part of the XHTML specification, and while some browsers other than Netscape support it, it’s not standards-compliant, so it’s out :smiley:

the <object> tags were the problem.

The following error say I don’t have a doctype declaration Don’t get it.

Error Line 1, Column 1: no document type declaration; will parse without validation

<br />


The document type could not be determined, because the document had no correct DOCTYPE declaration. The document does not look like HTML, therefore automatic fallback could not be performed, and the document was only checked against basic markup syntax.

Learn how to add a doctype to your document from our FAQ, or use the validator’s Document Type option to validate your document against a specific Document Type.

the way I have it set up is as follows

<!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">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="text/css" href="stylesheets/main.css" rel="stylesheet" media="all" /> 
<script type="text/javascript" src="scripts/prototype.js"></script>
<script type="text/javascript" src="scripts/rating.js"></script>
<!--[if IE 5]><link rel="stylesheet" type="text/css" href="stylesheets/ie-5.0+5.5.css" /><![endif]-->
<!--[if IE 6]><link rel="stylesheet" type="text/css" href="stylesheets/ie-6.0.css" /><![endif]-->
<!--[if IE 7]><link rel="stylesheet" type="text/css" href="stylesheets/ie-7.0.css"/><![endif]-->
<!--[if IE 8]><link rel="stylesheet" type="text/css" href="stylesheets/ie-8.0.css"/><![endif]-->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
<script type="text/javascript">
  var default_image = $('td.largethumb img').attr('src');
  $('table.smallthumbs a').mouseover(function() { $('td.largethumb img').attr('src', $('img', this).attr('src')); });

coming back to the embed tags I have modified from as it was

<div id="videowrapper"> 
<fieldset class="videofield">
<object width="380" height="265">
<param name="movie" value="videoplayer5.swf"/>
<embed src="videos/vaideoplayer5.swf" width="380" height="240">

the code above was causing an error and you guys has suggested me to take out the embed tags. Well I have taken them out like

<div id="videowrapper"> 
<fieldset class="videofield">
<object width="380" height="265">
<param name="movie" value="videoplayer5.swf"/>
src="videos/vaideoplayer5.swf" width="380" height="240"

But then taking the embed tags I have realized that the video won’t display. I thought it was working because the browser was still loading as before but then when I closed it and re-load it again then it was not displaying the video. is there another way I should structure this? the param tags seems to have some kind of. Well some word of advice?

<object width="380" height="265">
<embed src="videos/vaideoplayer4.swf" width="380" height="240">

The above is working and I have realized the param tags are not needed but then the embed tags still in there and if I take them out then it won’t work.

This piece of code validates:

<div id="videowrapper"> 
<fieldset class="videofield">
<object width="380" height="265">
<param name="movie" value="videoplayer5.swf"/>

Does it load now?

Btw, XHTML validating errors should best be asked in the

(http://www.sitepoint.com/forums/forumdisplay.php?f=52) forum :D

but then it won’t display the video it needs the embed tag to display the video

See the html forum for following up :slight_smile: