HTML Part 9 – Heading Rules, Comments, and Thoughts on HTML

In the previous part of our HTML guide, we discussed headings and escape tags. While that is very straight forward stuff, we want to change gears a little and discuss some equally simple pieces of HTML in this guide: heading rules and code comments.

Heading Rules

Heading rules are essentially horizontal lines that can be used to separate topics in when you have lots of text. So, if a paragraph break and splitting the content up by inserting a heading won’t suffice, your third option is to use the Heading Rule tag or <hr>. What is extra convenient about these tags is that they don’t have to be closed. Just an opening tag is sufficient to create the Heading Rule.

Borrowing our code from the previous guide, we’ll use it to insert our Heading Rule tag to separate the headings and the escape tag text:

HTML9_1

The result of adding such a small piece of code?

HTML9_2

While there are ways of further formatting the Heading Rule tag, all HTML formatting of this is deprecated, so the only way to properly format this is to use different web code languages (i.e. CSS or Cascading Style Sheet) which we won’t get in to in this guide as this is just an HTML guide. So, that is it for the Heading Rule tag! Pretty simple!

Comments

Comments are created specifically to not show up on a webpage. However, if one were to open up an HTML document in notepad, the comments will appear. Comments can be a method of communicating to other web code programmers what your intents were when coding – or a simple way of just noting things for yourself. In any event, it’s a form of documentation that can be very helpful for web programmers. The code for this <!–Comment goes here–>

So, an example of this would be this:

HTML9_3

Obviously, the end result is no different than the end result shown above, but the code behind it contains more documentation.

That’s it for comments!

Some Thoughts On HTML

As you can no doubt guess, what is produced by HTML is incredibly ugly. I don’t think it’s meant to be pretty. Instead, it’s meant to provide the bones for you to build other things. Once you start adding something like CSS to the code, you can easily make the end result incredibly well done and professional. Pictures, HTML, and CSS can produce some impressive stuff visually. Still, if you want to learn code, HTML is a really good place to start.

Not only is HTML a good place to start, but once you know HTML, you can recognize modified versions out in the World Wide Web. For instance, web forums utilize code that seems to be borrowed from HTML. If you use forum software like PHPBB, vBulletine, XenForu, or Gazelle, you can immediately recognize the similarities between formatting your post and HTML. There’s the use of opening and closing tags. Many forum software packages use [b][/b] tags and HTML used to use <b></b>. Some e-mail services allow you to format your e-mails in HTML even.

Once you know HTML, it can make using other pieces of software substantially easier to use. You don’t have to fumble around with different buttons when you can just manually key in the code because it’s just second nature to you. Personally, when I’m using forum software, I simply use the code rather than the buttons just because it feels much more natural. I also have the added bonus of looking at what I wrote after and, if something messes up, I have the knowledge to fix it after. If a user with no coding knowledge creates a post and, for whatever reason, it doesn’t work, then they won’t necessarily have the ability to fix it. You, however, do. So, knowing HTML can help users become more literate web users. So, in my opinion, this is a worthwhile language to know. It won’t make you know everything there is to know about the web, but it is a great place to start.

We’re not done yet with our HTML guide! In the final part of our guide, we’ll discuss how to associate CSS with HTML pages.

Part 8 – Headings and Escape Tags | HTML Guide List | Part 10 – Attaching and Linking CSS


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.