HTML Basics: Always close your HTML tags

  • 3
  • Idea
  • Updated 8 years ago
Here's a helpful tip for people who like to use HTML codes or want to try to use HTML codes on your site!

When you type an opening HTML tag (e.g. <b>, <p>), always place the corresponding closing tag at the end. For example:
* <b>My favourite animals are horses and elephants.</b>
* <p>My favourite animals are horses and elephants.</p>

This will ensure that your HTML codes work properly on all browsers, and will help to prevent any strange problems occurring in your pages! This is especially important with tags such as <div>, <span>, <table>, <tr> and <td>.

Some exceptions are:
* The <br> tag, for creating line breaks
* The <img> tag, for inserting images

Happy coding!
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
  • happy

Posted 8 years ago

  • 3
Photo of Cool Isaiah

Cool Isaiah

  • 1 Post
  • 0 Reply Likes
Photo of Nathan

Nathan, Champion

  • 3739 Posts
  • 307 Reply Likes
Thanks for that tip! That will help lots of people out that are wondering why there page is broke! :)