Learning HTML Tags

Spread the love

Learning html tags and design is easy. We are glad that you are here. <html>

<head>

<title>The line that Google shows in search results</title>

</head>

<body>

<p>Yes, this is where you write your next novel</p>

</body>

</html>

Note: The nesting of all the tags within the html set. But imagine having thousands of these to look at in precisely this manner. It gets a bit complicated.

Learning HTML Tags – Formatting the code structure for legibility and documentation

Instead of writing it like the above, why don’t we write it like the sample below and let our code editor help us with color coding.

<html>
   <head>
      <title>For the search engines - not seen visibly by user</title>
   </head>
   <body>
       <!-- This is an html comment. seen only by looking at code -->
       <p> My first html paragraph </p>
       <p>Only the text between the two <body> </body> tags will show
          to a user. the <head> tag information is invisible unless
          you are looking at the page's source code.
   </body>
</html>

This is far more complex than the first example shown at the top of the page, however the indentation of the formatting allows the user to more easily see where the pairs of html tags start and end.

Sometimes, at a glance, it’s possible to visually eyeball a missing pair of tags when its indented properly.

Learning HTML Tags – Screen shot – online html editor

learning html tags - Image of an online code editor.


Learning HTML Tags – Homework, Yes, We do that here too

  • 1) Memorize the short code above. Review and see it in your head. That shouldn’t be difficult
  • 2) Rewrite the code above into your editor – twice please
  • 3) Change the title, change the paragraph text and ensure that it looks ok
  • 4) Add 2 more comments and two more paragraphs/li>
  • 5) Make an html mistake and see how flexible your browser is

The last request above is quite interesting. In c++ and other languages, if you make a syntax mistake the code simply won’t compile.

In HTML however, sometimes leaving off an ending tag will cause the browser to internally complain, but it can often still render if it sees the beginning of another tag. Perhaps internally, it notes that the programmer/author is a bit whacked particularly when the renderer gets down to the ending body tag and realizes that the author still has a dozen open tags that never closed.

There are places online where you can run your website page through a w3 validator that will tell you what your browsers are really thinking when they see your html code.

Learning HTML Tags – Is the End HTML tag important?

Is the ending html tag really significant?

It’s important because poorly written html code takes longer for the browser to figure out and obviously longer to render.

The importance of this is that search engines have billions of pages to spider and we believe that it takes specific note of those website pages that take too long to render due to incorrect code practices. There is a whole science and art behind w3 validation sitting over here.

You can go to that link, type a URL into the given place and the validation will be shown to you. More pages than you may suspect, fail validation spectacularly.

This is important for the user experience so don’t ignore this search engine tip.

If you enjoyed this, please tell someone else about learning html tags. Thanks

Top