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?
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> ?
<b> and <i> have been around a lot longer and more people are familiar with them.
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.
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).
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.
That's probably it.
This topic is now closed. New replies are no longer allowed.