Difference italic and emphasis in HTML? [duplicate]

6

What's different about <i> and emphasis <em> tags in HTML?

When to use each one?

    
asked by anonymous 27.01.2017 / 12:13

2 answers

6

The tag <em> has means emphasized . You should use it when you want to stress a certain thought or idea. Browsers usually make the text emphasized in italic ; A reader may recite the text a little more slowly or louder than the words surrounding it.

Example:

A rota é perfeitamente segura desde que você permaneça na fuga. Acima de tudo, <em> não andam no intervalo de disparo </em>.

Sometimes you need to emphasize the text, not to make it stand out, but to clarify the meaning. For example, if I put a sign saying Pick Your Own Strawberries , I'm inviting you to buy strawberries from me, on the understanding that you can pick them up. But if I say Choose your own% of <em> strawberries , I'm telling you to leave my strawberries still.

The </em> tag also causes the text to be rendered in italics, but in this case it is for style purposes instead of adding emphasis. You use <i> to indicate a different voice or mode, or to separate a phrase or word from the normal flow of text.

The label is often used for titles of films, books and works or art, for ship names, for short strange phrases, and in certain specialized uses, such as mathematical theorems and biological nomenclature. But note that all these uses are a matter of style; Example:

Ele passou o tempo recitando<i> o tiroteio de Dan McGrew</i>.

Apesar de perder cada jogo, mantivemos nosso <i> esprito de corpo</i>.

SOURCE

    
27.01.2017 / 12:21
3

Although the visual result is the same, since the two leave the content in italics, the semantic meaning is different. The <em> tag is used to emphasize content and the <i> tag is used for the general text style.

<p>
  Essa <em>palavra</em> merece ser enfatizada 
</p>
  
  
<p>
  <i>Quero deixar todo meu texto em itálico<i/>
</p>
    
27.01.2017 / 12:27