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><h2>My favourite animals are horses and elephants.</h2>
This will ensure that your HTML pages 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 tags don’t have a corresponding closing tag – just use these tags on their own. Examples include:
- The
<br>tag, for creating line breaks - The
<img>tag, for inserting images
Leave a Reply