This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 26010 - HTML 4.01 validator dos not recognize as valid a page with nothing in the body
Summary: HTML 4.01 validator dos not recognize as valid a page with nothing in the body
Status: RESOLVED WONTFIX
Alias: None
Product: Validator
Classification: Unclassified
Component: check (show other bugs)
Version: HEAD
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-07 16:39 UTC by Aldemar Calazans Filho
Modified: 2015-08-23 07:21 UTC (History)
1 user (show)

See Also:


Attachments

Description Aldemar Calazans Filho 2014-06-07 16:39:40 UTC
If you upload the following (and correct) template to the validator, it will give you an error:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">
<html>
 <head>
  <title>A 4.01 Strict standard template</title>
  <meta http-equiv="content-type" content="text/html;charset=utf-8">
 </head>
 <body>

 </body>
</html>

The problem does not occur if you "fill" it with anything, for instance, an empty paragraph, as follows:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">
<html>
 <head>
  <title>A 4.01 Strict standard template</title>
  <meta http-equiv="content-type" content="text/html;charset=utf-8">
 </head>
 <body>
  <p></p>
 </body>
</html>
Comment 1 Michael[tm] Smith 2015-08-23 07:21:17 UTC
HTML4 didn't allow the body element to be empty. Regardless, current document should just use <!DOCTYPE html>