Formatting text
For the rest of the tutorial we will not be going over the page structure
each lesson. From here on in all the code that we will be reviewing can be
tested by simply copying and pasting within your body tags.
There are several ways you can alter the text of your page.
Using the same page you have
created in the previous lesson, let's make the text "Hello World" bold.
Go back to your source page. This is the notepad text file where all of your code is. If
you have already closed this file there is another way to get to it.
Simply, open your mypage.html file. Your web page will open up to your default web browser. Then go to View on the main menu and
then click Source. This will open up your notepad file.
Now, insert an opening bold tag, <b> before the text "Hello World" and a closing bold tag,
</b> after it.
Save your page in notepad by selecting File on the main menu and the click Save.
Go back to Internet Explorer and refresh the page. There are several
ways you can refresh the page. Here are some examples of how to.
- Press F5 on your keyborad
- Press the refresh button which looks like this.

- Go to View on your main menu and cick Refresh.
Now your page should look like this.
Below are some other useful tags to alter your text.
| Code |
Result |
| <b>This text is bold.</b> |
This text is bold. |
| <i>This text is italic.</i> |
This text is italic. |
| <u>This text is underlined.</u> |
This text is underlined |
| <big>This text is big.</big> |
This text is big |
| <small>This text is small.</small> |
This text is small |
| This text contains<sub>subscript.</sub> |
This text contains subscript. |
| This text contains<sup>superscript.</sup> |
This text contains superscript. |
| <em>This text is emphasized.</em> |
This text is emphasized. |
| <strong>This text is strong.</strong> |
This text is strong. |
You can also use multiple tags for the same text. For example, if you'd like to bold
and underline the same text the code to use would be:
| <b> <u> Hello World </u> </b> |
Hello World |
But don't forget! Always nest your tags. Meaning the tag that you opened last must be closed first.
Next Lesson
|