Dev.Opera - Follow the standards, break the rulesDev.Opera - Follow the standards, break the rules

Login

Lost password?

Forums » Article Discussions

Discuss the articles posted on Dev.Opera.

Note: You need to login to post in the forums. if you don't have an account you first need to sign up.

By mnfrancis anchor Tuesday, 8. July 2008, 07:12:57

12: The basics of HTML

HTML is the language that contains all our content on the Web, and gives it structure and meaning. It is probably the most important language to learn when starting web design, so pay close attention to this article, which introduces the basics.

( Read the article )

By stelt anchor Monday, 2. February 2009, 13:14:28

avatartypo: mroe

By celder anchor Thursday, 2. April 2009, 19:36:56

avatarThere is a typo in the first paragraph of the section, "What HTML is."

"...even things such a list of changes made so you can go back and forth between versions."

"a" should be "as"

By Erinyes anchor Friday, 3. April 2009, 17:35:31

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

This is a very shorthand ambigous way of writing it, maybe
<!-- what conventions do we use? -->
<!DOCTYPE 
   <!-- we say: <html> and siblings follow these public conventions -->
   html PUBLIC "-//W3C//DTD HTML 4.01//EN"
        "http://www.w3.org/TR/html4/strict.dtd"
>

...or similar non-obstruficated version would be for the be best; I believe the code should be humanly readable in its source developement form. Frankly for a total beginer tutorial the addition of a doctype block is I feel unnecessary as it has no meaning with out the "purpose" it serves when we write our pages, but oh well.

You also have very unusual indenting.

(by the way, why "HTML" and not "html" in the doctype?)

By chrismills O anchor Monday, 6. April 2009, 22:53:03

avatar

Originally posted by Erinyes:

...or similar non-obstruficated version would be for the be best; I believe the code should be humanly readable in its source developement form. Frankly for a total beginer tutorial the addition of a doctype block is I feel unnecessary as it has no meaning with out the "purpose" it serves when we write our pages, but oh well. You also have very unusual indenting.(by the way, why "HTML" and not "html" in the doctype?)



I've added a line break in the middle of the doctype to make it more readable, but I think such a detailed description of what the pats of it do will confuse more than help beginners at this level.

I had fixed the indenting - it was horrible in a couple of those examples! Thanks for the spot.

Does HTML/html matter in the doctype?

By Erinyes anchor Monday, 6. April 2009, 23:28:24

avatarI do not think so, unless there is some weird obsucure issue with the treatment of html in a case sensitive xml document as oposed to a case insensitive classic HTML; when the definitions are enclosed by the document as would be here the case for HTML/html.

I can not really tell, most browsers should perform as expected (I think), nothing weird like this anyway:
<html><head>
   <title><!-- this is not treated as a comment --></title>
<body></body></html>


The HTML there is definitely referring to the root of the document (normally there would be [ ] for definitions but since this is a reference to a public uri its not needed). I personally do not see a problem with leaving it as is other then some minor confusion where people might be tempted to read it as one "command": DOCTYPE HTML PUBLIC

(I vote leave it as the writer wrote it)

Moderators: pepelsbey | dstorey | mcx | operadev | chrismills | shwetankdixit | brucelawson | iheni | andreasbovens | zibin | mollydotcom