html tags u or span? [closed]

0

I was currently using span to select a part of my text and give it another style, but recently I discovered a tag called u that has the same effect with the same definition

  

Defines text that should be stylistically different from normal text

Does anyone know when should I use each one?

    
asked by Pachi 27.12.2017 в 18:44
source

1 answer

2

I use <span> when I want to select how you say a part of the text to add different styles to the rest.

It seems that <u> has a more specific utility. According to the mozilla documentation serves to underline the text that is between the tags .

However, it is better not to use it in cases where <u> can be confused with <a> . So I personally would always use span and would add the underline or any other style that I needed manually.

    
answered by 27.12.2017 / 19:14
source