SAT.AUG.15
2026
22:22:10

Links & Formatting Text

Learning about the basics of HTML & CSS

You can add a link to a page using the <a> element, and the href property.

<a href=”page2.html”>My second website</a>

The text “My second website” is what will be displayed, and the text inside the quotation marks is the link that the user will be redirected to when they click on it.

For this link to work on your page, you would need to have a file named page2.html located in the same directory as the current document.

Text formatting

There’s a few elements that can be used on text in HTML to apply different formatting to them. By surrounding text in these tags, you change how the browser renders the text.

Tag Description Example
<i> Puts the text in italics. Example
<small> Makes text smaller. Example
<mark> Highlights text. Example
<del> Strikes a line through text. Example
<ins> Underlines text. Example
<sub> Subscript text. Often used for scientific notation. Example
<sup> Superscript text. Often used for scientific notation. Example

As we talked about earlier, elements can be used inside other elements. So you have free choice to decide which words should have which text formatting features.

See this example. The page will only render the first sentence in italics.

<div><i>This is an HTML element.</i> It is being displayed on the Tūhura Tech Wiki page.</div>
This is an HTML element. It is being displayed on the Tūhura Tech Wiki page.

In this next example, multiple format options are used.

<div><i>This is an HTML element.</i> <ins>It is being <del>displayed</del></ins> on the <a href="https://wiki.tuhuratech.org.nz">Tūhura Tech wiki page</a>.</div>
This is an HTML element. It is being displayed on the Tūhura Tech wiki page.
Pro Tip

Don't format your text like the example above. It doesn't look nice.

Use text formatting tags sparingly.