We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33446
    • 10 Posts
    Note: This topic is a fork of the discussion at http://modxcms.com/forums/index.php/topic,26733.0.html

    Quote from: Bravado at Jul 07, 2008, 03:54 PM

    Problem is that nowhere in the HTML (http://www.w3.org/TR/html4/) spec does it mention that <i> and <b> are valid. <em> and <strong> replace these and are definitely the "right" way to do it. Reason is that the terms italic and bold refer to how text looks, not what it means. As such the W3C took <i> and <b> out of the spec.
    According to http://www.w3.org/TR/html4/present/graphics.html#h-15.2.1 <i> and <b> are part of the spec and (unlike <strike>, <s> and <u>) they’re not deprecated, which means they’re valid HTML 4.01 Strict, and hence valid XHTML 1.0 Strict, since these are semantically identical.

    I agree, it doesn’t sound too good when the spec says,

    I: Renders as italic text style.
    B: Renders as bold text style.
    and that can definitely be interpreted as being presentational, which gives us Disciples of StandardsTM a creepy feeling. The real problem is, though: while <em> is rendered in italics by default, not all text where you need italics is appropriate for emphasis.

    That’s why I think the following test helps: Read the text out loud. When you come across <em> or <strong>, change your voice (pitch, volume, duration; whatever people ususally do in your culture) to reflect that emphasis (or strong emphasis). Does it sound right?
    Try it:

    • MODx is a really useful piece of software!
    • If you think these symptoms apply to you, please see your urologist immediately.
    • In 1967, the Queen Mary went out of service and is currently chillin’ in Long Beach, California.
    • After watching Gone with the Wind, I understood once more why so many guys choose to remain in the bachelor state.

    To my understanding, using <em> for a ship’s name or book/film title is clearly wrong. Therefore, while <i> is not much more semantic, for lack of a better element I think it’s okay. Ideally, we’d need new elements/attributes to mark up all these cases. See http://en.wikipedia.org/wiki/Italics#When_to_use for more examples that are difficult to express in HTML at the moment.
    • Nice summary. smiley
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 4018
        • 1,131 Posts
        Good catch on the spec. Guess I didn’t look hard enough. My bad. wink Figures they’d put it in the part about "fonts" instead of "text". Hell, just about the entire "fonts" section of the spec is discouraged of its use due to the emphasis on them being more "presentational". Better to do all of it with CSS in my opinion.

        It also says on the same page that, although they are not all deprecated, their use is discouraged in favor of style sheets. The HTML 5 (http://www.w3.org/html/wg/html5/) spec goes on to say that the `i` element should be used as a last resort when no other element is more appropriate and that style sheets can be used to format `i` elements, just like any other element can be restyled. Thus, it is not the case that content in `i` elements will necessarily be italicized. The same applies to the `b` tag as well. So, yeah, to claim that these are deprecated isn’t entirely correct. The word "discouraged" is more accurate.

        For me though, what works for print doesn’t always translate to the web. We look at the bold and italic buttons on our word processors and automatically assume them to mean something contextual and that the same should apply to the web. Well, not necessarily. The web is a different animal and the ability to use markup to describe a document changes things. The use of bold and italic works for interfaces but no so great with markup when you need things that properly describe a document. Thus the use of `i` and `b` has become something that is discouraged among web standards advocates.
          Jeff Whitfield

          "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
        • Whether people adopt what web standardistas do is irrelevant to whether one should do something or not. Also keep in mind that the w3c is made up of humans with opinions and personal viewpoints. Many of the people in the working group may not have a writing or literary background or knowledge of styles be it AP, S&W or some other. My viewpoint is that when you clean away all the css and presentational material are you left with a document that is readable and understandable as if it was written on a typewriter on a sheet of letter. Certain presentational elements such as b and i are communicative devices not presentational elements and therefore add to the communication much like the emdash or the colon. So resorting to css to present something using italic or oblique form or in bold face is your choice.

          I quit following "TheList" at WSG because too many people bickered on what you should do and shouldn’t do but few people questioned some of the pundits paternalistic, because I said so. No one ever called them on anything or ventured to be wrong on something.

          The spec is a guidline and if you think that the markup you are ouputting is great then quit listening to me and as long as it is in the spirit of the spec’s intentions which was to mark up documents for communication then do whichever floats your boat.

          This is why I quit using XHTML 1.0 and started marking up HTML 4.01 neat and tidy. No need for caps, no need for excess closing tags for elements, markup cleanly and validate, validate.

          I choose b and i for text that requires it by guide and things I emphasize and want to make strong I will do that.

          Have fun and don’t stub our toes.

          Jay
            Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. BlogTwitterLinkedInGitHub
            • 7231
            • 4,205 Posts
            Interesting discussion. Thinking about it, using b and i would sure save time grin
              [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

              Something is happening here, but you don&#39;t know what it is.
              Do you, Mr. Jones? - [bob dylan]
              • 3749
              • 24,544 Posts
              Quote from: smashingred at Jul 07, 2008, 11:50 PM

              Whether people adopt what web standardistas do is irrelevant to whether one should do something or not. . . .
              I quit following "TheList" at WSG because too many people bickered on what you should do and shouldn’t do but few people questioned some of the pundits paternalistic, because I said so. No one ever called them on anything or ventured to be wrong on something.

              This is why I quit using XHTML 1.0 and started marking up HTML 4.01 neat and tidy. No need for caps, no need for excess closing tags for elements, markup cleanly and validate, validate.

              I choose b and i for text that requires it by guide and things I emphasize and want to make strong I will do that.

              Have fun and don’t stub our toes.

              Jay

              You and I are definitely on the same page on this one. The assumption that all italics are there for emphasis is a fairly naive one. In a reference section, for example, some things are italicized to indicate what they are, not for emphasis. Anyone familiar with the format can easily tell the journal titles, article titles, and book titles apart in this example and it would be absurd to argue that the volume numbers are italicized for emphasis; they’re italicized simply to indicate to savvy readers that they’re volume numbers:

              Adam, K., & Oswald, I. (1983). Protein synthesis, bodily renewal and the sleep-wake cycle. Clinical Science, 65, 561-567.

              Adamec, R. E., & Stark-Adamec, C. (1986). Limbic hyperfunction, limbic epilepsy, and interictal behavior: Models and methods of detection. In B. K. Doane, & K. E. Livingston (Eds.), The Limbic System. New York: Raven Press.

              Adams, G. R., & Cohen, A. S. (1974). Children’s physical and interpersonal characteristics that affect student-teacher interactions. Journal of Experimental Education, 43, 1-5.
              I think it’s a safe assumption that any browser developed in my lifetime will render <i> as italic and I can’t imagine an argument that would "discourage" me from using <i> in this context.

              The implication that bold text is just a more emphatically emphasized version of italic text is even harder to defend. Likewise the idea that <em> and <strong> are some how better than <i> and <b>. They still give you only two choices and, if they’re not rendered as italic and bold, you’re throwing out many years of shared understanding of what bold and italic text actually mean in various contexts. How that would improve the semantic relationship between your meaning and what’s on the reader’s screen continues to elude me.

              Bob




                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting
                • 33446
                • 10 Posts
                Great feedback, guys. As smashingred implied, this isn’t a matter worth getting migraines over, and everyone should follow what they think is best considering the less-than-perfect state of the art we have to work with.
                How to convey semantics in the best way under the given circumstances is an interesting subject. Dan Cederholm’s SimpleQuiz makes for nice, educational bed-time reading smiley.
                Specific to this topic see the Empholdics episode and its conclusion.

                Let me summarize my personal logic in the form of a pseudo-theorem (with humble apologies to you maths gurus out there):

                1. <em> and <strong> indicate "emphasis" and "stronger emphasis"
                2. There are cases where the established typographic convention is to use italics, but emphasis is not appropriate (names of ships, referenced works, foreign phrases etc.)
                3. These cases should ideally be marked up to convey the meaning that they are "special".
                4. We shouldn’t use <em> (see point 2.)
                5. We could avoid using <i> by using e.g. <span class="unique-name">Queen Mary</span> and .unique-name {font-style: italic;}
                6. That would take care of the visual treatment on graphical user agents.
                7. But the "naked" (unstyled) document won’t reveal the "specialness" of the text, though (when CSS is not applied, screen readers etc.), using this approach.
                8. <i> is likely to be revealed in some way on most user agents
                9. Since we don’t have elements like <uniquename type="ship"> or whatever, and the <span> solution is lost in the unstyled document, <i> seems to me to be a viable solution.

                Q.E.D., sort of (add ten pinches of salt)

                So while <i> does not convey any special meaning per se, for now it could be seen as a placeholder/alternative for all these cases where italics are usually used, but which do not indicate emphasis. Bravado aptly used "discouraged" to describe the use of debateably presentational elements, that’s the word I was missing before. I understand where that comes from but the reality is we have to deal with these constraints for now. In a perfect world we wouldn’t need backwards-compatibility for the sake of millions of existing sites and we’d have one markup language that’s supported by all UAs and that’s flexible enough to include all these cases while being spot-on semantically. Unfortunately that will probably not happen before my (as yet non-existant) grandkids get into web dev wink
                  • 6726
                  • 7,075 Posts
                  Woot that’s an interresting conversation for sure !

                  There are lots of viewpoints and interresting data in here but my take on this is : separate content and presentation. In absolute philosophical terms, it could be argued that any tag which is used to render style in anyway belong to presentation and not content... I am afraid that from this standpoint turning <em> into italics and <strong> as bold is purely arbitrary. Aren’t browsers culprit here ?

                  I have not read the articles mentionned above but I would argue that from this standpoint <i> and <b> don’t make sense if you want to clearly distinguish content and presentation since their goal is to render text as italics and bold and that should be achieved via CSS.

                  Anyway, whichever way you go, I guess the important thing is to be consistent...
                    .: COO - Commerce Guys - Community Driven Innovation :.


                    MODx est l&#39;outil id
                    • 2328
                    • 39 Posts
                    I had some fun with this in the aftermath of writing my dissertation a couple of years ago. One of the things we’d been told was to ensure our grammar was correct, so I would up learning all kinds of things about when to use certain styles and the meaning of the more obscure punctuation marks (how many people know when to use a semicolon, for example? grin). I then applied all this to my website...

                    In my experience, <i> and <b> fall right on the border between content and presentation. They are presentation because they change the way something is displayed (by making it italic or bold). They are content because they have meaning (italics can mean names, foreign words, thoughts, the introduction of new terms, etc; bold can mean emphasis).

                    Personally, I went for the <span> approach: adding an appropriate class (styled in CSS) as described in Zendak’s "unique name" example. So far as I know, this is the way you’re supposed to do it: the span class adds more semantic meaning than a simple HTML tag.

                    I certainly don’t use <em> and <strong> to achieve the effect, which completely ruins the point of the separation of style and content (these have very specific meanings and actually have noticable effects on audio screen reader software).

                    If you’re worried about the effect in ’unstyled’ documents, however, I can see no reason not to use <i> and <b> with appropriate CSS classes. Set up something like <i class="unique-name"> and make sure your CSS handles it accordingly. Meanwhile, it will work fine with no CSS.

                    It’s not illegal, it won’t break anything and you still maintain full control over the appearance.