SitePoint Sponsor

User Tag List

Page 4 of 5 FirstFirst 12345 LastLast
Results 76 to 100 of 103

Thread: <p> vs <span>

  1. #76
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,789
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Stormrider View Post
    They are called the BOLD tag and ITALIC tag.
    and I always thought <b> stood for boat name tag and <i> stood for book title tag

    <a> certainly doesn't stand for hyperlink (or wait a second yes it does)
    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="^$">

  2. #77
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AutisticCuckoo View Post
    That would be an incorrect use of that element type, though. <cite> marks up a citation: a specification of a source which you have referred to, quoted or paraphrased. For instance,

    Code HTML4Strict:
    <p>In an interview in <cite>The New York Times</cite> today the president said ...</p>

    The default rendering of <cite> in most browsers is italics, which corresponds to the typographic convention of italicising the names of newspapers and magazines, and the titles of books and other publications.
    <document>
    ......
    ......
    ......

    <cite>&#169; 2009, Billy Bob</cite>
    </document>

    Cite is indicating a reference to the document(web site).

    This is the point that is argued by many authors.

  3. #78
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by cooper.semantics View Post
    <document>
    ......
    ......
    ......

    <cite>© 2009, Billy Bob</cite>
    </document>
    Well, if you're using XML you can make up your own taxonomy and grammar. But I was talking about HTML, where there is no <document> tag and where <cite> has a specific meaning.

    Quote Originally Posted by cooper.semantics View Post
    Cite is indicating a reference to the document(web site).
    The HTML 4.01 specification, which is the latest and current spec describing HTML semantics, says that the cite element type
    contains a citation or a reference to other sources
    (Emphasis mine.)

    The examples given in the text do not hint at it being used for self-referencing.

    Quote Originally Posted by cooper.semantics View Post
    This is the point that is argued by many authors.
    Lots of people have argued that the Earth is flat or that people of one skin colour/sex/religion or other is superior to the rest. Doesn't mean they're right.

    HTML was designed to satisfy the requirements of scientists publishing scientific papers. That's why we have tags like <dfn>, which is rarely used outside science and engineering. And scientists cite other sources a lot, so it's no wonder they wanted a <cite> tag for that very purpose.

    If HTML had been invented by accountants or librarians, the taxonomy would have been quite different. But as it is, we have to think like physicists to understand the intention behind most element types.
    Birnam wood is come to Dunsinane

  4. #79
    Resident curmudgeon bronze trophy gary.turner's Avatar
    Join Date
    Jan 2009
    Location
    Dallas
    Posts
    990
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Stormrider View Post
    Yes, they have semantic meaning, and I am well aware of the typographic conventions involving them, but none of this means they aren't styling tags as well. I mean, look at the name! They are called the BOLD tag and ITALIC tag. Both of those are styles. They aren't called the BOAT NAME tag or the POEM TITLE tag.
    They are styling tags only if misused. I suppose you could call them something else, but why would you? The conventions call for you to use bold or italic fonts.

    They have semantic value (as I mentioned in a previous post), and they are used for typographic conventions, and they are styling tags, all at the same time!
    See above.

    (Although, I'm pretty sure bold was never a typographic convention as you mention. Think about it - it is easy to make something italic when hand writing it, but not bold, at least not without being messy and crude about it)
    The issue was not making italic or bold in a manuscript, but how to represent typographical conventions in manuscript or with the typewriter. Back in the old days, fifty years ago when I was in school, we studied the conventions as part of learning how to write research papers. Those items that were bold in type were rendered as underscored by hand or typewriter, and the italic items were indicated by quotes.

    I'm sorry I have no more to cite than my memory. I can assure you that bold and italic were used as I have described. To this day, to see a bibliography that does not make the journal or book title bold, is jarring.

    cheers,

    gary
    Anyone can build a usable website. It takes a graphic
    designer to make it slow, confusing, and painful to use.

    Simple minded html & css demos and tutorials

  5. #80
    SitePoint Enthusiast fvsch's Avatar
    Join Date
    Apr 2009
    Location
    Lyon, France
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by yahn View Post
    Can you cite your source?
    Yes:

    http://www.w3.org/TR/html5/semantics.html#the-p-element
    which refers to
    http://www.w3.org/TR/html5/dom.html#paragraph

    This is the April 2009 version. It reads:
    The p element represents a paragraph.

    (...)

    A paragraph is typically a block of text with one or more sentences that discuss a particular topic, as in typography, but can also be used for more general thematic grouping. For instance, an address is also a paragraph, as is a part of a form, a byline, or a stanza in a poem.
    Quote Originally Posted by yahn View Post
    Additionally, why would HTML want to go in this direction?
    Because it's a common understanding of the notion of «paragraph» applied to web content, and it does no harm. Because there is very little value (or maybe none) in making the semantics of the P tag match the definition of a literary paragraph.

    Plus, it would make HTML 5 not back-compatible. In HTML 4, the definition of the P element can be understood very broadly. Actual use of the tag shows that it is used very broadly (with no problematic consequences that i know of). If HTML 5 gave a strict definition of the P element, that would mean that most HTML 4 pages would have to be modified to match that stricter definition. Unless there is a clear benefit to such a change, the change won't happen in HTML 5.

    Obviously if you think there is a clear benefit in making the P tag stricter, you can defend that case on the WHAT WG mailing list.

    Quote Originally Posted by yahn View Post
    why wouldn't there be a designated an element for fragments?
    What would be the point of such an element? I can't see one.

  6. #81
    SitePoint Wizard silver trophybronze trophy Stormrider's Avatar
    Join Date
    Sep 2006
    Location
    Nottingham, UK
    Posts
    3,133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by gary.turner View Post
    They are styling tags only if misused. I suppose you could call them something else, but why would you? The conventions call for you to use bold or italic fonts.

    See above.
    No, they are styling tags however they are used. The tags sole purpose is to apply a style to the text. It doesn't know or care why you are applying the style (eg, convention) or how you are using it, but that is what the tag does.

  7. #82
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,272
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by stormrider
    They aren't called the BOAT NAME tag or the POEM TITLE tag.
    I lawl'd! : )

    sg707, you might not agree on this user agent's reliance on the semantics of HTML, but take a listen to your pages in JAWS. It should sound ok, but try navigating through the page. That's much harder because JAWS (and surely Window-Eyes and orca if I could get the dang thing to work) rely on what little semantics there are in HTML to give more control to the user. It can look at a page and list all the lists, or just list all the links. It can list all the headers. All the forms. All the tables. And you can choose to go to the next or previous list, table, clickable link, non-clickable text, next line (p), etc. Even though the text is the same, what you use to wrap an element has much more meaning for user agents who try to get some sort of metadata from the document than using the same single element over and over.
    Google does this a little bit, not much, since they're robots... mostly just the headers <h?>, but they are also one's most frequent blind visitors.

    Maybe one of the best things about this SEO crap is it can be used as a great excuse to companies to make pages more accessible.

    Anyway, the screen reader reason alone is I think a good reason to use the right tag for the job. I've seen plenty of pages built entirely of tables, entirely of divs, entirely of lists (though that one was kind of a joke, was it Stormrider's? But funny). You know Ook? You can write whole programs in Ook, Brainf***, Whitespace... but there's a reason most of us don't : )

    Though some day I want to write something in LOLCODE, it's Turing-complete and just needs a parser (someone made one but it's limited). Then I can display it on a web page, with a little badge on the bottom: p0w3rd by ch33zburgerz!

  8. #83
    SitePoint Wizard silver trophybronze trophy Stormrider's Avatar
    Join Date
    Sep 2006
    Location
    Nottingham, UK
    Posts
    3,133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Stomme poes View Post
    I've seen plenty of pages built entirely of tables, entirely of divs, entirely of lists (though that one was kind of a joke, was it Stormrider's? But funny)
    Not me! Not heard of this before

    Quote Originally Posted by Stomme poes View Post
    Though some day I want to write something in LOLCODE, it's Turing-complete and just needs a parser (someone made one but it's limited). Then I can display it on a web page, with a little badge on the bottom: p0w3rd by ch33zburgerz!
    I've wanted to do that for a while as well!

  9. #84
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,272
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    Someone made a page from lists for the lawlz, and I thought I bookmarked it but can't find it now... : ( it was cool. Looked like a regular web page and the HTML was 100% lists : ) but it was someone here for sure.

  10. #85
    SitePoint Wizard silver trophybronze trophy Stormrider's Avatar
    Join Date
    Sep 2006
    Location
    Nottingham, UK
    Posts
    3,133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Ha, let me know if you find it!

  11. #86
    SitePoint Enthusiast
    Join Date
    Feb 2008
    Posts
    54
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @sg707: I want a link to one of your creations. I'm dying to take a look at what you've accomplished! It sounds awful, but I got to see it for myself!
    Are you up to posting a link to an "all div"-site?
    You know I'm not gon diss you on the internet
    Cause my mama taught me better than that

  12. #87
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AutisticCuckoo View Post
    Well, if you're using XML you can make up your own taxonomy and grammar. But I was talking about HTML, where there is no <document> tag and where <cite> has a specific meaning.
    Sorry, I meant <div id="document">..... I typed in <document> meaning <div id="document"> or <section>(html5).

    I know i know, your gonna say still doesn't make a difference, lol....

    Quote Originally Posted by AutisticCuckoo View Post
    The HTML 4.01 specification, which is the latest and current spec describing HTML semantics, says that the cite element type

    (Emphasis mine.)

    The examples given in the text do not hint at it being used for self-referencing.
    Yeah, it really stinks sometimes that the spec is so limited

    Off Topic:


    When you gonna join the W3C HTML working group?

    I've been reading the html5 draft and it needs your expertise

  13. #88
    SitePoint Evangelist Karpie's Avatar
    Join Date
    Jul 2007
    Location
    Perth, Australia
    Posts
    445
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I believe the list page being referenced might be this one:

    http://www.tjkdesign.com/articles/cs...ck_no_joke.asp

  14. #89
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,272
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    Holy crap Karpie, that's it!! I coulda sworn I saw it from someone here, but I remember now it was a bloggitty post from some Italian guy about should forms use lists, and this guy posted his all-lists page (half as a joke) in the comments there.

    No float signs, lawlz.

    Quote Originally Posted by Cooper to Tommy
    When you gonna join the W3C HTML working group?
    Lawlz, you mean when will Tommy switch to the Dark Side? Muhahahaha...

  15. #90
    SitePoint Member
    Join Date
    Jul 2009
    Location
    Cyberspace
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AutisticCuckoo
    Lots of people have argued that the Earth is flat ....
    That is about on par with sg707 idea about P tags. See the second paragraph at en.wikipedia.org/wiki/Flat_Earth

    Been reading this thread. Can't help laughing at sg707 for having such a peculiar idea (do you use the body tag?) and everyone else who keeps trying to correct him when it is obviously going no where.

    @sg707 can we please see one of your sites?

  16. #91
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by cooper.semantics View Post
    Yeah, it really stinks sometimes that the spec is so limited
    I don't consider that limiting, myself. On the contrary, it's brilliant that there are such well-defined element types which can only be used for one single thing (i.e., very strong semantics).

    Quote Originally Posted by cooper.semantics View Post
    When you gonna join the W3C HTML working group?

    I've been reading the html5 draft and it needs your expertise
    Not even if hell freezes over.
    I'd rather stick my legs in a mincer.
    Birnam wood is come to Dunsinane

  17. #92
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AutisticCuckoo View Post
    Not even if hell freezes over.
    I'd rather stick my legs in a mincer.

  18. #93
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,789
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by AutisticCuckoo View Post
    I don't consider that limiting, myself. On the contrary, it's brilliant that there are such well-defined element types which can only be used for one single thing (i.e., very strong semantics).
    I agree. There is almost nothing that is commonly included in web pages that doesn't have a semantic tag defined for it in HTML 4 and those tags which don't have any meaningful use are deprecated meaning that they are obsolete and shouldn't be used (and that should still apply to those proposed to be brought back in HTML 5 - they were killed off for a reason and well and truly zombified by now but unfortunately there are lots of necromancers and voodoo cultists writing the HTML 5 spec who actually prefer zombies to living people).
    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="^$">

  19. #94
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by felgall View Post
    There is almost nothing that is commonly included in web pages that doesn't have a semantic tag defined for it in HTML 4
    What about common physical/street/mailing addresses?

    Thankfully microformats pickup where html's vocabulary lacks.

  20. #95
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,789
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by cooper.semantics View Post
    What about common physical/street/mailing addresses?

    Thankfully microformats pickup where html's vocabulary lacks.
    Which is quite an appropriate way of handling such things since they appear on such a small percentage of web pages that it isn't worth having actual tags in HTML for them. If we did then HTML would have 10,000+ different tags in it and no browser would be able to handle them all properly.
    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="^$">

  21. #96
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by cooper.semantics View Post
    What about common physical/street/mailing addresses?
    That is probably not a common occurrence – especially in scientific papers – other than as the contact information of the author (for which the <address> element type is provided). And even if it does occur, it may not be very important to mark it up.

    A generic markup language like HTML can never contain element types for every possible thing anyone would like to use. We'd have billions of tags.

    Tim Berners-Lee and his colleagues chose the things they considered necessary for their work. Since the web became popular, W3C has added a few things that non-scientists wanted, but not too many. HTML5 will add some stuff that web designers want (but probably few others) because that's what the working group comprises.

    We have to ask ourselves why you'd want to mark up something with a specific tag. There are two main reasons:
    1. it's an entity which by convention has a particular style or formatting, so browsers should display them in a certain way even without an author style sheet
    2. it's a piece of information that might be interesting for a semantic extractor application.


    In the first case, browsers need to be updated to provide the special styling. Then users have to upgrade to the latest versions of those browsers. Then web designers/developers need to start using those tags. All this takes a long time, which I believe is why W3C is reticent to introduce new element types.

    In the second case, there needs to be a well-defined taxonomy and a range of applications that can make use of the information. Despite W3C's best efforts, the semantic web hasn't really caught on yet. With some minute insight into the XBRL* taxonomy project I understand why. This is tricky stuff, there are a lot of cooks and we don't want to spoil the broth.

    *) XBRL = extensible business report language, an application of XML

    For information that doesn't really fit into either of the two aformentioned categories, we can just use <div class=""> and <span class=""> and, as it were, roll our own.
    Birnam wood is come to Dunsinane

  22. #97
    Non-Member
    Join Date
    Oct 2007
    Location
    United Kingdom
    Posts
    623
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AutisticCuckoo View Post
    An inline <span> cannot be an alternative to a block-level <p>. That's like wondering whether you should use a T-shirt or a wardrobe.
    LOL I love that analogy!

  23. #98
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AutisticCuckoo View Post
    That is probably not a common occurrence – especially in scientific papers – other than as the contact information of the author (for which the <address> element type is provided). And even if it does occur, it may not be very important to mark it up.

    A generic markup language like HTML can never contain element types for every possible thing anyone would like to use. We'd have billions of tags.

    Tim Berners-Lee and his colleagues chose the things they considered necessary for their work. Since the web became popular, W3C has added a few things that non-scientists wanted, but not too many. HTML5 will add some stuff that web designers want (but probably few others) because that's what the working group comprises.

    We have to ask ourselves why you'd want to mark up something with a specific tag. There are two main reasons:
    1. it's an entity which by convention has a particular style or formatting, so browsers should display them in a certain way even without an author style sheet
    2. it's a piece of information that might be interesting for a semantic extractor application.


    In the first case, browsers need to be updated to provide the special styling. Then users have to upgrade to the latest versions of those browsers. Then web designers/developers need to start using those tags. All this takes a long time, which I believe is why W3C is reticent to introduce new element types.

    In the second case, there needs to be a well-defined taxonomy and a range of applications that can make use of the information. Despite W3C's best efforts, the semantic web hasn't really caught on yet. With some minute insight into the XBRL* taxonomy project I understand why. This is tricky stuff, there are a lot of cooks and we don't want to spoil the broth.

    *) XBRL = extensible business report language, an application of XML

    For information that doesn't really fit into either of the two aformentioned categories, we can just use <div class=""> and <span class=""> and, as it were, roll our own.
    Yea, that makes perfect sense to me....

  24. #99
    SitePoint Enthusiast
    Join Date
    Feb 2008
    Posts
    54
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What about RDFa? I think this seems like a good solution for adding semantics to already existing tags.
    You know I'm not gon diss you on the internet
    Cause my mama taught me better than that

  25. #100
    SitePoint Guru Chroniclemaster1's Avatar
    Join Date
    Jun 2007
    Location
    San Diego, CA
    Posts
    784
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AutisticCuckoo View Post
    The examples given in the text do not hint at it being used for self-referencing.
    The only tag I'm familiar with for self-referencing is the
    Code:
    <address>
    tag for providing your own contact information.

    Which is a pretty silly thing to do in this age of identity theft. That's why we use contact forms.
    Whatever you can do or dream you can, begin it.
    Boldness has genius, power and magic in it. Begin it now.

    Chroniclemaster1, Founder of Earth Chronicle
    A Growing History of our Planet, by our Planet, for our Planet.


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
  •