teach-ict.com logo

THE education site for computer science and ICT

3. Tags

HTML is fairly simple to learn as it is just made up of a number of 'tags'.

A tag is a formatting command for the browser to interpret. A tag is formatted like this

                                <tag> 

Most tags come in pairs - one to mark the start the formatted block and the other to mark the end of the formatted block. The end marker includes a forward slash. The pair of tags look like this

                       <tag>          </tag>

For example a paragraph is marked with

                        <p>         </p>

Any text in-between the tags is treated by the browser as its own paragraph of text.

There are some single tags: <br/> is a command to render a new line and <hr/> tells the browser to draw a horizontal line.

Here are some examples of the tags, though there are many more.

HTML Tags
TAG MEANING
<p> </p> Paragraph
<h1> </h1> Largest sized heading
<h2></h2> <h3> </h3> ....... <h6> </h6> Headings 2 to 6, each heading is smaller than the previous one
<table> </table> A table. These tags have to include a minimum of one row tag which itself surrounds a column tag
<table> <tr> <td> </td> </tr> </table> A minimal table with one row and one colum. More rows and columns can be included.
<ul> <li> </li> </ul> Unordered list (UL) with one line item (LI). The bullet marker type can also be defined (solid, circle etc)
<strong> </strong> Make the text in-between, bold
<title> </title> Title of the web page
<div> </div> Defines a section or division within the HTML document
<form> </form> The outline of a form formatting block. It needs to contain other tags within it to define the form itself such as <input>

 

Challenge see if you can find out one extra fact on this topic that we haven't already told you

Click on this link: What are HTML tags