# Formatting Text

## What We'll Be Building!

![](https://3764443643-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M1CV_PDi4uSEWhb3GlC%2F-MBVk4OxCpH8ZrgdpNLY%2F-MBVl9goN0xSEJnDygK_%2F4.JPG?alt=media\&token=5539e2a3-75e8-492d-87bf-69a83799cc48)

## Formatting Tags

Sometimes we need certain pieces of texts to stand out. To accomplish that, we use formatting to adjust the way these pieces of text look.&#x20;

One simple way to do that, is through the use of **Text Formatting Tags**.

### **Bold and** *Italic* Tags

To apply **bold** or *italic* effects onto any text. Simply place it between the **bold** or *italic* tags.

The **bold** tag is written as: `<b>`

and the *italic* tag is written as: `<i>`

{% code title="formatting.html" %}

```markup
<!DOCTYPE html>
<html>
    <body>
    
        <p><b>This text is bold</b></p>
        <p><i>This text is italic</i></p>
        <p><b><i>This text is bold and italic</i></b></p>
        <p><b>This text is bold</b> and </i>this is italic</i></p>
        <p>This is <sub>subscript</sub> and <sup>superscript</sup></p>
    
    </body>
</html>

```

{% endcode %}

{% hint style="info" %}
`Remember, you can use these tags`` `**`separ`**`-`*`ately`* `or you can use them`` `***`together.`***
{% endhint %}

## Exercises

Create a new html tag named **formatting.html**. Using the code above as a guide:

1. Apply the **bold** effect to  an entire paragraph. Refresh the page too see the results.
2. Apply the *italic* effect to an entire paragraph.
3. Apply the ***bold and italic*** effect to an entire paragraph.
4. Write the words 'Hello World' in a paragraph tag. Apply the **bold** effect to only the word 'Hello', apply the *italic* effect to only the word 'World'.
