Put a value in front of another HTML tag using span

Asked

Viewed 31 times

0

I want to do my resume and put it on git pages, and on the part of personal data, I put for example:

Habilitação: B
Estado Civil: Casado

I arrived at a solution that did not please me very much, I ask that if anyone can help me to find a better one.

HTML:

<span>Habilitação:</span><span>B</span>
<br>
<span>Estado Civil:</span><span>Casado</span>

  • and what I would like to change?

  • Actually, I just want to know if this is the best tag to be used in this context. I’m afraid I’m doing a gambit.

1 answer

3


It seems to me that you are abusing <span>, which would only make sense if you wanted to change something in the presentation of your content, but which could also be represented with a semantic tag to your goal. And avoid using the <br> to break a line, when what you have are paragraphs.

<p><strong>Habilitação: </strong>B</p>
<p><strong>Estado Civil: </strong>Casado</p>

For more details about the tags and what they represent, you can refer to this article.: List of HTML5 elements

  • Thanks a lot Leandro, that’s what I needed.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.