Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Question of standards: I, EM, B, STRONG, BIG, SMALL

In real work, I always use EM for italics, STRONG for selection. And SMALL.

I decided to update their knowledge in HTML + decided to look towards the HTML 5

So, xHTML 1.0 strict, as the language of separating flies and cutlets, and allowed the following inline elements related to the text:

I, EM, B, STRONG, BIG, SMALL

here, I came across the first question - why the tags B and I have not been eliminated or at least not become deprecated in XHTML? After all, if you look at the DTD, then about the tag B & I is clearly written:

<! ELEMENT b% Inline;> <! - Bold font ->
<! ELEMENT i% Inline;> <! - Italic font ->

Is the fat content and courses are structural, logical feature? This is clearly a visual feature.

Next, I looked at http://www.w3schools.com/html5/html5_reference.asp and was surprised that the tag BIG somehow removed from the HTML5, and its logical equivalent SMALL - left! Although BIG was even in XHTML 1.0 Strict!

Where is the logic in such permutations? Explain.

like image 289
Vasiliy Avatar asked Dec 17 '22 02:12

Vasiliy


2 Answers

There are uses for tags such as i and small that are not presentational but semantic. <small> represents fine print (or legal print) and side comments. And i can be used for text that is traditionally italicized but not emphasized, e.g. book titles, foreign words, and Latin names of species.

As to why <big> has been dropped while <small> hasn't, see this answer.

like image 153
ЯegDwight Avatar answered Dec 28 '22 08:12

ЯegDwight


First of all EM is not for italics, it is for EMPHASIS. STRONG is for strong emphasis. You should never use them for any other purpose. Not according to the HTML 4 specs, XHTML or HTML5.

For presentational effects one should use CSS.

So why has B, I and SMALL been kept in HTML5?

  1. To prevent abuse of EM and STRONG. If you can not use CSS, like on a forum or a wiki, it is better to use non semantic elements, than to abuse semantic ones. As in our comments for Stackoverflow, where I suspect em and strong is being abused a lot, thanks to the WYSIWYG editor we are using.

  2. There might be legitimate reasons to use bold or italics besides what is covered by EM, STRONG and DFN. HTML5 defines this as text that should be spoken in different voice or mood, it thus adds a kind of semantic and a legitimate use case. This slight redefinition is controversial.

  3. In lieu of B and I some software and/or users insert style-attributes. That is trading one evil for an even worse one.

  4. The same applies to SMALL as well. It has received a similar use case, where it sort of carries a semantic meaning. It does NOT mean side commments.

BTW, B and I were not deprecated in HTML 4/XHTML 1.

like image 21
itpastorn Avatar answered Dec 28 '22 07:12

itpastorn