Marking up with HTML

Formatting with tags

Angle tags like < and > are used for tags, with words or abbreviations. Tags come in pairs. For example the opening tag for html would be <html> and the close tag would be </html>.

The text enclose inside the tags is formatted. For example text inside the tags <h2> </h2> would be formatting as heading two in the example below:-

Example

Even though most tags are paired some aren't. For example the break tag and horizontal rule tag.

The horizontal rule tag is <hr /> and the break tag is <br />

To find out more information about these you can go to:- Basic HTML Tags

The reason that these tags don't have paired tags is because they don't apply to text or surround anything.

Tags for Bold and Italic

You can format text in HTML by using the bold and italic tags.

The opening tag for italic is <i> and the closing tag is </i>
<b>This text is in bold </b> - This text is in bold b>
<i>This text is in italic </i></p>- This text is in italic

You can also nest tags so that you can make the text bold and italic. It doesnt matter what way the bold and italic go

This text is in bold and italic The code for this is <i><b>This text is in bold and italic</b></i></p>



This is the end of this section, you can continue to the next section or try the exam to test your knowledge.
Click here to attempt the exam now.



Previous Page (Home)

Next Page

Go to top