SitePoint Sponsor

User Tag List

Page 3 of 5 FirstFirst 12345 LastLast
Results 51 to 75 of 103

Thread: <p> vs <span>

  1. #51
    SitePoint Zealot
    Join Date
    Jul 2006
    Posts
    116
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I do not see anywhere clearly stated that p should or should not be used in this situation. However, if the w3 reigns supreme:
    Code:
    <p><em>Start tag: <strong>required</strong>, End tag: <strong>
    required</strong></em></p>
    The w3 uses the p element exactly how I think it shouldn't.

    However, the w3 also does not self-close tags and only validates under transitional, so I'm still not completely satisfied.

  2. #52
    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 sg707 View Post
    Honestly, we should have some tech battle rap w/ beers in hand and see who wins~ lol that would be totally geeky but I think it would be fun. Yes, I do understand your point. If I'm wrong I'll learn it the hard way. I still believe in my philosophy.
    The thing is, it isn't you who learns it the hard way, it's your users. I cannot believe you are offering a professional service like this, and making money off people by providing at best poor quality, at worst illegal, work.

    It's people like you that are the reason I am in such strong support of a recognised qualification in website design that people buying services can look for.

    It might well 'work' and be fine for you, but that doesn't make it right, and it doesn't make it valid.

    You are trying to use HTML, a language for defining structure, to completely remove all structure from your site. That is incredibly counter productive, and as others have said - why not just use a text document?

  3. #53
    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)
    But anyway, back on topic: I think it's perfectly acceptable to use <p> here. Paragraphs don't have to be long pieces of text, there is no 'minimum words' to constitute a paragraph (Look in many books, and some are only 1 word long). And as Tommy said (I think), that copyright statement is only a shortened version of the full sentence anyway.

    There is always HTML5's <small> tag I guess (if it still is in the spec? Not up to date with it...)

  4. #54
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,861
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Stormrider View Post
    There is always HTML5's <small> tag I guess (if it still is in the spec? Not up to date with it...)
    <small> is in the HTML 4 standard already but is an inline tag not a block one.
    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="^$">

  5. #55
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @Stormrider

    Yep, the small element is still in spec:

    Small element in html5 is defined as a way to represent "legalese describing disclaimers, caveats, legal restrictions, or copyrights. Small print is also sometimes used for attribution."
    http://www.whatwg.org/specs/web-apps...-small-element

  6. #56
    SitePoint Addict fattyjules's Avatar
    Join Date
    Dec 2005
    Posts
    295
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Three paragraphs?

    Maybe.

    Bye!

  7. #57
    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
    <cite> is also commonly used to indicate ownership and authorship of a web page.
    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.

    Quote Originally Posted by sg707 View Post
    Thanks for the advice but being a in this field for 10 years, I'm sure I know a thing or two about web technology.
    I'm sure you do, but you definitely haven't understood the absolutely most principal fundamentals of it, viz. what the various technologies are meant for.

    And if you believe that the purpose of <p> is to apply styling, then I have to wonder what you've been doing these 10 years.

    HTML element types specify what bits of the content are and, to some degree, how they related to one another (through nesting). In other words, semantics and structure. They say nothing whatsoever about how things should be presented. Browsers have default styling for all element types and they are generally very similar across browsers, but that's just a convenient side-effect.

    A web designer/developer who only uses <div> is like a carpenter who only uses a hammer for everything. Yes, you can hammer in screws, you can perhaps break boards and planks by hitting them very hard, and you might even be able to make them smoother by rubbing them vigorously with your hammer. But using a screwdriver, a saw and a plane instead would (a) be much easier and faster and (b) give a far superior result.
    Birnam wood is come to Dunsinane

  8. #58
    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 felgall View Post
    <small> is in the HTML 4 standard already but is an inline tag not a block one.
    ...and it's purpose in HTML 5 is different than in HTML 4.

  9. #59
    SitePoint Enthusiast fvsch's Avatar
    Join Date
    Apr 2009
    Location
    Lyon, France
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Regarding the original question:

    1. Both HTML 4 and HTML 5 define the P element as representing a “paragraph”.
    2. HTML 4 doesn't define what a “paragraph” is. It does not specifically link the P element with the stylistic and grammatical construct called a paragraph.
    3. HTML 5 does define what a “paragraph” is regarding the spec. The current specification text says small chunks of text that do not form a sentence (like your copyright notice example) may be marked with the P element.

  10. #60
    SitePoint Wizard
    Join Date
    Apr 2007
    Posts
    1,401
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Stormrider View Post
    The thing is, it isn't you who learns it the hard way, it's your users. I cannot believe you are offering a professional service like this, and making money off people by providing at best poor quality, at worst illegal, work.

    It's people like you that are the reason I am in such strong support of a recognised qualification in website design that people buying services can look for.

    It might well 'work' and be fine for you, but that doesn't make it right, and it doesn't make it valid.

    You are trying to use HTML, a language for defining structure, to completely remove all structure from your site. That is incredibly counter productive, and as others have said - why not just use a text document?
    Ok~ I think this crosses the line of my profession. How can you evaluate one person's skill based on the simplest language HTML? This just tells me how ignorant you are. For HTML, I don't even put that under my resume. Jeez~ Fine, let me say "YOU ARE THE BEST HTML PROGRAMMER". Happy?

  11. #61
    SitePoint Wizard
    Join Date
    Apr 2007
    Posts
    1,401
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    In some way, this reminds me of the day when people were trying to mimic Object Oriented programming in C (before C++ came). Everyone hated OO concept and people cried that C was not meant for OO. Yet, people still mimic OO in C using "struct". Yes, I remember those days. Now people are all over OO as if it's their best friend. Again, the way I'm using could be "wrong" but I strongly believe people need to think outside the box to come up with new way of doing things. Now I am accused of wasting my 10 yrs in IT because people think I suck in HTML~ what a cruel world!! I think all those IT publishers who took my ideas and printed must feel so stupid (not this HTML Idea, something else)~~ lol. Anyways, I'm glad I'm not part of the group who simply goes for "popular" choice. Still, it's common that new ideas are hated first then loved later. Yes, I get your points but I'm still going to follow my belief. Let's get back to original thread.

  12. #62
    #titanic {float:none} silver trophy
    molona's Avatar
    Join Date
    Feb 2005
    Location
    from Madrid to Heaven
    Posts
    8,259
    Mentioned
    245 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by sg707 View Post
    O"YOU ARE THE BEST HTML PROGRAMMER". Happy?
    Off Topic:

    Oh, I would love that you would say something like that about me, even if it is not true... but then, this kind of mistake that really makes me wonder about IT literacy... since when is HTML a programming language?

  13. #63
    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 sg707 View Post
    In some way, this reminds me of the day when people were trying to mimic Object Oriented programming in C (before C++ came).
    Back then you declared every variable as void*, am I right?
    Because that's the equivalent of only using <div> in HTML.

    Code:
    void* foo = "A string";
    void* bar_count = "42";
    Quote Originally Posted by molona View Post
    since when is HTML a programming language?
    I think we have already established that sg707 hasn't quite grasped what HTML is.

    Sorry for picking on you like this sg707, but it's so hard to resist. And I think your skin is thick enough to take some friendly ribbing, eh?
    Birnam wood is come to Dunsinane

  14. #64
    SitePoint Zealot
    Join Date
    Jul 2006
    Posts
    116
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    3. HTML 5 does define what a “paragraph” is regarding the spec. The current specification text says small chunks of text that do not form a sentence (like your copyright notice example) may be marked with the P element.
    Can you cite your source? HTML is still a working draft and, of the drafts I've seen, I have not seen this statement anywhere. I'm not saying you're wrong, but I would like to see it.

    Additionally, why would HTML want to go in this direction? If HTML 5 is supposed to be about making the web more semantic, why wouldn't there be a designated an element for fragments?

  15. #65
    SitePoint Wizard
    Join Date
    Apr 2007
    Posts
    1,401
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AutisticCuckoo View Post
    Back then you declared every variable as void*, am I right?
    Because that's the equivalent of only using <div> in HTML.

    Code:
    void* foo = "A string";
    void* bar_count = "42";

    I think we have already established that sg707 hasn't quite grasped what HTML is.

    Sorry for picking on you like this sg707, but it's so hard to resist. And I think your skin is thick enough to take some friendly ribbing, eh?
    Neh, I'm used to it. In my life, many people have told me it's NOT Possible and I always loved it when I prove them wrong. Speaking one's mind and believing is more important than believing in other people's philosophy. Still, I'm glad I got my point out and yours. It's good to know both sides.

  16. #66
    SitePoint Member
    Join Date
    Jul 2009
    Location
    Tampa, FL
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I vote for p tags. Span is too netscape'ish.

  17. #67
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,861
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Stormrider View Post
    ...and it's purpose in HTML 5 is different than in HTML 4.
    That still doesn't change the fact that it is an inline tag and not a block tag. Defining it any different in HTML 5 would mean browsers couldn't support both HTML 4 and 5 and you'd need two different browsers depending on which HTML the page uses (since browsers ignore the actual specification and implement their own interpretation of each tag using the doctype only as a switch to turn on standards mode).
    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="^$">

  18. #68
    SitePoint Zealot
    Join Date
    Jul 2008
    Posts
    188
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by sg707 View Post
    Anyways, I'm glad I'm not part of the group who simply goes for "popular" choice. Still, it's common that new ideas are hated first then loved later. Yes, I get your points but I'm still going to follow my belief. Let's get back to original thread.
    sg707, this is not about the "popular choice," and it is not a matter of you having a new idea that will be rejected at first then accepted later; this is not a matter of, "you all have your way and i have my way and we're all friends and in the end it doesn't really matter what method you pick," and it's not about you being some visionary, avant garde trailblazer who has a better way of doing things when all the other poor schmucks are being left in your dust. Trust us, we admire visionary, avant garde trailblazers but in this regard you are not one of them. This is a matter of you simply having an incorrect understanding of the subject you're talking about. We are not persecuting you for saying the earth is round. We are correcting you for saying it is flat.

  19. #69
    SitePoint Zealot
    Join Date
    Jul 2008
    Posts
    188
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by clydedurell View Post
    I vote for p tags. Span is too netscape'ish.
    How so? And you're really saying to use P tags in place of the proper use of SPAN tags?

    BTW, it's okay to cite HTML tags in uppercase when not within an XHTML document you are hoping to validate. Once XHTML came along people seem to have got this idea in their head that they had to mention HTML tags in lowercase everywhere.

  20. #70
    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 felgall View Post
    That still doesn't change the fact that it is an inline tag and not a block tag. Defining it any different in HTML 5 would mean browsers couldn't support both HTML 4 and 5 and you'd need two different browsers depending on which HTML the page uses (since browsers ignore the actual specification and implement their own interpretation of each tag using the doctype only as a switch to turn on standards mode).
    I didn't say it wasn't, my point was made in addition to yours!

  21. #71
    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 MauiMan2 View Post
    sg707, this is not about the "popular choice," and it is not a matter of you having a new idea that will be rejected at first then accepted later; this is not a matter of, "you all have your way and i have my way and we're all friends and in the end it doesn't really matter what method you pick," and it's not about you being some visionary, avant garde trailblazer who has a better way of doing things when all the other poor schmucks are being left in your dust. Trust us, we admire visionary, avant garde trailblazers but in this regard you are not one of them. This is a matter of you simply having an incorrect understanding of the subject you're talking about. We are not persecuting you for saying the earth is round. We are correcting you for saying it is flat.
    This. In fact, it isn't even a new way of doing things, as divitis is quite common, and it's just as wrong everywhere else too!

    Look at it this way: You are using HTML. HTML has a defined specification, which you are ignoring. You don't have a new and amazing way of using HTML, you are just using it incorrectly. The web is not going to move in the direction you think, in fact the complete opposite - for MORE semantics. You have no understanding of what HTML tags are for, and don't understand that they (mostly) aren't styling tags (There are a couple of exceptions, <b> and <i> come to mind, but they still have semantic value as well). It's not a case of having 2 different ways of doing things, or 2 schools of thought, or anything like that, it's as simple as you are using the language incorrectly, and doing harm to anyone who tries to use your site as a result.

    I don't want to keep having a dig at you, but I'm just trying to get you out of the mindset that yours is a 'differnet but equally valid' way of doing things, which you seem to be in. It's just plain wrong. If you don't believe us, read the HTML specification. If you don't want to follow the HTML specification, don't use HTML (although you'd be pretty stuck providing a similar experience any other way).

  22. #72
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,861
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Stormrider View Post
    There are a couple of exceptions, <b> and <i> come to mind, but they still have semantic value as well
    Those tags are not for styling either - they have a specific use for discussions of typography as well as in areas where a particular typographical convention was adopted long before the invention of the internet - for example it became a common practice to show the names of books in italics several hundred years ago and so continuing that centuries old convention would be an acceptable use for the <i> tag. In that situation the use of the <i> tag would be the correct semantic tag for a book title.
    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="^$">

  23. #73
    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)
    Yeh, they are used for typographic conventions, but that doesn't mean they aren't styling tags. They are used for typographic styling conventions.

  24. #74
    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
    Yeh, they are used for typographic conventions, but that doesn't mean they aren't styling tags. They are used for typographic styling conventions.
    I disagree. The italic and bold element tags have intrinsic semantic values derived from their contexts. They are roughly analogous to the use of quote marks to delimit quotations.

    Early on, ship names, and book and journal titles were made bold, while article titles, poem names, short story titles, and foreign phrases were italicized. Of late, the bold has dropped out of favor, the italicized now being preferred; likely due to being not as jarring to the flow of text.

    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

  25. #75
    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)
    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 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!

    (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)


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
  •