SitePoint Sponsor

User Tag List

Page 2 of 2 FirstFirst 12
Results 26 to 49 of 49

Thread: <strong> or <b>

  1. #26
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,247
    Mentioned
    59 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by sdt76 View Post
    But if semantically you disagree, you can always use SPAN.
    i do, but i won't, thanks just the same

    B is ~way~ more semantic than SPAN as a visual but not necessarily audible cue
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  2. #27
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,247
    Mentioned
    59 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by Stomme poes View Post
    They use em's, and I think I disagree with that...
    i don't think, ~know~ i do too... i use CITE

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #28
    SitePoint Addict
    Join Date
    Jul 2011
    Posts
    365
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well as I understand web semantics, they are intended to describe the content. The reason I maintain that B meaningless is because it does not describe the content. In other words, it does not describe what the content IS, only what it LOOKS LIKE, which is something we in the web profession are trying to get away from in our markup because using visual tags takes away our flexibility.

    When you use <B>, what happens when you don't want the text to be bold anymore? Too bad. It's in your markup, live with it. The solution is proposed here that you simply edit the CSS to make <B> be whatever you want. To me that is a bad practice, because if you have <b> that is not visually bold, you are still stuck with "bold" in your markup, and you still aren't indicating what the friggin content IS, only what it looks like. Only now, having edited the <B> to NOT be bold, your markup is lying to you.

  4. #29
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,247
    Mentioned
    59 Post(s)
    Tagged
    3 Thread(s)
    i still contend that

    <b class="make-this-appear-bold-visually-but-not-audibly">vwalah</b>

    is a lot better than

    <span class="make-this-appear-bold-visually-but-not-audibly">vwalah</span>

    paraphrasing what someone recently said, "you are still stuck with SPAN in your markup" which in my opinion has a higher "eewwww" factor
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  5. #30
    SitePoint Addict
    Join Date
    Jul 2011
    Posts
    365
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by r937 View Post
    i still contend that

    <b class="make-this-appear-bold-visually-but-not-audibly">vwalah</b>

    is a lot better than

    <span class="make-this-appear-bold-visually-but-not-audibly">vwalah</span>

    paraphrasing what someone recently said, "you are still stuck with SPAN in your markup" which in my opinion has a higher "eewwww" factor
    Yeah but in doing that, you have misused the point of SPANs and CLASS NAMES. You wouldn't say "make-this-appear ...." Your classnames should describe what the content is. SPAN is neutral in meaning, where the added classname gives the meaning. So rather than name a class visually which is just as bad as using <b>, you do this <span class="keywords">. That class name tells you what the content IS, not what it looks like. So you can control what it looks like in the CSS (ie make it bold or italic) and never run into a problem of a conflict with your markup and CSS.

    Class names should not be presentational.

  6. #31
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,247
    Mentioned
    59 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by sdt76 View Post
    Your classnames should describe what the content is.

    i'm not <b class="word-or-phrase-that-should-stand-out-visually">misusing</b> the point of class names at all, my class names always describe their content semantically

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  7. #32
    SitePoint Addict
    Join Date
    Jul 2011
    Posts
    365
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A class name of: "make-this-appear-bold-visually" does not tell what the content is, only what it looks like. If you do that, yes, you might as well use <B>. The whole idea is that if you change your mind on "make this appear bold" and you want "make this appear normal and red" you have a classname of "make this appear bold" when it's not bold.

    My question would be WHAT are you making appear bold? A book title? A keyword? IF THAT is your class name then you can make it be what you want without having to change your markup to reflect. It makes maintenance easier, especially in a redesign.

  8. #33
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    The problem with using classes is they don't say ANYTHING -- they provide NO information to the user or user agent that the text inside them is ANY different than the text around it... that's actually what spans are for.

    there is also NO standard for class names, so class names are meaningless...

    As such
    Code:
    I was reading <span class="bookTitle">Wizards First Rule</span> the other night.
    Doesn't convey anything to the user -- especially CSS off -- which is something you SHOULD be keeping in mind when writing your markup -- part of why I do markup FIRST. That is EXACTLY when the italic tag should be used. You use the more semantic tags when they apply, span when you are NOT implying any extra meaning or conveying anything different... Titles of books or products, algebraic symbols, names of ships, mathematical constants (though you could argue the use of VAR on that one), text that is being de-emphasized instead of emphasized (like in a retracted clause/exemplar text)... These are not things that a SPAN is going to work worth a flying purple fish on. Likewise company names, exemplar titles, and mathematical deviate expressions are bold -- they are NOT emhasized and since span means nothing, it shouldn't be used instead of BOLD.

    I -- for when text SHOULD BE Italic for a semantic reason we don't really need fifty different tags for. Book title, ship name, etc...

    EM -- for when text is receiving emphasis, making it of greater import or stress than the text around it.

    B -- for when text SHOULD BE bold for a semantic reason we don't really need fifty different tags for. Company name, exemplar title, non-heading titles (when you already have a semantic section wrapper), etc...

    STRONG -- for when text is receiving MORE emphasis, making it of greater import than normal text or EM text on the page.

    SPAN -- for when text is receiving some style or some grouping that is not semantically important and can be ignored by the user agent.

    <strong>IS THAT SO MALFING HARD PEOPLE!?!?!</strong>

  9. #34
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,247
    Mentioned
    59 Post(s)
    Tagged
    3 Thread(s)
    so where would you use CITE then?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  10. #35
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by r937 View Post
    so where would you use CITE then?
    When it's being used as a source for the information presented.

    I read <i>Moby Dick</i>.

    does not warrant a CITE. I'm not citing ANYTHING! Now, if I was to go...

    As <cite>Herman Melville said in <i>Moby Dick</i></cite>, <q>"Of all mortals, some dying men are the most tyrannical; and certainly, since they will shortly trouble us so little for evermore, the poor fellows ought to be indulged."</q>

    CITE is a phrase element for a reason.

    ... and yes, I'm with the crowd that says quotation marks should be in the markup and NOT added automatically.

    Another example I've used before involves simply paraphrasing -- so no quote is involved but CITE is still semantically correct.

    As reported by <a href="http://www.wmur.com/news/4662061/detail.html"><cite>WMUR News 9</cite></a> in 2006 the police arrested a man for hiding in the tank of a women's outhouse at a public park in Albany, NH.

    Citing the source material of a statement -- that's what CITE is for.
    Last edited by deathshadow60; Nov 11, 2011 at 02:51. Reason: code tags actually made it impossible to read

  11. #36
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,276
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    HTML5 has neutered cite (the tag). It's pretty much useless now (all UAs who have an HTML5 parser will consider any page sent as text/html as HTML5. Hm).

    Yeah, titles of works only. Useless.

  12. #37
    SitePoint Addict
    Join Date
    Jul 2011
    Posts
    365
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by deathshadow60 View Post
    The problem with using classes is they don't say ANYTHING -- they provide NO information to the user or user agent that the text inside them is ANY different than the text around it... that's actually what spans are for.

    there is also NO standard for class names, so class names are meaningless...
    Class names do convey meaning. That's the point of them. That's why people use classes like "header" which, in the markup, conveys "everything within that class is the header."

    So if you decide to re-design your website, you know that to re-style the header, you work within those classes.

    You use the more semantic tags when they apply, span when you are NOT implying any extra meaning or conveying anything different...
    SPAN is useful for when a tag doesn't exist that describes the content more specifically. For example <p> is very general. However, what about more specific bodies of text, like I explained, Book Title. There is no element for book titles, so in order to style for a book title, which is not a paragraph in itself, and absent of another tag that does the job, SPAN works perfectly, because you can add the meaning yourself.

    That's why the W3 says: "If you do use them (<b> and <i>), it is usually better to add class attributes that describe the intended meaning of the markup"


    Titles of books or products, algebraic symbols, names of ships, mathematical constants (though you could argue the use of VAR on that one), text that is being de-emphasized instead of emphasized (like in a retracted clause/exemplar text)... These are not things that a SPAN is going to work worth a flying purple fish on.
    You are right. SPAN is useless for the above, only if you do not add class attributes that describe the meaning of the markup. Then it becomes very useful. And I would also add that ANYTHING that is set apart VISUALLY, is of course emphasized. If you put a BOLD on any part of otherwise unbolded text and you think you are de-emphasizing it, you're totally off the mark on how visual stimulus works.

    I -- for when text SHOULD BE Italic for a semantic reason we don't really need fifty different tags for. Book title, ship name, etc...
    SHOULD BE, is a matter of opinion, because as we have seen, not every culture shares the same conventions. Regardless of what is grammatically correct, when you use <i> you are introducing a tag which describes a STYLE of TYPE. Therefore, for whatever reason, if you change your mind about the style of type to something NON italic, you are stuck with markup that doesn't jibe. <em> can be used for any of it. Or SPAN with added class attributes for meaning, especially if you want to create a style for ".deEmphasizedText" . Now you can de-emphasize it any way you want, with italics or whatever else.

  13. #38
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by sdt76 View Post
    Class names do convey meaning. That's the point of them.
    To the DEVELOPER for the application of STYLE -- they mean absolutely NOTHING to user agents or users in a semantic sense -- users in particular since THEY NEVER SEE THEM. There is NO standard of naming conventions for classes, so they apply ZERO SEMANTIC MEANING.

    Which means classes from a semantic markup point of view, just like the spans you could apply them to, mean exactly two things -- and Jack left town, took his **** with him.

    <h2 class="hasBorder"> does not change the semantic meaning of H2 or add any extra meaning to it.

    <b class="bookTitle"> does not change the semantic meaning of B or add any extra meaning to it.

    <div class="introduction"> does not change the semantic meaning of DIV or add any extra meaning to it.

    <span class="keyword"> does not change the semantic meaning of SPAN or add any extra meaning to it.

    To users and user-agents classes mean absolutely nothing, and exist solely as hooks for applying non-semantic style. ANYONE telling you otherwise is packing you so full of sand you could change your name to Sahara.

    Oh, and I was referring to the use of <I> for de-emphasis, not bold... <i>(like in a retracted clause or exemplar)</i>

    It's part of why semantics has NOTHING to do with style or actual rendered appearance; and why CSS cannot change the semantic meaning of the tags it's applied to!!!

  14. #39
    SitePoint Addict
    Join Date
    Jul 2011
    Posts
    365
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by deathshadow60 View Post
    It's part of why semantics has NOTHING to do with style or actual rendered appearance; and why CSS cannot change the semantic meaning of the tags it's applied to!!!
    The point of class names is NOT to CHANGE the meaning of an element. It is to ADD meaning to the markup by way of a description. <I> FAILS in that. It does not describe the content within, only what typographic style results.

    <span class="keyword"> does not change the semantic meaning of SPAN or add any extra meaning to it.
    If the hook is related to the textual content of the page as in "keyword" not the style, as in "red," then you have flexibility to to make the content within the span whatever you want. It does not change the meaning of SPAN, but adds meaning to the MARKUP insofar as how the styles and the content are related.

    The semantic meaning of <i> is "italic" which makes it presentational as a style of typography. It does not mean anything other than "italic", unless someone reads into the INTENTION of using the tag based on the surrounding text and says "that must be a book title." In that case that person is not deriving the semantic meaning from <i>.

    Why don't we create tag with classes like <span="redtext"> because anyone who does that is missing the point of semantics. Same with <i>. That is why the W3 recommends: "If you do use them (<b> and <i>), it is usually better to add class attributes that describe the intended meaning of the markup"

    Why is that? Well...... because <i> doesn't give you any other meaning than "italic."

  15. #40
    SitePoint Addict
    Join Date
    Jul 2011
    Posts
    365
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What's interesting about this conversation is how much you talk against HTML 5 and their relaxing of standards, yet you are adopting their CHANGE of meaning from HTML 4.01 to HTML 5, where in HTML 4.01 <i> was strictly a font tag, and now in HTML 5, they have changed the meaning. It looks like you are embracing HTML 5 after all, at least in that respect.

    HTML 5 spec re-defining <i> as offset text, rather than doing the right thing and snuffing it out along with <font> really is one of the stupidest things I have heard of. Why? Because whether offset text should be italic or not is up to the stylesheet, NOT the markup. If you need a tag that indicates offset text then recommend a tag <offset> but don't pretend that italics is the only way to do that. Emperor has no clothes. But, hey, if you adopt HTML 5, go for it. I won't use <i> myself, but that's just me. Do what you want.

    I just think it's ironic that you seem to loathe HTML 5 except in this sense.

  16. #41
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by sdt76 View Post
    It is to ADD meaning to the markup by way of a description.
    It doesn't add jack, because there are no standards of meaning for it and it's NOT SHOWN TO THE USER. Remember, the entire reason for HTML/CSS is that what you do in the CSS with those classes means JACK **** FOR MEANING. It might mean something to the coder, and that's IT.

    Quote Originally Posted by sdt76 View Post
    The semantic meaning of <i> is "italic" which makes it presentational as a style of typography.
    Not from a grammatical point of view in it's use. Again, the difference between "should be" and "must be"

    Quote Originally Posted by sdt76 View Post
    unless someone reads into the INTENTION of using the tag based on the surrounding text and says "that must be a book title."
    which is true of ANY semantic tag in terms of how you present it... so difference ZERO.

    Quote Originally Posted by sdt76 View Post
    In that case that person is not deriving the semantic meaning from <i>.
    BULLCOOKIES... because if you used a span and had CSS off, what meaning would they get then? NONE!

    Quote Originally Posted by sdt76 View Post
    That is why the W3 recommends: "If you do use them (<b> and <i>), it is usually better to add class attributes that describe the intended meaning of the markup"
    Where is that, because that's the dumbest thing I've heard yet.


    Quote Originally Posted by sdt76 View Post
    where in HTML 4.01 <i> was strictly a font tag
    BULL, if it was, it would have been deprecated. All four tags serve different purposes, which is why all four exist. (B, I, EM and STRONG) -- there are situations for the use of each. It's like people never quite grasped the differences between normative and informative;

    Rendering of font style elements depends on the user agent. The following is an informative description only.
    Which is why they despite being "font style" tags the final appearance is NOT the meaning of the word. User agent interpretation of the markup is the entire REASON TO USE HTML IN THE FIRST PLACE!!! Which again is why if you're choosing tags on the default appearance, you're choosing the wrong tags.

    Quote Originally Posted by sdt76 View Post
    HTML 5 spec re-defining <i> as offset text
    Whiskey tango foxtrot is "offset text"?!?

    Quote Originally Posted by sdt76 View Post
    Because whether offset text should be italic or not is up to the stylesheet, NOT the markup.
    Then you have completely failed to grasp the purpose of semantic markup, or the reasoning behind separation of presentation from content. "Would be italic" does not mean MUST BE ITALIC -- hence the entire "Rendering of font style elements depends on the user agent." to which should be appended "or CSS" -- it's a hint for non-CSS browsers, which should be the FIRST STAGE IN WRITING YOUR HTML.

    But of course with people sleazing out PSD's any old way then trying to slice that asshattery into a useful website, I suppose not writing complete semantic markup of your content before even THINKING layout is 'radical' and 'out there' in noodle-doodle territory... and people wonder why I'm disgusted to the point of nausea with the Web Development industry as a whole... much less the state of literacy. With the QUALITY of literacy at an all-time low (despite the number being at a all time high) such nuances are easily lost upon the masses.

  17. #42
    SitePoint Addict
    Join Date
    Jul 2011
    Posts
    365
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http://www.w3.org/International/ques...a-b-and-i-tags

    "The HTML5 specification redefines b and i elements to have some semantic function, rather than being purely presentational. However, the simple fact that the tag names are 'b' for bold and 'i' for italic means that people are likely to continue using them as a quick presentational fix."

    So according to the above, before HTML 5 <i> had NO semantic function.
    ......


    "You should not use b and i tags if there is a more descriptive and relevant tag available. If you do use them, it is usually better to add class attributes that describe the intended meaning of the markup, so that you can distinguish one use from another. "

    .........

    "The HTML5 specification redefines the intended use of these elements as follows."

    “The i element represents a span of text in an alternate voice or mood, or otherwise offset from the normal prose, such as a taxonomic designation, a technical term, an idiomatic phrase from another language, a thought, a ship name, or some other prose whose typical typographic presentation is italicized.”

    (so if they recommended <offset> it would be much better than refining "italic" as "offset.")

    ............


    "A general issue. Using b and i tags can be problematic because it keeps authors thinking in presentational terms, rather than helping them move to properly semantic markup. At the very least, it blurs the ideas. To an author in a hurry, it is tempting to just use one of these tags in the text to make it look different, rather than to stop and think about things like portability and future-proofing."

    ..............



    "Japanese example. Just because an English document may use italicization for emphasis, document titles and idiomatic phrases in a foreign language, it doesn’t hold that a Japanese translation of the document will use a single presentational convention for all three types of content. Japanese authors may want to avoid both italicization and bolding, since their characters are too complicated to look good in small sizes with these effects."

  18. #43
    SitePoint Addict
    Join Date
    Jul 2011
    Posts
    365
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    HTML 4.01 under the heading Alignment, Font Style, and horizontal rules:

    Rendering of font style elements depends on the user agent. The following is an informative description only.

    TT: Renders as teletype or monospaced text.
    I: Renders as italic text style.
    B: Renders as bold text style.
    BIG: Renders text in a "large" font.
    SMALL: Renders text in a "small" font.
    STRIKE and S: Deprecated. Render strike-through style text.
    U: Deprecated. Renders underlined text.

    http://www.w3.org/TR/html4/present/graphics.html

  19. #44
    SitePoint Addict
    Join Date
    Jul 2011
    Posts
    365
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    But of course with people sleazing out PSD's any old way then trying to slice that asshattery into a useful website, I suppose not writing complete semantic markup of your content before even THINKING layout is 'radical' and 'out there' in noodle-doodle territory... and people wonder why I'm disgusted to the point of nausea with the Web Development industry as a whole... much less the state of literacy. With the QUALITY of literacy at an all-time low (despite the number being at a all time high) such nuances are easily lost upon the masses.
    Quit whining.

  20. #45
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by sdt76 View Post
    Rendering of font style elements depends on the user agent. The following is an informative description only.
    Learn to read the specifications.

  21. #46
    SitePoint Addict
    Join Date
    Jul 2011
    Posts
    365
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    "It may help to think of b or i elements as essentially a span element with an automatic fallback styling. Just like a span element, these elements usually benefit from class names if they are to be useful."

  22. #47
    SitePoint Member liquidair's Avatar
    Join Date
    Nov 2011
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well this is a very long post just for a spammer lol
    I would just stay away from depreciated code.

    Dave

  23. #48
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,247
    Mentioned
    59 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by liquidair View Post
    I would just stay away from depreciated code.
    me too, i like my html tags to retain their value

    B and I might be depreciated by some people, but they are certainly not deprecated
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  24. #49
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by r937 View Post
    B and I might be depreciated by some people, but they are certainly not deprecated
    Which is another example of the piss poor language used by the spec... I hear "deprecate" and I think that condescending baby voice people use when talking to kids under the age of 12.. which I used to go around slapping people for using on me from about the age of 3 to being a teen. What, are we scolding it like a dog that just left a load on the floor? "Bad Tag! Bad Tag! Come here, I'm gonna rub your nose in it!" uh-uh... mommy spank...

    Even though it's the wrong word, depreciate, to lower in value -- makes more sense... It's certainly a more common word people might actually know the meaning of. The spec seems to love vague words the average person wouldn't know -- making an already needlessly complex document even harder to deal with.

    It's one lawyer away from legalese. Hell, both the HTML4 and HTML5 specs read like they were written by someone who failed the BAR, couldn't get elected to public office, so went back to learn creative writing... and then never once learned anything about computers before writing a computer specification.


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
  •