/    Sign up×
Community /Pin to ProfileBookmark

Weird. Check this out.

I have attached an file. Change this files extension to *.html and validate at [url]www.w3.org[/url]

It validates correctly! What is wrong with this?

[code]
<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>
<meta http-equiv=”Content-type” content=”text/html;
charset=iso-8859-1″>
<title/Unbelievable/
<TABLE width=”100%”>
<tr>
<td width=”20%”><h1/This/
Is<br>
All<br>
Legal!
</td>
<td width=”80%”>Does this look like valid HTML to you?
<p>Well, it is.
<a href=”http://validator.w3.org/check?
uri=http://my.ip.too.bad/w3c.html”>
Click to validate at the W3C.</a>
</td>
</tr>
</TABLE>
[/code]

to post a comment
HTML

5 Comments(s)

Copy linkTweet thisAlerts:
@StefanFeb 23.2003 — I'm guessing it is interpreting

<title/unbelivable/

as

<title />

But you should probably ask the W3C guys if it's really supposed to be like that (ie passing validation).
Copy linkTweet thisAlerts:
@Zach_ElfersauthorFeb 24.2003 — There aren't even any <html> tags or <head> or <body> tags. I'll contact W3C.
Copy linkTweet thisAlerts:
@StefanFeb 24.2003 — [i]Originally posted by Zach Elfers [/i]

[B]There aren't even any <html> tags or <head> or <body> tags. [/B][/QUOTE]


That is not a problem. All those 3 tags are OPTIONAL in HTML and can thus be left out.

Only when you move to XHTML do they become required.

The only things required in a HTML document is the doctype and a title.
Copy linkTweet thisAlerts:
@Zach_ElfersauthorFeb 24.2003 — Oh. I thought that the <html> tags were required.
Copy linkTweet thisAlerts:
@StefanFeb 25.2003 — [i]Originally posted by Zach Elfers [/i]

[B]Oh. I thought that the <html> tags were required. [/B][/QUOTE]


Yes, it's a very common missconception.

The HTML/HEAD/BODY ENTITY is required, but the TAGS (which mark where the entity in question start and end) are optional.

This leaves it up to the webbrowser errorcorrection to figure out where they should be (and thus leaving them out requires more CPU from the visitors comp to render the page).

Most designers thus add these tags, both for their own sanity as well as the reciving computers.
×

Success!

Help @Zach_Elfers spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...