Jump to content

Oh My...


Recommended Posts

:) They actually have it in HTML, it's not even valid! What ever happened to

tags?

<HTML>
<HEAD>
<TITLE>Hello, World Page!</TITLE>
</HEAD>

<BODY>
Hello, World!
</BODY>
</HTML>

EDIT: This is even worse

&ltTITLE>
Hello World in JavaScript
</TITLE>
&ltSCRIPT>
   document.write ("Hello, world!")
</SCRIPT>

Link to comment
Share on other sites

The HTML one is "valid".

Valid eh?

Code I validated (added doctype and character encoding)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<TITLE>Hello, World Page!</TITLE>
</HEAD>

<BODY>
Hello, World!
</BODY>
</HTML>

Line 9, column 0: character data is not allowed here

Hello, World!

You have used character data somewhere it is not permitted to appear. Mistakes that can cause this error include putting text directly in the body of the document without wrapping it in a container element (such as a

aragraph

) or forgetting to quote an attribute value (where characters such as "%" and "/" are common, but cannot appear without surrounding quotes).

Line 10, column 6: end tag for "BODY" which is not finished

Link to comment
Share on other sites

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<TITLE>Hello, World Page!</TITLE>
</HEAD>

<BODY>
Hello, World!
</BODY>
</HTML>

This Page Is Valid HTML 3.2!

Why assume that "valid" requires HTML 4 or XHTML? Older specifications still exist, and there's nothing wrong with writing for them :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...