SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Wizard
    Join Date
    Feb 2007
    Location
    Southern California
    Posts
    1,340
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Why instruct user to use <b> amd <i> in CMS?

    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?
    Steve Husting

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,810
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by StevenHu View Post
    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> ?
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  3. #3
    I solve practical problems. bronze trophy
    Michael Morris's Avatar
    Join Date
    Jan 2008
    Location
    Knoxville TN
    Posts
    2,026
    Mentioned
    64 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by StevenHu View Post
    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?
    <b> and <i> have been around a lot longer and more people are familiar with them.

  4. #4
    SitePoint Wizard
    Join Date
    Feb 2007
    Location
    Southern California
    Posts
    1,340
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by felgall View Post
    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> ?
    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.
    Steve Husting

  5. #5
    SitePoint Wizard
    Join Date
    Feb 2007
    Location
    Southern California
    Posts
    1,340
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Michael Morris View Post
    <b> and <i> have been around a lot longer and more people are familiar with them.
    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).
    Steve Husting

  6. #6
    SitePoint Enthusiast
    Join Date
    Oct 2012
    Location
    Republic of Ireland
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by StevenHu View Post
    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?
    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.

  7. #7
    SitePoint Wizard
    Join Date
    Feb 2007
    Location
    Southern California
    Posts
    1,340
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Enver,

    That's probably it.
    Steve Husting


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •