Italic and Bold text
These HTML tags can be used to make text bold or italic, just like the strong and em tags do. However, you should not use these for emphasis if that's what you want to use bold and italic text for. These tags are not officially recommended anymore.
You might wonder why, and the answer is that in HTML almost every tag means something. It's important, especially for people accessing your website in any way other than a regular web browser, for example through a screen reader. So, if you want to emphasise something, you use the tags specifically meant for emphasising things. If it's just for decoration, it shouldn't have that meaning in the markup!
- Paragraphs: the <p> tag
- Emphasis: the <em> tag
- More emphasis: the <strong> tag
- Italic text: the <i> tag Not recommended
- Bold text: the <b> tag Not recommended
- Line breaks: the <br> tag
The <i>~<i> tag displays text in italics
[Example]
<i> This will be in italics </i>
[Display example]
When you open it in a browser, the text will be in italics.
The <b>~<b> tag displays text in bold
[Example]
<b> This will be bold </b>
[Display example]
When you open it in the browser, the text will be in bold.