SitePoint Sponsor

User Tag List

Results 1 to 23 of 23
  1. #1
    SitePoint Enthusiast futureking's Avatar
    Join Date
    Mar 2009
    Location
    Bilaspur, Chhattisgarh, INDIA
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Should We Start Using HTML5 and CSS3 on Websites?

    I want to know that should I use HTML5 and CSS3 on websites?

    What is XHTML 5? Is it just using xml rules in html5 like previous one.

    Suggest good books for HTML 5.
    Freelance PHP Developer

    Portfolio Link http://abhinavsoftware.com

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Most people visiting the site would not be able to make use of HTML5 specific features, as it's not supported in their browser.

  3. #3
    SitePoint Enthusiast futureking's Avatar
    Join Date
    Mar 2009
    Location
    Bilaspur, Chhattisgarh, INDIA
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is there any way in PHP to check the HTML Support in User browser so that the right page(or view) can be sent to the browser with MVC framework.
    Freelance PHP Developer

    Portfolio Link http://abhinavsoftware.com

  4. #4
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

  5. #5
    SitePoint Guru
    Join Date
    Oct 2008
    Location
    Melbourne
    Posts
    754
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Pro: Yes You Can use HTML 5 Today ... sort of

    Con: HTML 5: Now or Never?, in which the word "abomination" is used.

    Certainly doesn't hurt to start fiddling with it now, I guess, but lots of the shiny stuff isn't going to work in all browsers.
    "I'm Commander Shepard, and this is
    my favourite post on the internet."

    We'll miss you, Dan Schulz.

  6. #6
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by futureking View Post
    What is XHTML 5? Is it just using xml rules in html5 like previous one.
    It's what you get when using application/xhtml+xml, basically.

    Quote Originally Posted by futureking View Post
    Suggest good books for HTML 5.
    http://diveintohtml5.org/
    Simon Pieters

  7. #7
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by futureking View Post
    Is there any way in PHP to check the HTML Support in User browser so that the right page(or view) can be sent to the browser with MVC framework.
    This is the wrong way to go about using new features.

    A better way is to just use the new feature, and provide fallback for browsers that don't support the new feature.

    For example, if you want to use the <video> tag, then just place the fallback inside:
    Code:
    <video src=test.ogg controls>
     <embed src=videoplayer.swf>
    </video>
    Simon Pieters

  8. #8
    SitePoint Zealot sdavis2702's Avatar
    Join Date
    Sep 2007
    Location
    Austin, TX
    Posts
    161
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think I will just start playing around with HTML 5 on my own personal computer. I do have a site that I am about to start building that really sin't going to require any traffic... just a little personal site I guess you could say. I think I might build it with HTML 5 just to start experimenting.

    I really don't think it should be used mainstream too much just yet.
    I build WordPress with the Volatyl Framework.

  9. #9
    SitePoint Zealot sdavis2702's Avatar
    Join Date
    Sep 2007
    Location
    Austin, TX
    Posts
    161
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well... my new question becomes....

    Will there be any reason to use DIV and SPAN once HTML 5 is the norm?
    I build WordPress with the Volatyl Framework.

  10. #10
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by sdavis2702 View Post
    Well... my new question becomes....

    Will there be any reason to use DIV and SPAN once HTML 5 is the norm?
    The majority of reasons those tags are used today will still be valid with HTML 5. Adding a <footer> tag to the spec doesn't mean you might not need to wrap some piece of content in the footer with a generic tag just to give it an identifier for targeting with CSS/JavaScript.

  11. #11
    SitePoint Zealot sdavis2702's Avatar
    Join Date
    Sep 2007
    Location
    Austin, TX
    Posts
    161
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That makes sense. Based on the description of the section element, it seems like it will do everything that a div does, plus more. Is that the intent of section? It seems like div on steroids.
    I build WordPress with the Volatyl Framework.

  12. #12
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    What can you do with a section that you can't do with a div? It just adds a bit of meaning in the cases where people were using divs to block out sections. There are still many cases where you need to wrap things in some tag, and what you're wrapping isn't a "section", so you'd still use a div.

  13. #13
    SitePoint Zealot sdavis2702's Avatar
    Join Date
    Sep 2007
    Location
    Austin, TX
    Posts
    161
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey I'm still learning. I'm just trying to interpret what's in the article on this site where it says...

    section

    The section element divides the page if there are no more appropriate structural tags above. It’s more than just another kind of div, though—section imposes a kind of hierarchy upon the content. In a purely HTML 5 world, you only use h1 (for backwards compatibility), and the outlining algorithm works out the heading level from its context within the page’s sections.

    So:

    <body><h1> is a heading 1
    <body> … <section><h1> is a heading 2
    <body> … <section><section><h1> is a heading 3, and so on.

    In this way, you can have more than six levels of heading. However, it’s best to continue to use h1-h6 for now, with sections if you choose. Assistive technologies such as screen readers have yet to catch up to the new outlining algorithm, and a proper hierarchy of headings is vital for blind users to navigate pages.
    http://articles.sitepoint.com/articl...napshot-2009/3

    I took that as it is used just like DIV but now it can do more... with the headings being one example. The reason why I thought it was going to replace DIV because it says...
    The section element divides the page if there are no more appropriate structural tags above*.
    *Talking about header, footer, nav, aside, article, figure, etc.
    I build WordPress with the Volatyl Framework.

  14. #14
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,338
    Mentioned
    465 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by futureking View Post
    I want to know that should I use ... CSS3 on websites?
    Most of CSS3 is not even finished yet, so certainly not "should". Some browsers allow you to experiment with certain features of CSS3, and they are widely used, but just use them as nice little enhancements for those who can view them, but provide a fallback for those who can't.

    An example is adding rounded corners to an element, which will work in Safari and Firefox:

    Code:
       -webkit-border-radius:13px;
       -moz-border-radius:13px;
       border-radius: 13px;
    Regarding HTML5, here is a nice site, by Eric Meyer, that is almost all done in HTML5:

    http://aneventapart.com/

  15. #15
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    Regarding HTML5, here is a nice site, by Eric Meyer, that is almost all done in HTML5:

    http://aneventapart.com/
    AFAICT it doesn't use any HTML5 features other than the doctype, which isn't too exciting IMHO.
    Simon Pieters

  16. #16
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,875
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by zcorpan View Post
    AFAICT it doesn't use any HTML5 features other than the doctype, which isn't too exciting IMHO.
    The supposed HTML5 doctype is equally valid for HTML2 so using it doesn't indicate that the page is necessarily HTML5.
    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="^$">

  17. #17
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    Regarding HTML5, here is a nice site, by Eric Meyer, that is almost all done in HTML5:

    http://aneventapart.com/
    Quote Originally Posted by zcorpan View Post
    AFAICT it doesn't use any HTML5 features other than the doctype, which isn't too exciting IMHO.
    Yes I do not see a single HTML5 element in use on that page other than the doc type mentioned by zcorpan. What is the point in declaring such a doc type and not using it?

    Though I did see this:
    Code HTML4Strict:
    <b class="ief">&nbsp;</b>

  18. #18
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,875
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by BPartch View Post
    What is the point in declaring such a doc type and not using it?
    it is a valid doctype for any version of HTML from 2 onward. You only need further information in the doctype if you are treating the page as an SGML document and feeding it through a validator.

    That version of the doctype is shorter than the other variants for HTML 2, 3, and 4 and so is useful for reducing the amount of unnecessary text in the page source.

    Only by writing something for HTML 1 and then attaching that doctype would you be doing so in error.
    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. #19
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by felgall View Post
    it is a valid doctype for any version of HTML from 2 onward. You only need further information in the doctype if you are treating the page as an SGML document and feeding it through a validator.
    Oh! I gotcha. I think. Your saying the rest is only needed if you want to validate it through an SGML parser? I'd never thought about it like that, but I guess that makes sense now that you brought it up.

  20. #20
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,338
    Mentioned
    465 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by zcorpan View Post
    AFAICT it doesn't use any HTML5 features other than the doctype, which isn't too exciting IMHO.
    Fair point! I admit I didn't look that far. I just remember reading an article about the site, and what was involved in making it HTML5 friendly. I'm surprised there is nothing specifically HTML5-ish in there. Must have a look...

  21. #21
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by raena View Post
    Con: HTML 5: Now or Never?, in which the word "abomination" is used.
    Yea Tommy said that and at the moment I tend to agree with him, at least XHTML 2.0 had a lot of potential, HTML5 seems to be the frankenstein of the web, trying to be everything at once when all it ends up as is a "three steps forward, one step back" kind of syntax language. Personally I don't feel it's worth doing anything more than experimenting with HTML5 and CSS3 because as it stands, we will be waiting years until it can be implemented with a reasonable chance that over 75&#37; of people can make use of it (and by most standards, that's a low threshold, I usually go by 90% or higher before implementing).

    Quote Originally Posted by ralph.m View Post
    Most of CSS3 is not even finished yet, so certainly not "should". Some browsers allow you to experiment with certain features of CSS3, and they are widely used, but just use them as nice little enhancements for those who can view them, but provide a fallback for those who can't.
    Yea and look how problematic that has become, need I remind you of the opacity problem?

    Code CSS:
    opacity:.50; /* CSS3 */
    -moz-opacity: 0.5; /* Netscape & Early Firefox */
    -khtml-opacity: 0.5; /* Early Konquerer & Safari */
    -ms-filter: "alpha(opacity=50)"; /* Internet Explorer 8 */
    filter: alpha(opacity=50); /* Internet Explorer 7 + 6 */
    filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; /* Internet Explorer 5.5 & IE For Mac */

  22. #22
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,875
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    At the current rate of progress it will be many years before the web starts using HTML 4 properly - most of the web is still using HTML 3.2 or a combination of 3.2 and 4 (which is known as transitional).
    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. #23
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by BPartch View Post
    Yes I do not see a single HTML5 element in use on that page other than the doc type mentioned by zcorpan. What is the point in declaring such a doc type and not using it?
    I guess one point is that it's shorter.

    Quote Originally Posted by BPartch View Post
    Though I did see this:
    Code HTML4Strict:
    <b class="ief">&nbsp;</b>
    Looks like abuse of HTML for presentational purposes.
    Simon Pieters


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
  •