Reputation: 13
Can I clarify that these 4 elements below actually do the same job by rendering the text in italic and there is no difference in using each of them except to differentiate the type of content?
<i>
<em>
<address>
<cite>
Upvotes: 1
Views: 50
Reputation: 217
Yes, they all have the same default style which sets the content to italic. And yes, a particular tag will be chosen according to the content.
Reference: For more information refer to below links: What is the difference between <cite>, <em>, and <i> tags of HTML? What's the difference between <b> and <strong>, <i> and <em>?
Upvotes: 0
Reputation: 261
Yes, you can. Do this:
<html>
<body>
<i>italic text</i>
<em>italic text</em>
<address>italic text</address>
<cite>italic text</cite>
</body>
</html>
Put this into a file called <filename>.html
and open it in a browser (e.g. Chrome). If the text looks the same, it looks the same!
As you can see, the <i>
and <em>
elements do not make a newline automatically, but otherwise there is no difference. If you'd like to change the styles yourself, you can create a css file.
Upvotes: 1
Reputation: 349
You right, these 4 Elements basically renders all text or content as italic, the different off all these element just at the content.
<i>
tag defines a part of text in an alternate voice or mood.<em>
tag is used to define emphasized text.<address>
tag defines the contact information for the author/owner of a document or an article.<cite>
tag defines the title of a creative work (e.g. a book, a poem, a song, a movie, a painting, a sculpture, etc.).Upvotes: 0