stevenhu — 2013-05-08T18:21:06-04:00 — #1
According to PHP & MySQL: Novice to Ninja, we would have the user use tags like <b> and <i> to style the text they are inputting into a CMS. Then the PHP script will use regex to replace them with <strong> and <em>.
Maybe I missed it, but why not have the user use <strong> and <em> in the first place? Too hard to remember? Too long to type?
felgall — 2013-05-08T22:13:34-04:00 — #2
Ideally the user would enter <strong> and <em> - the code is there to convert if they enter <b> or <i> instead - otherwise what are you expecting to happen if they enter <b> instead of <strong> ?
michael_morris1 — 2013-05-08T23:24:37-04:00 — #3
<b> and <i> have been around a lot longer and more people are familiar with them.
stevenhu — 2013-05-09T10:30:54-04:00 — #4
The code expects <b> and <i> to be entered, so it uses regular expressions to find them and replace then with <strong> and <em> and their closing tags.
stevenhu — 2013-05-09T10:32:19-04:00 — #5
That could be it! I am thinking of non-programmers entering info into a CMS and reading a note on how to make text bold and italic through <b> and <i> (although the book does not say this).
enver — 2013-05-09T10:55:28-04:00 — #6
Probably for both of those reasons and more. Without looking at the context of the manual it's hard to tell precisely why they do this but I suspect, as Michael Morris pointed out, that more people will use <b> and <i> quite simply because those tags have been around much longer and they are much better known as a consequence.
My thoughts are that just about everyone will intuitively understand the presentational significance of <b> for bold and <i> for italics, consequently making usage of them a far more common occurrence, whereas the semantic importance of <strong> and <em> would be more restricted to experienced editors and mark-up heads. Not everyone using the CMS is likely to be aware of semantic mark-up, which is an advantage of such applications, so I suppose it is a trivial matter to take the bull by the horns and do a conversion afterwards for consistency.
stevenhu — 2013-05-09T11:29:06-04:00 — #7
That's probably it.