Html/css validation question


#1

My index.html contains:

oodways

oodways logo

This fails validation at validator.w3.org, the validator does not like the second " in:


The error message is:

[i]an attribute value literal can occur in an attribute specification list only after a VI delimiter.

Have you forgotten the “equal” sign marking the separation between the attribute and its declared value? Typical syntax is attribute=“value”.[/i]
It looks right to me…

For completeness, the base.css file contains:
#header
{
border : 1px solid red;
width : 700px;
background : #f00;
}

This does validate at the jigsaw.w3 validator.

Any insights on what is wrong?

Second question: Why does all of my nicely indented code end up left-justified in the preview for this post?

TIA,
Rudy


#2

I’m seeing a missing double-quote on this line: <link rel="stylesheet" href="base.css" type="text/css[color=#CC0000][b]"[/b][/color]>Also, you should remove the trailing slash from your element, because you are using HTML 4 (not XHTML). If you want code to look nice, wrap it in [pre] tags.


si-blog | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]


#3

Thanks! That missing quote was the problem.

I now close this thread with the obligatory “Doh!”

Regards,
Rudy


#4

question: if I set DOCTYPE in a html page, will it look exactly the same in IE6 and IE7 and Firefox 1.5 and Firefox 2.0, ect.

I’m currently working on a freelance and have too many problems with CSS. (I did not set DOCTYPE :P)

Save $97 with promo code: [color=#CC0000]97YES Sign Up NOW[/color]


#5

[quote]question: if I set DOCTYPE in a html page, will it look exactly the same in IE6 and IE7 and Firefox 1.5 and Firefox 2.0, ect.

I’m currently working on a freelance and have too many problems with CSS. (I did not set DOCTYPE[/quote]
It is almost completely impossible to get a website to look the same on all browsers. There is too much ambiguity in the W3C specs for all the browser manufacturers to do things exactly the same. The main browsers have been reasonably consistent in the way they do things over the last few years, particularly when using a full and accurate DOCTYPE declaration (which triggers “standards mode”).

The best approach is to remove all the browser default CSS and then explicitly set what you want.


si-blog | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]


#6

thanks for the info scjessey.

I’m just tired of the margins and paddings.

Save $97 with promo code: [color=#CC0000]97YES Sign Up NOW[/color]