Blog HTML5 - Également sur CSS3 et le design web

 

http://www.blog-html5.com

October 4, 2009

  • La nouvelle balise <hgroup> en HTML5

    Voilà une balise intéressante à utiliser dès maintenant pour ceux qui utilise déjà HTML5.

    Si je reprends la définition du W3C :

    The hgroup element represents the heading of a section. The element is used to group a set of h1–h6 elements when the heading has multiple levels, such as subheadings, alternative titles, or taglines.

    Donc en gros, la balise <hgroup> permet de regrouper plusieurs éléments décrivant un en-tête de section. (ex : titre avec un sous-titre ou titre avec un slogan, etc)

    Imaginons par exemple un site web corporatif qui à son logo et un slogan en dessous.

    Blog HTML5 - hgroup tag

    Le code approprié serait :

    <header>
    <hgroup>
    <h1 id="logo">Budget en ligne</h1>
    <h2>Planifier son budget intelligemment</h2>
    </hgroup>
    </header>

    C’est simple, efficace et on comprend plus facilement l’intention en analysant le code source.

    • html5 hgroup
    • hgroup tag
    • balise hgroup
    • html5
    • blog html5
    Link

Powered by Tumblr - Theme by Kyle Moseby