Just out of curiosity, when did strong replace b for bold, em for i for italics, and br / for br for line breaks? Seems kind of silly. I mean, whatever, but what, again, was wrong with the old codes? Just curious about that.
New: DesktopSnowOK (Jan 6, 2025), Platform 29.5.3 (Jun 27, 2024)
1,100+ portable packages, 1.1 billion downloads
No Ads Nov/Dec/Jan!, Please donate today
They didn't replace them, but are usually more appropriate. More info here:
http://green-beast.com/blog/?p=222
For a forum, then, em and strong are more suited.
(EDIT: Moderator question: How do you do inline code? - Pre is blocked text, and code is set to display:none;)
In HTML 4, the previous
b
andi
elements became deprecated, that is, valid, but discouraged. And this happened because HTML is a semantic language. Andb
andi
provide no meaning at all, and can be reached trough CSS, as someoneabc showed in the link.In the development version of HTML 5,
b
andi
have different meanings.b
is a somewhat confuse elements that indicates that the text is stylistically offset in a specific way.i
indicates a specific text that needs to be styled differently due to its difference (I am bad at explaining and good at using, see someoneabc's link for a better explanation).So, those elements disappeared but might come back with HTML 5.
About
<br>
being replaced with<br />
, that has a very simple reason:Recently, the adoption of XHMTL has increased. XHTML is like HTML but based on the XML engine instead. This adds some differences as there is no permission to have errors in the markup, or else, the browser won't render the page.
And one of the errors is not to close opening tags. But typing
<br></br>
would be strange (and error prone). So, in XHTML, thebr
element is a self-closing element, that means that, instead of using>
to close the opening tag, it is necessary to use/>
. (this also happens with other self closing elements likeimg
)But, to remain compatible with HTML (sort of) a person must add a space before the self closing element (that is permited in XHTML) to avoid parsing bugs in older browsers that don't support XHTML.
I hope I was clear and have helped.
Blue is everything.