--- title: Text Formatting in HTML --- ## Text Formatting in HTML HTML provides you with a lot of useful elements for text formatting. It allows to make your text bold, italic, marked and much, much more. Of course, this is all for a reason - to get the important points across to the reader. ### Bold and Strong You can make your text bold by using the `` element. This makes words bold, and provides strong emphasis to a certain word or phrase.
Example: ```html

The most important part of your code is the end, cause it can affect everything!

```
Note: You can also use `` as well. They both bold the text. ### Italics and Emphasis If you want to write your messages in italics, you can use the `` element.
Example: ```html

I hate it when I start talking in Latin, it makes me Lorem Ipsum!

```
Note: You can also use `` as well. While visually, they are the same, the semantic definitions are different. `` is generally used for emphasis, while `` can be used for foreign words, etc. ### Small It makes your text smaller than the normal font size. This element's meaning was changed in HTML5 - it now represents side-comments and small print.
Example: ```html

Normal, small, normal, small!

``` ### Marked The element `` makes your text marked. In other words, it makes your text highlighted. You can use it to tell readers things of importance.
Example: ```html

The land of HTML is a strange and mysterious land, and it's our job to explore it all!

``` ### Deleted The element `` shows strikethrough. It's useful if you want to corroct correct something.
Example: ```html

WWI started in 1913 1914.

``` ### Underlined Underlining is a tricky thing in HTML. The best way to underline your code is to use CSS and set `text-decoration` value to "underline". If you need to, the default for the element `` will underline your code.
Example: ```html

I like drawing lines under my words

```
Note: `` actually means "Inserted", and is intended to depict inserted text.
Note 2:`` used to be underline in HTML 4.01, but in HTML5 it was redefined to show that a word had some form of non-textual annotation applied. The default of `` is a simple underline, but this can be changed using CSS. ### Subscripted Using the element `` makes your text subscripted (ie. it becomes smaller and gets shown near the bottom).
Example: ```html

I use subscripts in math! For example, I can say x1!

``` ### Superscripted If you want to make your text superscripted (ie. it becomes smaller but gets shown near the top), use the element ``!
Example: ```html

102 = 100

```