homepage Welcome to WebmasterWorld Guest from 54.145.183.169
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
Getting HTML to Validate - script and meta tags
Everything in the head seems to be invalid
yasunglass

10+ Year Member



 
Msg#: 3969 posted 11:42 pm on Dec 13, 2002 (gmt 0)

Hi,
When I check my page using NetMechancis software, i get this warring message. What is worng with this script?

0015:<Meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
0016:[1]^<script language="JavaScript">
----:[1]^Warning: tag <script> missing required attribute "type". Click here to learn more
----:[1]^Hint: use "type" attribute with "language" attribute
0017:<!--

 

jdMorgan

WebmasterWorld Senior Member jdmorgan us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3969 posted 12:09 am on Dec 14, 2002 (gmt 0)

yasunglass,

Add a type to <script language="JavaScript"> and a space in front of charset :

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">

Jim

pageoneresults

WebmasterWorld Senior Member pageoneresults us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3969 posted 12:23 am on Dec 14, 2002 (gmt 0)

jdMorgan, you can actually trim out the language tag as it is now deprecated in favor of this...

<script type="text/javascript">

yasunglass

10+ Year Member



 
Msg#: 3969 posted 12:31 am on Dec 14, 2002 (gmt 0)

Thanks Jim,

here is the big one,

<body bgcolor="#FFFFFF" text="#000000"
^leftmargin="0" [2]^topmargin="0" [3]^marginwidth="0" [4]^marginheight="0"
onLoad="MM_preloadImages('pictures/buttonsover_01.gif','pictures/newover_01.gif',
'pictures/newover_02.gif','pictures/newover_03.gif','pictures/newover_04.gif',
'pictures/newover_05.gif')">

----:[1]^Warning: <body> proprietary attribute "leftmargin".
Click here to learn more
----:[1]^NOTE: "leftmargin" with <body> is compatible with all selected browsers.
Click here for Browser Compatibility report

----:[2]^Warning: <body> proprietary attribute "topmargin".
Click here to learn more
----:[2]^NOTE: "topmargin" with <body> is compatible with all selected browsers.
Click here for Browser Compatibility report

----:[3]^Error: unsupported attribute "marginwidth" for tag <body>.
Click here to learn more
----:[3]^NOTE: "marginwidth" with <body> is NOT compatible with all selected browsers.
Click here for Browser Compatibility report

----:[4]^Error: unsupported attribute "marginheight" for tag <body>.
Click here to learn more
----:[4]^NOTE: "marginheight" with <body> is NOT compatible with all selected browsers.
Click here for Browser Compatibility

[1][edited by: tedster at 2:39 am (utc) on Dec. 14, 2002]
[edit reason] stop horizontal scroll [/edit]

jdMorgan

WebmasterWorld Senior Member jdmorgan us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3969 posted 2:08 am on Dec 14, 2002 (gmt 0)

yasunglass,
Yeah, I get those too. I ignore them. This is the result of the fact that IE and Netscape use different methods to control the margins. You can use CSS to do the same thing in order to eliminate the error, but that depends on whether you want to take the time to change the site over to CSS.

pageoneresults,
Thanks! Does leaving out the language declaration affect older browsers like NN4.x?

Jim

pageoneresults

WebmasterWorld Senior Member pageoneresults us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3969 posted 2:21 am on Dec 14, 2002 (gmt 0)

Does leaving out the language declaration affect older browsers like NN4.x?

Not that I'm aware of. I test regularly with NN4.78 and have not seen any issues with my javascript. I don't utilize any hard core javascript so I cannot accurately answer that question.

In regards to the above error with margins, if you are using css, here is the solution. Strip everything you can from that <body> tag. I usually just end up with my onload event in the <body>.

body {
position:absolute;
top:0px;
left:0px;
margin:0px;
padding:0px;
}

yasunglass

10+ Year Member



 
Msg#: 3969 posted 6:39 am on Dec 14, 2002 (gmt 0)

Thanks again,

I don't know where i went wrong on this one. please help again


0004:<Meta name=”description” content=”Need (1)^help (2)^building (3)^search (4)^engines (5)^friendly (6)^web (7)^site?”>

----:(1)^Error: unknown attribute "help" for tag <meta>. Click here to learn more
----:(1)^NOTE: "help" with <meta> is NOT compatible with all selected browsers. Click here for Browser Compatibility report
----:(2)^Error: unknown attribute "building" for tag <meta>. Click here to learn more
----:(2)^NOTE: "building" with <meta> is NOT compatible with all selected browsers. Click here for Browser Compatibility report----:

... and so on, right through every word in the description meta tag.

[edited by: tedster at 3:29 pm (utc) on Dec. 15, 2002]

jdMorgan

WebmasterWorld Senior Member jdmorgan us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3969 posted 6:58 am on Dec 14, 2002 (gmt 0)

yasunglass,

1) It looks like you may be using the wrong quote character - Try editing your page with a simple text editor like NotePad and make sure you are not using special left double quote and right double quote symbols. It could also be a declared-versus-actual character set problem. Compare to this sample:
<meta name="Description" content="The finest in fuzzy blue widgets for all occasions.">

2) Very often, a single problem or error will cause a cascade of error reports. That is what is happening here. Don't worry about the number of problems, just look for the first possible cause of the problem.

Jim

[edited by: tedster at 3:20 pm (utc) on Dec. 15, 2002]

g1smd

WebmasterWorld Senior Member g1smd us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3969 posted 7:56 pm on Dec 15, 2002 (gmt 0)

I can confirm the above problem as being with the use of SmartQuotes. Use normal double-quote marks and that error will be fixed. The W3C validator would have given errors saying that characters &#145; and &#146; are not allowed in HTML documents; neither are any of the other characters near these.

Another error that I see quite regularly, but not here, is the use of an XHTML-style closing slash "/" inside tags, being incorrectly used in an HTML document, especially on META tags, like:

<head>
<meta name="Description" content=" Your Description Here. " />
<meta name="...

This has the unfortunate effect that the first slash "/" encountered after <head> is interpreted as </head><body> so giving errors for the rest of the meta tags within the head section, as they are now seen to be within the <body> section. Further errors are then given for the real </head> and <body> tags, as these are now flagged as being duplicates.

You can test this by taking a validated HTML 4.01 web page, adding the extra / on an early META tag in the list, then revalidating the page using the service at [validator.w3.org...] , noting the new error list, as well as inspecting the Parse Tree with the now misplaced and additional tags.

[edited by: g1smd at 10:21 pm (utc) on Dec. 15, 2002]

yasunglass

10+ Year Member



 
Msg#: 3969 posted 10:04 pm on Dec 15, 2002 (gmt 0)

Thanks for all your help. I fixed the problem. The problem was using the qoutaion mark. when you look at it, it looks real qoutation. But it wasn't, I guess. I went ahead and re-typed it and the problem is fixed.

An other issue is with the characters. I get the following, "Found an invalid entity "&#149;". Characters between 128 and 159 (inclusive) are reserved for control characters in the standard Internet character sets" Could I replace it with <b><li></b>?

benwalsh

10+ Year Member



 
Msg#: 3969 posted 2:51 pm on Dec 30, 2002 (gmt 0)

<SPAN buttonType="LeftNav" CLASS="LeftNavOff"> does not validate any suggestions
<snip>
Happy new year

[edited by: korkus2000 at 3:32 pm (utc) on Dec. 30, 2002]
[edit reason] TOS 13 and 21 [/edit]

g1smd

WebmasterWorld Senior Member g1smd us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3969 posted 9:47 pm on Dec 30, 2002 (gmt 0)

What was the actual error message for that line?

choster

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 3969 posted 10:59 pm on Dec 30, 2002 (gmt 0)

@yasunglass:

I don't think that code would be valid. A list item is an HTML element that makes sense only within the context of a list (i.e. ul or ol), and you wouldn't boldface it any more than a margin or horizontal rule.

For 4th generation and newer browsers, &#8226 should work for a bullet or &#183 for a small bullet ("middle dot"). You could also use an image.

@benwalsh: buttonType is not a valid attribute for <span>.

[edited by: choster at 11:11 pm (utc) on Dec. 30, 2002]

Brett_Tabke

WebmasterWorld Administrator brett_tabke us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3969 posted 11:06 pm on Dec 30, 2002 (gmt 0)

Compare it to other validators like the official one at the W3C.ORG.

yasunglass

10+ Year Member



 
Msg#: 3969 posted 12:00 am on Dec 31, 2002 (gmt 0)

W3C.ORG suggests &=8226. However, the page validator i use doesn't recogonize &=8226. It gives me an Error message.
Yasunglass

tedster

WebmasterWorld Senior Member tedster us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3969 posted 12:20 am on Dec 31, 2002 (gmt 0)

Two things - first, make sure you have a
# and not a =

Second, you must end the character code with a ;

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved