What is <i> </i> for? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is <i> </i> for?

14th Jan 2020, 2:21 AM
Jovan
3 Answers
+ 1
It is used for marking text as different from the surrounding text which can mean a lot of things. In my opinion <i> is not very common and usually used incorrectly (for example for icons which makes no sense). Here are some examples straight from the people who make up the rules: https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-i-element <p>Raymond tried to sleep.</p> <p><i>The ship sailed away on Thursday</i>, he dreamt.</p> <p>There is a certain <i lang="fr">je ne sais quoi</i> in the air.</p> Note that for emphasis we have <em>: <p>Last night's dinner was <em>amazing</em>.</p>
14th Jan 2020, 2:52 AM
Schindlabua
Schindlabua - avatar
+ 1
It makes the text italic (lean to the right)
14th Jan 2020, 3:07 AM
Ginfio
Ginfio - avatar
+ 1
Ginfio Technically correct but that's one of those misuses I was talking about. <address> makes text italic aswell, but you wouldn't use it for that purpose. The same goes for <i>.
14th Jan 2020, 3:11 AM
Schindlabua
Schindlabua - avatar