HTML 4.01 Schema in VS2005

F

Fred Chateau

Is there a problem with the HTML 4.01 schema in Visual Studio 2005?

When I set the target schema for validation to HTML 4.01, I receive closing
tag errors.

Example:
Validation (HTML 4.01): Empty elements such as 'meta' must end with />.

I do not believe that is the correct validation. Empty elements in HTML 4.01
should not contain closing tags. Am I mistaken?
 
J

Juan T. Llibre

re:
Empty elements in HTML 4.01 should not contain closing tags. Am I mistaken?

Not all elements are subject to that.

http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.2.1

Some HTML element types allow authors to omit end tags (e.g., the P and LI element types).
The HTML DTD indicates for each element type whether the end tag is required.

Some HTML element types have no content.

For example, the line break element BR has no content; its only role is to terminate a line of text.
Such empty elements never have end tags.

The Meta element, however, needs end tags because it should never be an empty element.
 
F

Fred Chateau

Juan T. Llibre said:
For example, the line break element BR has no content; its only role is to
terminate a line of text.
Such empty elements never have end tags.

Thank you. I thought that was the case.

My point still is that VS 2005 HTML 4.01 validation is requiring ALL tags to
be closed, including break tags and image tags, in a manner similar to XHTML
1.1 validation.

Is it my installation or is this schema incorrect? (I am using VS 2005
Standard Edition with SP-1.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top