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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...