W3c Problems

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hi  I am trying to make a start with writing a w3c website. Most of
there documentation required chopping down a rainforest and so is
unreadable. I have taken ideas from sites like Microsoft and I can't
even get a simple hello mom page to pass.

My page   http://www.des-otoole.co.uk/w3c/ fails with   http://validator.w3.org /
Line 8 column 6: end tag for element "HEAD" which is not open.
Line 10 column 5: document type does not allow element "BODY" here.
But even the Microsoft.com also fails. Can anyone tell me why this
simplest of code should fail with the above errors.

If I can make a starting point it would help.



Re: W3c Problems

Quoted text here. Click to load it

Try removing the '/' from the end of the META element.  XHTML needs the
'/' but HTML doesn't.


Re: W3c Problems

Desmond wrote:

Quoted text here. Click to load it

Microsoft web pages are not a good example.

Quoted text here. Click to load it

New pages should be HTML 4.01 Strict. You are not "Transitioning" from
any old legacy pages.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd ">

If "menu.js" is to ultimately be the page's menu, consider that visitors
with JavaScript disabled, unavailable, or stripped by a corporate
firewall, your page will be completely unnavigable. Put the menu in the
HTML and style it with the style sheet.

You have   <div id=help>   in your page, but no reference to that id in
your style sheet.  Should be:   <div id="help">

<LINK href="menu.css" type=text rel=stylesheet>
should be
<link href="menu.css" type="text/css" rel="stylesheet">

Your "contact.gif" is not in a container.  <p>, <div>, etc.

   -Motorcycles defy gravity; cars just suck

Re: W3c Problems

Desmond wrote :
Quoted text here. Click to load it

There are tutorials available which are for beginners and intermediate

Quoted text here. Click to load it

I do not recommend any Microsoft webpages or tutorials on web authoring.

Quoted text here. Click to load it

Some recommendations on your webpage:

1- always quote attribute value: you'll save yourself problems that way.
Example given:
   <SCRIPT src="menu.js" type=text/javascript></SCRIPT>
   <LINK href="menu.css" type=text rel=stylesheet>

should be

   <SCRIPT src="menu.js" type="text/javascript"></SCRIPT>
   <LINK href="menu.css" type="text/css" rel="stylesheet">
(note that it is type="text/css" and not type="text")

Recommendation: attribute values should always be quoted in HTML

Recommendation: Always define the width and height attributes for <img>

Defining image width and height helps speed up rendering as the browser
knows how much space to allocate a particular area (image placeholder)
while parsing and rendering the page. Otherwise, the browser has to wait
until the graphic is loaded before it knows where to put anything below
or to the right of the graphic. The browser may need to rearrange the
page as the images are downloaded. When it does, the visitor sees a
reflow, a shift in the page layout. So,

<img src="Contact.gif" alt="My alternate text.">

should be

<img src="Contact.gif" width="133" height="79" alt="Contact me">

Generally speaking, PNG is more compact than GIF images.

"PNG also compresses better than GIF in almost every case (5% to 25% in
typical cases)."
W3C Quality Assurance tip for webmasters:

fails with   http://validator.w3.org /
Quoted text here. Click to load it

Bookmark this page and look for links and given resources:

Using Web Standards in your Web Pages

For beginners, I recommend these resources:

Web design resources: Learning, tips, CSS page templates, tutorials

Quoted text here. Click to load it

Microsoft is the worse example to follow when it comes to W3C web
standards compliance, W3C web standards respect in their own
microsoft.com webpages.

"New webpages and new content which are added almost everyday at
microsoft.com never pass (markup and/or CSS) validation tests. The irony
is to see Microsoft webpages promoting IE 7 with slogan such as "We
heard you" which still fails to trigger standards compliant rendering
mode in IE 6 and IE 7, which fails to pass markup validation by a large
margin and fails to pass CSS validation. It's no wonder why Microsoft is
persistently perceived by web authors and web standards advocate groups
as the main problem, the incurable negligent, the stubborn careless, the
repeated offender who never changes for the better."

Can anyone tell me why this
Quoted text here. Click to load it

Starting point:

1- I recommend the tutorials, articles and resources given here:

W3C Quality Assurance tip for webmasters:
http://www.w3.org/QA/Tips /
Although I must point out that some of these tip may be difficult to

3- Web Authoring FAQ
http://www.htmlhelp.com/faq/html /

4- As mentioned by B. Shagnasty, I recommend you use HTML 4.01 strict;
the tutorial given by
Mark Tranchant HTML tutorial
http://tranchant.plus.com/web/html-tutorial /
will help you on this

5- I recommend to start coding with an advanced text editor (must have
syntax highlighting, possibility of page template, must be for source
code editing [HTML and CSS]). There are several which are free and




6- Drop IE6 and start using Firefox or Opera 9.20
so that you can use Web authoring and Web developer add-on extensions

https://addons.mozilla.org /

http://dev.opera.com /

http://developer.mozilla.org/en/docs/Main_Page (still in beta)

Also excellent HTML and CSS tutorials (for intermediate users)
How to create by Mark "Tarquin" Wilton-Jones
http://www.howtocreate.co.uk /

8- Most important: don't despair and enjoy creating webpages. Never
forget this.

Quoted text here. Click to load it

Using Web Standards in your Web Pages (Updated Dec. 2006)

Site Timeline