From the course: HTML Essential Training

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

Bold and italics

Bold and italics

- [Instructor] Many text formatting elements are used to define whole blocks of text, but sometimes you may need to format just a word or a short phrase contained inside another element. We've already seen an example of this with the cite element, which is an example of an inline element. HTML has more ways to format inline text. For example, there are two tags that can be used to convey importance or emphasis, strong and em. Here's how the strong tag might be used and how it's displayed in the browser. This is an example of a warning message you may see when you're about to delete an account. Adding the strong tag around the word warning will designate this word as more important than the surrounding text. It will also be displayed as bolded. The em element is used to define text that has stress emphasis to change the meaning of a word, phrase, or sentence. It's like how we emphasize certain words when we speak by pronouncing them with more emphasis. For example, putting the em tag…

Contents