When should I use the span tags, hn and p [closed]

-1

I'm new to web development, and I wanted to know the difference between these tags and when I should use them, I researched them but I'm still having trouble.

Can someone explain me very objectively?

    
asked by anonymous 11.10.2018 / 20:20

1 answer

2

Span

The HTML element <span> is a generic online content container for phrased content, which does not represent anything by nature. It can be used to group elements for style purposes (using the class or id attributes), or to share attribute values such as lang. It should be used only when no other semantic element is appropriate. <span> is very similar to the <div> element, while <div> is a block level element while <span> is an inline element.

example: <p><span>some text</span></p>

Source: link

Hn

Heading Tags (H1, H2, H3, ...) are HTML programming features used to highlight titles and subheadings of a page. H1 is the English abbreviation for Header 1, or Header 1, thus the most important of the Headers. Conceptually, H1 has a higher prominence, a larger font, and is usually the most visible text element on the page. The other Heading Tags, such as H2 and H3, are generally used as sub-titles of a page. In SEO, they're a great way to include companion keywords, that is, variations and add-ons to your primary keywords that will not have a page that's unique to them, whether it's low-volume search, or simply does not fit the concept of the site .

Example:

<h1>Buffet Infantil da Carochinha</h1>
<h2>Festas temáticas</h2>
<h3>Festas do Barney</h3>
<h3>Festas dos Angry Birds</h3>
<h3>Festa da galinha pintadinha</h3>
<h2>Venha visitar a casa na Vila Olímpia - São Paulo</h2>
<h3>Ponto de referência</h3>
<h3>Estacionamento</h3>

Source: link

P

The HTML element <p> (or HTML Paragraph Element) represents a paragraph of the text. Paragraphs are usually represented in visual media as block text that are separated from adjacent blocks by vertical white spaces and / or first-line indentation.

Example:

<p>Esse é o primeiro parágrafo do texto. Esse é o primeiro parágrafo do texto.

Source: link

I did a summary for you, for more details enter the pages that I used as the source.

    
11.10.2018 / 20:26