One of the easiest ways to highlight a word or phrase in a text is to use a different letter style. So you can underline a word or phrase using bold . HTML markup of a page allows you to easily highlight words using different styles - italic, underlined, bold.
Bold as a way to highlight
The words highlighted in bold look most vivid and catchy. Such words and phrases are immediately evident. So, in order to learn how to quickly select the right places in the text, you should remember the special HTML-code. Bold is set using the paired <b> </b> tag.
Before the word or phrase, the sentence, which should be highlighted, there is an opening tag <b>. After the last letter in the text to be highlighted, a closing tag </b> is placed. Everything that appears between these two tags, when displayed in the browser, has a bold style.
Other selection options
So, we found out that it is possible to select the text using another style. It was decided that the most simple and at the same time efficient use of bold HTML font. Now let's talk about other options for selection.
So, you can select text in italics using the paired tag <i> </i>, underline it with <u> </u>. These are the easiest ways to select text.
There are also lesser-known and used tags with which you can highlight words and sentences in the text. So, in order to cross out the text, just use <s> </s>. The paired tag <tt> </tt> will help to make the text monospaced. If you need to create a superscript, use <sup> </sup>, a subscript - <sub> </sub>.
At the same time, as before, the text you need should be between the opening and closing tags. As you can see, there is nothing complicated, the main thing is to remember these codes or write them down.
Using multiple fonts
If you want to make the text more expressive, you can use not only bold type. HTML markup allows you to simultaneously select a word using several styles. So, you can simultaneously make the word bold, crossed out and italic.
In this case, one thing to remember is that all tags must be closed sequentially. For example, the correct entry might be:
- <i><u> <b> selected text </b></u> </i>.
If you close the tags in a different order, the text will not be selected correctly. Example of an erroneous entry:
- <i><u> <b> selected text </u></b> </i>.
In this case, the browser gets confused and does not understand what exactly you want from it.
By the way, here it can be noted that three options for the style - bold, underlined and italic - are remembered quite easily if you own hot keys in Word. There, the style is set using the same letter keys with Ctrl pressed.
As you can see, you can use not only italic or bold type. HTML markup makes word selection as easy as regular Word.
conclusions
To highlight text, not only various colors and shades, different sizes and types of fonts are widely used, but also its style. Moreover, it is with the help of another shape that one or another fragment of the text can be beautifully and easily highlighted.
In order to change the font style, you should use any tag you know. The bold font of the HTML page is the most vivid and noticeable, and therefore is used most often for highlighting.