www.webdeveloper.com
Results 1 to 8 of 8

Thread: [RESOLVED] multiple h1 h2 h3 on the same line

  1. #1
    Join Date
    Jun 2007
    Location
    Quebec City, Canada
    Posts
    47

    resolved [RESOLVED] multiple h1 h2 h3 on the same line

    Hi guys ! I'm looking 4 a way to have multiple h1 h2 h3 on the same line. h1 tags seams to add an auto line break.

    URL: http://www.lepreben.com/restaurant-q...Connaitre.html

    css
    Code:
    .promoTitle2{
    width : 550px;
    color : #AAAAAA;
    background-color:#000033;
    font-size: 22px;
    display:inline;
    margin: 0;
    float : left;
    border-bottom:1px solid #AAAAAA;
    }
    .promoTitleElement{
    width : 100px;
    display: inline; 
    margin:0;
    }
    html
    Code:
    <div class="promoTitle2">
       <span class="promoTitleElement"><h1>test</h1></span>
       <span class="promoTitleElement"><h2>test</h2></span>
       <span class="promoTitleElement"><h3>test</h3></span>
       <span class="promoTitleElement"><h1>test</h1></span>
    </div>
    Thanks a lot

  2. #2
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    It is not logical nor semantically correct: http://www.w3.org/TR/REC-html40/stru...l.html#h-7.5.5
    Code:
    h1, h2, h3 {display:inline;}
    This is probably your aim:
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html lang="en">
    <head>
    <title>text</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    
    <style type="text/css">
    .promoTitle {font-size:2em;}
    .promoTitle span {font-size:80%;}
    </style>
    
    </head>
    <body>
    <div class="promoTitle">
       <span>Cascading<span> Style<span> Sheet</span></span></span>
    </div>
    </body>
    </html>
    Last edited by Fang; 09-25-2008 at 09:53 AM.
    At least 98% of internet users' DNA is identical to that of chimpanzees

  3. #3
    Join Date
    Jun 2007
    Location
    Quebec City, Canada
    Posts
    47
    hi Fang, thanks again for your help !

    What I want is to add keywords in the h1 h2 h3... in the blue square. I want to put like 3-4 per row in 2-3 rows. I want to alternate hX in order to vary sizes...

    url : http://www.lepreben.com/restaurant-q...Connaitre.html

    new CSS
    Code:
    .promoTitle2{
    width : 550px;
    color : #AAAAAA;
    background-color:#000033;
    font-size: 22px;
    display:block;
    margin: 0;
    float : left;
    border-bottom:1px solid #AAAAAA;
    }
    .promoTitle2 h1 h2 h3{
    width : 100px;
    display: inline; 
    margin:0;
    }
    new html
    Code:
    <div class="promoTitle2">
             <h1>test</h1><h2>test</h2><h3>test</h3><h1>test</h1>
    </div>

  4. #4
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    This is not what the header element is used for, please read the link given and this: http://www.w3.org/WAI/GL/WCAG20/WD-W...TECHS/H42.html
    At least 98% of internet users' DNA is identical to that of chimpanzees

  5. #5
    Join Date
    Jun 2007
    Location
    Quebec City, Canada
    Posts
    47
    Yes I totally understand ! What I wanted is to have important keyword for my site in H1 H2 tags, the the way I wanted to do it was wrong.

    I did the same concept in a different way.
    http://<br /> http://www.lepreben.co...Connaitre.html

    SEO experts says that keyword in HX tags help for better google scores, Before I didn't had any, this is why i've created this page, which is not quite important :-)

  6. #6
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    SEO experts says that keyword in HX tags help for better google scores
    Only if you use them correctly.
    At least 98% of internet users' DNA is identical to that of chimpanzees

  7. #7
    Join Date
    Jun 2007
    Location
    Quebec City, Canada
    Posts
    47
    okay. Do you think what I've done will help or it's a waste of time ? This page will be linked to the main page.

    Thanks for your advices, truly appreciated.

  8. #8
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Use elements in a semantic way; that will be of more use than throwing a load of headers together.
    Search engines may even punish you for non-semantic content.
    At least 98% of internet users' DNA is identical to that of chimpanzees

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles