By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,136 Members | 1,267 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,136 IT Pros & Developers. It's quick & easy.

Need some help with validating

P: n/a
Hello,
After trying to validate this page for a couple of days now I was
wondering if someone might be able to help me out. Below is a list of
snippets where I am having the errors.
1. Line 334, column 13: there is no attribute "SRC"
<bgsound src="C:\My Documents\zingwent.mids">
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.
?
2. Line 334, column 44: element "BGSOUND" undefined
<bgsound src="C:\My Documents\zingwent.mids">
You have used the element named above in your document, but the document
type you are using does not define an element of that name. 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 "Frameset" document type to get the
"<frameset>" element), or by using vendor proprietary extensions such as
"<spacer>" or "<marquee>" (this is usually fixed by using CSS to achieve the
desired effect instead).
?
3. Line 444, column 13: there is no attribute "NAME"
<ilayer name="waves34i"><div id="waves34"><img src="wavesanim.gif"
alt="animated
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.
?
4. Line 444, column 23: element "ILAYER" undefined
<ilayer name="waves34i"><div id="waves34"><img src="wavesanim.gif"
alt="animated
You have used the element named above in your document, but the document
type you are using does not define an element of that name. 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 "Frameset" document type to get the
"<frameset>" element), or by using vendor proprietary extensions such as
"<spacer>" or "<marquee>" (this is usually fixed by using CSS to achieve the
desired effect instead).
?
5. Line 448, column 7: required attribute "TYPE" not specified
<script>printdate();</script>
The attribute given above is required for an element that you've used, but
you have omitted it. For instance, in most HTML and XHTML document types the
"type" attribute is required on the "script" element and the "alt" attribute
is required for the "img" element.
Typical values for type are type="text/css" for <style> and
type="text/javascript" for <script>.
?
6. Line 452, column 29: document type does not allow element "P" here;
missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag
World Wide Web.<P> I am the webmaster of this site and
The mentioned element is not allowed to appear in the context in which
you've placed it; the other mentioned elements are the only ones that are
both allowed there and can contain the element mentioned. This might mean
that you need a containing element, or possibly that you've forgotten to
close a previous element.
One possible cause for this message is that you have attempted to put a
block-level element (such as "<p>" or "<table>") inside an inline element
(such as "<a>", "<span>", or "<font>").
?
7. Line 459, column 14: document type does not allow element "P" here;
missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag
<P>After you have browsed through my site please sign my guestbook
The mentioned element is not allowed to appear in the context in which
you've placed it; the other mentioned elements are the only ones that are
both allowed there and can contain the element mentioned. This might mean
that you need a containing element, or possibly that you've forgotten to
close a previous element.
One possible cause for this message is that you have attempted to put a
block-level element (such as "<p>" or "<table>") inside an inline element
(such as "<a>", "<span>", or "<font>").
?
Source Listing
Below is the source input I used for this validation:
1: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
2: <html>
3: <head>
4: <title>test </title>
334: <bgsound src="C:\My Documents\test.mids">
444: <ilayer name="waves34i"><div id="waves34"><img src="wavesanim.gif"
alt="animatedwaves"></div></ilayer>
448: <script>printdate();</script>
451: <span class="contpara">test the
452: World Wide Web.<P> test
456: <A href="http://www.test">test
457: test</A> and getting a lot of acknowledgements from others
458: here is what I have to show which I hope you like.</P>
459: <P>After you have browsed through my site please sign my
guestbook
460: </span>
472: </body>
473: </html>

thanks you for your time
Jul 20 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
mike wrote:
1. Line 334, column 13: there is no attribute "SRC"
<bgsound src="C:\My Documents\zingwent.mids">
This error may also result if the element itself is not supported in the
document type you are using,
2. Line 334, column 44: element "BGSOUND" undefined
<bgsound src="C:\My Documents\zingwent.mids">
There is no <bgsound> in HTML. Try http://w3.org/TR/html4/ to check this
sort of thing in future.

For generic media, use <object>. For background sound - remember that there
is no such thing on the web - only intrusive forground noise.
3. Line 444, column 13: there is no attribute "NAME"
<ilayer name="waves34i"><div id="waves34">
4. Line 444, column 23: element "ILAYER" undefined
<ilayer name="waves34i">
ilayer is a Netscape 4 ism. Almost nobody uses Netscape 4 and no other
browser supports it. It, like bgsound, is not part of any version of HTML.
5. Line 448, column 7: required attribute "TYPE" not specified
<script>printdate();</script>
The attribute given above is required for an element that you've used, but
you have omitted it. For instance, in most HTML and XHTML document types
the "type" attribute is required on the "script" element and the "alt"
attribute is required for the "img" element.
Typical values for type are type="text/css" for <style> and
type="text/javascript" for <script>.
?
It gives you an example in the error message!
6. Line 452, column 29: document type does not allow element "P" here;


You can't put a block, like a paragraph, inside an inline element, like a
span. You probably want div instead of spam.
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 20 '05 #2

P: n/a
On Sun, 08 Aug 2004 17:58:28 GMT, mike <nogood@.invalid> wrote:
After trying to validate this page for a couple of days now I was
wondering if someone might be able to help me out. Below is a list of
snippets where I am having the errors.
...
1. Line 334, column 13: there is no attribute "SRC"
<bgsound src="C:\My Documents\zingwent.mids">
...
2. Line 334, column 44: element "BGSOUND" undefined
<bgsound src="C:\My Documents\zingwent.mids">
There is no element bgsound in HTML. It's a proprietary element, not part
of the specs. See http://www.htmlhelp.com/design/dtd/customdtd.html for a
method of creating your own custom DTD which will allow this to validate.
3. Line 444, column 13: there is no attribute "NAME"
<ilayer name="waves34i"><div id="waves34"><img src="wavesanim.gif"
alt="animated
...
4. Line 444, column 23: element "ILAYER" undefined
<ilayer name="waves34i"><div id="waves34"><img src="wavesanim.gif"
alt="animated
Same here. A Netscape invention.
5. Line 448, column 7: required attribute "TYPE" not specified
<script>printdate();</script>
See http://www.w3.org/TR/html401/interac...ml#edef-SCRIPT - the
type attribute must be stated. <script type="text/javascript"> perhaps.

BTW, the previous link is to the actual specs of HTML 4. You'd do well to
familiarize yourself with this series of documents.
6. Line 452, column 29: document type does not allow element "P" here;
missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag
World Wide Web.<P> I am the webmaster of this site and
...
7. Line 459, column 14: document type does not allow element "P" here;
missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag
<P>After you have browsed through my site please sign my guestbook
Per your code:
451: <span class="contpara">test the
452: World Wide Web.<P> test
456: <A href="http://www.test">test
457: test</A> and getting a lot of acknowledgements from
others
458: here is what I have to show which I hope you like.</P>
459: <P>After you have browsed through my site please sign my
guestbook
460: </span>


span is inline, it cannot contain p. You likely meant to use div instead;
it can legally contain p.
Jul 20 '05 #3

P: n/a
"mike" <nogood@.invalid> wrote in
news:8R******************@newsread2.news.pas.earth link.net:
Hello,
After trying to validate this page for a couple of days now I was
wondering if someone might be able to help me out. Below is a list of
snippets where I am having the errors.
1. Line 334, column 13: there is no attribute "SRC"
<bgsound src="C:\My Documents\zingwent.mids">
The BGSOUND element doesn't exist in HTML. It is something that was
invented by very special browsers, like IE. You shouldn't have
background sound running automatically anyway -- if visitors wanted to
hear music, they'd click a link that you supply. You should just delete
the element all-together.

In this instance, the validator sees the src attribute and asks, "does
the BGSOUND element have a SRC attribute?", and then discovers that it
can't find the BGSOUND element.
2. Line 334, column 44: element "BGSOUND" undefined
<bgsound src="C:\My Documents\zingwent.mids">
Ditto.
3. Line 444, column 13: there is no attribute "NAME"
<ilayer name="waves34i"><div id="waves34"><img src="wavesanim.gif"
alt="animated
Again, there is no such element as an "ilayer," you are using imaginary
HTML invented by very special browsers. It doesn't work everywhere, so
it's a terrible idea to use it.
4. Line 444, column 23: element "ILAYER" undefined
<ilayer name="waves34i"><div id="waves34"><img src="wavesanim.gif"
alt="animated
Ditto.
5. Line 448, column 7: required attribute "TYPE" not specified
<script>printdate();</script>
What language is the script in? I don't know. Well, I'm just kidding --
I do know, but browsers might not know unless you tell them. You should
include the attribute type="text/javascript" in your starting tag. But
do your visitors really need you to tell them what the date is?
6. Line 452, column 29: document type does not allow element "P" here;
missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag
World Wide Web.<P> I am the webmaster of this site and
You have a P element inside a SPAN element. However, P is block-level
and SPAN is inline, and you cannot nest block-level elements inside
inline elements.
7. Line 459, column 14: document type does not allow element "P" here;
missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag
<P>After you have browsed through my site please sign my guestbook


Ditto.
One important thing about HTML is nesting - text-level elements (i.e.
SPAN, EM, STRONG, B, I, CODE) should be nested inside the block-level
elements (i.e. P, PRE, H1, H2).

By the way (don't take this as an insult), your page seems to be the
cliché of how to make a terrible homepage. I say this because you have
bgsound, proprietary layers, begging that people sign your guestbook,
superfluous animated GIFs (but you used ALT attributes which is good!),
and I'd imagine that you have a poor-contrast background image as well.

You might want to read this friendly document:
<http://www.cs.tut.fi/~jkorpela/coolhome.html>
--
In a room with thirty-seven people, never have everybody shake each
other's hand.
Jul 20 '05 #4

P: n/a
David Dorward <do*****@yahoo.com> wrote:
You probably want div instead of spam.


spam{display:none}

CSS3 perhaps?

--
Spartanicus
Jul 20 '05 #5

P: n/a
Neal wrote:
There is no element bgsound in HTML. It's a proprietary element, not
part of the specs. See http://www.htmlhelp.com/design/dtd/customdtd.html
for a method of creating your own custom DTD which will allow this to
validate.


I don't recommend that you even consider doing that. The problem with
proprietary elements is not only that they do not validate, but that
they have not been standardised and cannot be interoperably implemented
(without backwards engineering an existing implementation) in all UAs.
Generally, there's no point in using proprietary elements and
attributes; most, if not all, are presentational and the same effect can
usually be accomplished with CSS.

In the case of <bgsound>, there is no standardised method of doing
this yet (though there *may* be in CSS3 [1]), but it *must* be the
user's decision to play the sound, not the authors. It is possible to
embed an object, such as a Flash movie that has sound. But if you do
this, then add a play button so the user can start it manually. DO NOT
start it automatically when the page loads.

[1] http://www.w3.org/Style/CSS/current-work#audio
--
Lachlan Hunt
http://www.lachy.id.au/

Please direct all spam to ab***@127.0.0.1
Thank you.
Jul 20 '05 #6

P: n/a
Subject: Need some help with validating
From: "mike" nogood@.invalid
Date: 8/8/2004 12:58 PM Central Standard Time
Message-id: <8R******************@newsread2.news.pas.earthlink .net>

Hello,
After trying to validate this page for a couple of days now I was
wondering if someone might be able to help me out. Below is a list of
snippets where I am having the errors.
1. Line 334, column 13: there is no attribute "SRC"
<bgsound src="C:\My Documents\zingwent.mids">
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.
?
2. Line 334, column 44: element "BGSOUND" undefined
<bgsound src="C:\My Documents\zingwent.mids">
You have used the element named above in your document, but the document
type you are using does not define an element of that name. 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 "Frameset" document type to get the
"<frameset>" element), or by using vendor proprietary extensions such as
"<spacer>" or "<marquee>" (this is usually fixed by using CSS to achieve the
desired effect instead).
?
3. Line 444, column 13: there is no attribute "NAME"
<ilayer name="waves34i"><div id="waves34">[]<div id="waves34">[]" element),
or by using vendor proprietary extensions such as
"<spacer>" or "<marquee>" (this is usually fixed by using CSS to achieve the
desired effect instead).
?
5. Line 448, column 7: required attribute "TYPE" not specified
<script>printdate();</script>
The attribute given above is required for an element that you've used, but
you have omitted it. For instance, in most HTML and XHTML document types the
"type" attribute is required on the "script" element and the "alt" attribute
is required for the "img" element.
Typical values for type are type="text/css" for <style> and
type="text/javascript" for <script>.
?
6. Line 452, column 29: document type does not allow element "P" here;
missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag
World Wide Web.
I am the webmaster of this site and
The mentioned element is not allowed to appear in the context in which
you've placed it; the other mentioned elements are the only ones that are
both allowed there and can contain the element mentioned. This might mean
that you need a containing element, or possibly that you've forgotten to
close a previous element.
One possible cause for this message is that you have attempted to put a
block-level element (such as "
" or "<table>") inside an inline element
(such as "", "<span>", or "").
?
7. Line 459, column 14: document type does not allow element "P" here;
missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag

After you have browsed through my site please sign my guestbook
The mentioned element is not allowed to appear in the context in which
you've placed it; the other mentioned elements are the only ones that are
both allowed there and can contain the element mentioned. This might mean
that you need a containing element, or possibly that you've forgotten to
close a previous element.
One possible cause for this message is that you have attempted to put a
block-level element (such as "
" or "<table>") inside an inline element
(such as "", "<span>", or "").
?
Source Listing
Below is the source input I used for this validation:
1: 2: 3: <head> 4: <title>test </title>334: <bgsound src="C:\My
Documents\test.mids">444: <ilayer name="waves34i"><div
id="waves34">[]</div></ilayer>448: <script>printdate();</script>451:
<span class="contpara">test the452: World Wide Web.
test456: test457: test and getting a lot of
acknowledgements from others458: here is what I have to show
which I hope you like.459:
After you have browsed through my site please sign myguestbook460:
</span>472: 473:

thanks you for your time


Subject: Need some help with validating
From: "mike" nogood@.invalid
Date: 8/8/2004 12:58 PM Central Standard Time
Message-id: <8R******************@newsread2.news.pas.earthlink .net>

Hello,
After trying to validate this page for a couple of days now I was
wondering if someone might be able to help me out. Below is a list of
snippets where I am having the errors.
1. Line 334, column 13: there is no attribute "SRC"
<bgsound src="C:\My Documents\zingwent.mids">
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.
?
2. Line 334, column 44: element "BGSOUND" undefined
<bgsound src="C:\My Documents\zingwent.mids">
You have used the element named above in your document, but the document
type you are using does not define an element of that name. 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 "Frameset" document type to get the
"<frameset>" element), or by using vendor proprietary extensions such as
"<spacer>" or "<marquee>" (this is usually fixed by using CSS to achieve the
desired effect instead).
?
3. Line 444, column 13: there is no attribute "NAME"
<ilayer name="waves34i"><div id="waves34">[]<div id="waves34">[]" element),
or by using vendor proprietary extensions such as
"<spacer>" or "<marquee>" (this is usually fixed by using CSS to achieve the
desired effect instead).
?
5. Line 448, column 7: required attribute "TYPE" not specified
<script>printdate();</script>
The attribute given above is required for an element that you've used, but
you have omitted it. For instance, in most HTML and XHTML document types the
"type" attribute is required on the "script" element and the "alt" attribute
is required for the "img" element.
Typical values for type are type="text/css" for <style> and
type="text/javascript" for <script>.
?
6. Line 452, column 29: document type does not allow element "P" here;
missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag
World Wide Web.
I am the webmaster of this site and
The mentioned element is not allowed to appear in the context in which
you've placed it; the other mentioned elements are the only ones that are
both allowed there and can contain the element mentioned. This might mean
that you need a containing element, or possibly that you've forgotten to
close a previous element.
One possible cause for this message is that you have attempted to put a
block-level element (such as "
" or "<table>") inside an inline element
(such as "", "<span>", or "").
?
7. Line 459, column 14: document type does not allow element "P" here;
missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag

After you have browsed through my site please sign my guestbook
The mentioned element is not allowed to appear in the context in which
you've placed it; the other mentioned elements are the only ones that are
both allowed there and can contain the element mentioned. This might mean
that you need a containing element, or possibly that you've forgotten to
close a previous element.
One possible cause for this message is that you have attempted to put a
block-level element (such as "
" or "<table>") inside an inline element
(such as "", "<span>", or "").
?
Source Listing
Below is the source input I used for this validation:
1: 2: 3: <head> 4: <title>test </title>334: <bgsound src="C:\My
Documents\test.mids">444: <ilayer name="waves34i"><div
id="waves34">[]</div></ilayer>448: <script>printdate();</script>451:
<span class="contpara">test the452: World Wide Web.
test456: test457: test and getting a lot of
acknowledgements from others458: here is what I have to show
which I hope you like.459:
After you have browsed through my site please sign myguestbook460:
</span>472: 473:

thanks you for your time



Jul 23 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.