Paragraph, Bold and Italic
Coding (Html5)
How to choose the right tag when we want to create a text
Since the first versions of HTML, to make a text appear in bold, we just add a <b>
tag to the document, as well as the use of the <i>
tags to Italianize a phrase.
For a construction of the documents oriented to the semantics and the latest versions of the language, it was recommended to use <em>
for italics and <strong>
for emphasis.
Respectively, the two tags were for emphasis <em>
and strong emphasis <strong>
and browsers assign their own styles such as italic and bold.
This second choice, certainly seems more in line with the principle of separation of content and graphics, that the tags should not define the appearance of text.
On the other hand, in this way it places a limit in the presence of emphasis because for a few very important words. If this aspect can have a positive impact on a typographical rate plan, it may tend to homogenize the drafting of the texts.
p
The paragraph is a container element that involves the insertion of text and other tag. It is also of a type Block element, Here my tutorial element's position, for example, this means that the browser basic behavior will be to go to the ends of the end of the paragraph and which are set margins for text. As you can imagine this element is widely used and also used by CMS, such as WordPress, to harness the text.
b, i, em e strong
HTML5 were merged the two traditions, taking the best from both and valuing the importance of tags likeand <i>
that are useful to give a rhythm to the content, not to mention the semantics. Let us understand then how to use different tags for making specific help:
strong
It gives to the text a strong importance, seriousness or urgency (strong now stands for Importance).
Helps to thematize of the page and can also be used to SEO strategies, can also be used within headings to indicate the most important part of a title (eg. <H1>
Chapter 1. <strong>
The house </ strong> </ h1>
).
em
It offers a stylistic difference from the rest of the content, without attributing specific importance to the text (note: it is bold or not does not matter).
b
Like strong, it used to be a text or a phrase which is pronounced differently from the rest of the text. (Emphasis by emphasis becomes stress).
i
It is used to represent text that expresses a tone, a mood or something that deviates from the rest of the content, without adding further meaning or importance.
In summary, it perfects the expressive power of "strong" and "em," as well as "i" and "b", once released from the definitions of Italic and Bold. As for styles, they are now perfectly confined within the CSS.