Re: Site broken

2013-04-09 18:14, Thijm Post wrote:

> I have a Joomla site, www.vandambouwcoordinatie.nl
> <http://www.vandambouwcoordinatie.nl>. When I run the w3 validator, I
> get a lot of errors. But how is that possible with a standard Joomla? Is
> the validator allright or is my site broken?

The page has invalid markup. Whether that matters is a different issue. 
Generally, software used to generate web pages is more or less broken. 
But I cannot tell whether it's Joomla or the way it has been used that 
causes the problem.

Let's see. The page declares XHTML 1.0 Transitional, which is a bit 
questionable. But first of all, some of the syntax used on the page is 
not XHTML syntax at all. Some empty tags do not follow XHTML rules; e.g.
<meta name="robots" content="index, follow">
(which is a rather useless tag: it just expresses the default)
must be have the magic "/" in XHTML:
<meta name="robots" content="index, follow" />

Among the 19 Errors (yes, the validator oddly capitalizes "Errors"), 
there are 2 errors of this type. They don't really matter, since the 
page is server as text/html, so browsers don't care about any XHTML rules.

Then there are errors caused by placing a link element and a style 
element inside body. They should be inside the head element. This 
doesn't matter in practice (browsers are permissive), but there is no 
reason not to fix this if you can. It helps to see the real errors when 
get rid of things like this.

Some img tags have a rel attribute for some odd reason. It looks like 
some HTML generator gone all wrong. Browsers ignore such attributes, but 
this looks like a symptom of something being wrong in the process of 
generating pages.

Then there are img elements that lack alt attribute. This is serious, 
though not for most users - generally just handicapped people, or people 
who use special browsing modes for other reasons. Fixing this can be 
very trivial (once you understand the idea of alt), or very tricky. It 
depends on the image and its purpose (role).

There's one error about missing src attribute in img. This must be an 
oversight: what would it mean to embed an image without saying where it 
should be taken from?

The error message about missing type attribute in <script> is just a 
formality. It does not matter anything real. But to silence the 
validator, you can insert type="text/javascript".

There are error messages says "document type does not allow element 'a' 
here" or something similar. This can be just about anything, but in this 
case, it's caused by tags in JavaScript code inside <script>. This is a 
formal nuisance, and the official advice is to put scripts into an 
external file (when using XHTML 1.0), see
http://www.w3.org/TR/xhtml1/#C_4

Finally, there are errors messages about multiply-defined ID attributes. 
This is generally serious and should be fixed. If such attributes are 
used, the effects are unpredictable. An ID value must be unique within a 
document; that's the very essence of ID.

Yucca

Received on Tuesday, 9 April 2013 16:37:59 UTC