HTML Law and Order

HTML Coding must follow a law in order for it to work. Without law and order the webpage will not display properly. You will now learn the necessary rules for creating all webpages.

While using HTML Codes, remember these rules to bring structure to your website, it'll help your visitors view your content in their web browser.

HTML Basic Rules

HTML uses tags as the framework for creating a web page. Tag almost always come in pairs, we're learn more about self-closing tags in a later tutorial.

  1. This is an open tag <>
  2. Here is what a closed tag looks like </>
  3. Your HTML Editor may use line numbers to help make reading html coding eiser.


Example 1

HTML Framework or Structure.

  1. Line one must always have <!DOCTYPE html>. This HTML Code will inform the web browser what programing language the browser is reading.
  2. On line two you must always have an open <html> tag to start the document.
  3. Your HTML document will need an open <head> tag.
  4. All pages should have an open <title> and a closed </title> tag, on the same line.
  5. This is where the closed </head> tag will go.
  6. Your open <body> tag will go on the next line, after your closed head tag.
  7. Your heading tags like this <h1>Heading 1</h1> tag, will go between the body tags.
  8. By using the <p> tags, which are your paragraphs tags, you can create paragraphs. You can create as many paragraphs as you wish to write, just don't forget add the closed paragraph tag which looks like this. </p>
  9. <p>I have created examples throughout the tutorial. If you have any questions, please leave a comment or PM me.</p>
  10. Make sure to add your closed </body> tag, before adding the closed html tag.
  11. All page will have a closed </html> tag on the last line to end the document.


Example 2

Line 1 <!DOCTYPE html> (Tells the browser which type of file it is reading.)


Line 2 <html> (This is a open html tag.)


Last Line </html> (This is a close html tag. This tag must be the last tag to be place on the last line, of the HTML file.)

Example 3

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Your Title Will Go Here</title>
  5. </head>
  6. <body>
  7. </body>
  8. </html>

If you have any questions about the rules of html, please use the dussicion group or send me an PM here at Wealthy Affiliate.

Up Next: HTML Head and Body Tags



Join the Discussion
Write something…
Recent messages
WilliamBH Premium
Thanks LeNard .. I found that a very useful explanation. Cheers, William.
Reply
seconds2work Premium
Thank you William, I plan to put out more training like this
Reply
MKearns Premium
It's been around a long time. I used to do some raw coding in it 15 years ago!
Reply
seconds2work Premium
Back in the 1990's I started learning WYSISYG ( what you see is what you get)

It's the same, just about.

Thanks Michael
Reply
JohnFry Premium
Thanks for the information!
Reply
seconds2work Premium
Thank you John
Reply
kasage00 Premium
thanks for sharing!
Reply
seconds2work Premium
Thank you Karin, for checking it out
Reply
bigrog44 Premium
Thanks for sharing.
Reply
seconds2work Premium
You're welcome Roger
Reply
Top