HTML Text Style
When you want to add style to your text in HTML such as bold, italic or underline, you need to insert a code before and after the section of text you want to be affected by the format. There are many other HTML text style codes than the 3 examples above.
How to add HTML text style in your website
In this example, I will make two words in the page bold:
|
<html> <head> <title>html text style</title> </head> <body> Here are 3 <b>words in bold</b> text. </body> </html> |
When adding HTML text style to your content, don't forget closing the styling tag with a </TAG>. If you forget the closing tag, all the text on the page after the opening tag will be bold.
Here's a table with all the HTML text style tags available. There are all inserted in the same way we did the bold tag in the previous example.
| TAG | HTML text style |
| <b> | This makes text bold |
| <i> | This makes text italic |
| <u> | This makes text underlined |
| <big> | This makes text big |
| <em> | This makes text emphasized |
| <small> | This makes text small |
| <strong> | This makes text strong |
| <sub> | This makes text subscripted |
| <sup> | This makes text superscripted |
| <ins> | This makes text inserted |
| <del> | This makes text |
Note on the "sup" and "sub" tags
When reading a book, you often see words with a number over them giving a reference to the bottom on the page. Here's an example:
...the author1 of this book...
botom of the page:
1 Name of the autor
Using HTML text style tags is an efficient way of formatting your text but if you have a big website and want to make changes to all your pages at once, using CSS styles would be a better idea. If you want to create pages with HTML only, this is the way to go to add a little life to your writings!
| Back Head and Body tags | Next HTML Page Formatting |