Forum Moderators: open

Message Too Old, No Replies

Rant: w3c Validation: SHORTTAG

typo generates a warning , not an error

         

lavazza

11:18 pm on Jun 6, 2008 (gmt 0)

10+ Year Member



<rant>
This Page Is Valid HTML 4.01 Strict!
Result: Passed validation, 1 warning(s)

Validation Output: 1 Warning
Line 437, Column 44: unclosed start-tag requires SHORTTAG YES.
alt="lorem ipsum"</a>

The construct <foo<bar> is valid in HTML (it is an example of the rather obscure “Shorttags” feature) but its use is not recommended. In most cases, this is a typo that you will want to fix. If you really want to use shorttags, be aware that they are not well implemented by browsers.

Example of what generates a 'warning':
<p><a href="http://www.example.com" title="lorem"><img src="dir/file.ext" alt="lorem"</a></p>

Q: Huh? Why/how could this ever be anything other than an error?

Peeve:
The 'green square' icon (for "This Page Is Valid HTML 4.01 Strict!") is displayed in the tab... it was only by chance that I looked at the actual page and glimpsed the warning

</rant>

[edited for typos] <erm/>

Receptional Andy

12:06 am on Jun 7, 2008 (gmt 0)



I agree wholeheartedly. The same principle has been applied to the CSS validator. It's as if the W3C hired a marketer ;)

lavazza

12:37 am on Jun 7, 2008 (gmt 0)

10+ Year Member



Whatever the reasons for regarding that as 'valid', I would - if I could figure out how/where - suggest to the w3c that they invest in a new orange icon to supplement the red and green

And maybe a blue one, too, for pages such as [validator.w3.org...]

Receptional Andy

12:41 am on Jun 7, 2008 (gmt 0)



I know where you're coming from, lavazza, but I don't think colours are the issue. My opinion is that the w3c are just making it easier for everyone to validate, and I'm not a fan of this at all. It means errors like the one you mentioned are ignored.

lavazza

12:48 am on Jun 7, 2008 (gmt 0)

10+ Year Member



It's not just the w3c...

WDG's validator (http://www.htmlhelp.com/tools/validator/) 'agrees':

Document Checked

* URL: http://www.example.com./filename.html
* Character encoding: UTF-8
* Level of HTML: HTML 4.01 Strict

Errors and Warnings

* Line 437, character 45:

... go: logo-150-years-as-a-city"</a>
^

Warning: unclosed start-tag

[edited by: lavazza at 12:50 am (utc) on June 7, 2008]

encyclo

12:50 am on Jun 7, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The 'green square' icon (for "This Page Is Valid HTML 4.01 Strict!") is displayed in the tab

What else could they display? It is valid HTML, so logically they cannot mark it as an error.

The only question is over how they display a "valid with warnings".

lavazza

1:09 am on Jun 7, 2008 (gmt 0)

10+ Year Member



Orange?

Not good
Not bad
Not too sweet
Not too sour

:)