/    Sign up×
Community /Pin to ProfileBookmark

[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: [URL=”http://www.lepreben.com/restaurant-quebec/nousConnaitre.html”]http://www.lepreben.com/restaurant-quebec/nousConnaitre.html[/URL]

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;
}
[/CODE]

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>
[/CODE]

Thanks a lot?

to post a comment
CSS

7 Comments(s)

Copy linkTweet thisAlerts:
@FangSep 25.2008 — It is not logical nor semantically correct: http://www.w3.org/TR/REC-html40/struct/global.html#h-7.5.5
h1, h2, h3 {display:inline;}
This is probably your aim:&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt;
&lt;html lang="en"&gt;
&lt;head&gt;
&lt;title&gt;text&lt;/title&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;

&lt;style type="text/css"&gt;
.promoTitle {font-size:2em;}
.promoTitle span {font-size:80%;}
&lt;/style&gt;

&lt;/head&gt;
&lt;body&gt;
&lt;div class="promoTitle"&gt;
&lt;span&gt;Cascading&lt;span&gt; Style&lt;span&gt; Sheet&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
Copy linkTweet thisAlerts:
@fitzybizzleauthorSep 25.2008 — 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 : [URL]http://www.lepreben.com/restaurant-quebec/nousConnaitre.html[/URL]

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;
}
[/CODE]


new html
[CODE]
<div class="promoTitle2">
<h1>test</h1><h2>test</h2><h3>test</h3><h1>test</h1>
</div>
[/CODE]
Copy linkTweet thisAlerts:
@FangSep 25.2008 — 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-WCAG20-TECHS/H42.html
Copy linkTweet thisAlerts:
@fitzybizzleauthorSep 25.2008 — 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.

[URL]

http://www.lepreben.com/restaurant-quebec/nousConnaitre.html[/URL]


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 :-)
Copy linkTweet thisAlerts:
@FangSep 25.2008 — SEO experts says that keyword in HX tags help for better google scores[/QUOTE]Only if you use them correctly.
Copy linkTweet thisAlerts:
@fitzybizzleauthorSep 25.2008 — 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.
Copy linkTweet thisAlerts:
@FangSep 26.2008 — 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.
×

Success!

Help @fitzybizzle spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.25,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...