DEV Community

Cover image for 5 HTML tags that make the text italic
Beginner Developer
Beginner Developer

Posted on • Originally published at

5 HTML tags that make the text italic

As I was reading the documentation of HTML, I saw the var tag. Initially, I thought it was related to variables. However, I had seen that it was making the text Italic. So I asked myself, how many HTML tags make text Italic.

I began researching how many HTML tags make the text italic and found 5 tags that do so.

<i> tag

It is a common and well-known tag.
Display style- Inline
<i> elements are used to differentiate words from the surrounding text by styling italicized text without adding any emphasis to italicized text.

<em> tag

Display Style - Inline.
The <em> element is used to indicate text that should receive more emphasis than the surrounding text.

<cite> tag

Display style - Inline
Use the cite element to identify the source of a quotation or creative work, rather than the author or creator.

<dfn> tag

Display style- Inline
When a term is enclosed in a <dfn> tag, browsers and web crawlers will understand that nearby text contains a definition of the term.

<var> tag

Display style - Inline
Most browsers display text marked with tags in italics. This element indicates a variable in a mathematical equation or computer program.

My Blog:- Beginner Developer Blog

Top comments (2)

prakh_r profile image
Prakhar Yadav • Edited

This is nice.
I wonder how screen readers announce them

beginnerdeveloper profile image
Beginner Developer