NOTE: The current preferred location for bug reports is the GitHub issue tracker.
Bug 456 - <div/> gives an HTML4-only error
<div/> gives an HTML4-only error
Status: RESOLVED INTENTIONAL
Product: Validator.nu
Classification: Unclassified
Component: HTML parser
HEAD
All All
: P2 normal
Assigned To: Nobody
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-13 10:56 CET by Simon Pieters
Modified: 2015-04-01 09:20 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Pieters 2009-03-13 10:56:15 CET
Try

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

You get two errors:

Error: The /> syntax on void elements is not allowed. (This is an HTML4-only error.)

Error: Self-closing syntax (/>) used on a non-void HTML element. Ignoring the slash and treating as a start tag.