Reply to Re: Why is here no wc3 validation error?

Your name:

Reply:


Posted by dorayme on 06/02/07 16:51

In article <f3s640$kfn$1@online.de>,
Benjamin Niemann <pink@odahoda.de> wrote:

> Hello,
>
> Knut Krueger wrote:
> > why is the code reported as valid?
> > IE and Opera will display nothing without the > after the link
> >
> > Regards Knut
> >
> > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
> > "http://www.w3.org/TR/html4/strict.dtd">
> > <html>
> > <head>
> > <meta content="text/html; charset=windows-1252" http-equiv="content-type"
> > >
> >
> > <title>image problem</title>
> > </head>
> > <body>
> > <div>
> > <A HREF="http://www.w3.org" <img
> > src="http://www.w3.org/Icons/WWW/w3c_home_nb" alt="wc3"/> </A>
> > </div>
> >
> > </body>
> > </html>
>
> The '<A ... ' followed by '<img ...' is a so-called 'unclosed start-tag'
> [1], which is valid SGML syntax, but not supported by 'tag-soup' parsers
> found in browsers.
> There's also a XMLish '<img .. />' tag in there, which is valid in this
> context, but - when parser by the SGML rules - not what you want, though
> tag-soup parsers treat it the way you want it. '<img .. />' equals '<img ..
> >>' where the second '>' is parsed as character data. Tag-soup parsers
> probably treat the '/' as a syntax error which is silently ignored.
>
> Reporting such things is beyond the scope of a markup validator, though it
> may be of great help for web authors.
>

BBedit text editor reports

Unencoded entity found; "<" needs to be encoded as "&lt;".

Document type doesn't permit empty XML element; "<img/>".

Close element "</a>" found but element wasn't open.

The iCab browser, which refuses to show anything on the page at
all, reports:

HTML error (12/57): The attribute "<IMG" in tag <A> is not
allowed.
HTML error (12/57): The attribute "SRC" in tag <A> is not allowed.
HTML error (12/57): The attribute "ALT" in tag <A> is not allowed.
HTML error (12/57): Illegal character "/" in tag.

Opera refuses too.

Safari happily displays the logo, so too does the innocent and
good old Mac IE 5

--
dorayme

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация