<h1> tag driving me nuts!

Heres what I have, I am trying to do a sentence and put the keywords in the <h1> tag,. For example

This is my <h1>Keyword</h1> I am using!

But it is coming out like

This is my
[SIZE="4"][B]
Keyword[/B][/SIZE]

I am using!

Why is the <h1> going on its own line and is there anything I can do to keep it on the same line as the rest?

that’s because <h1> is a block-level element and you are trying to use it as an inline element.

semantically, you probably should use a <span> and style it to look like a <h1>

Ok, any clues how to make that happen? I have searched and searched and no matter what I have tried it stays on the next line down

post the code you have tried so far to fix it.

I already posted what I think you should be doing.

btw - I think you’ll find search engine bots are wide awake to the very obvious way you are trying to “sneak” keywords into supposedly higher relevance elements.

<span class=“WhiteText”><h1>Live Stream TV</h1> - You Want It You Got It!
</span></td>

CSS
.WhiteText {
PADDING-LEFT: 0pt; FONT-WEIGHT: none; FONT-SIZE: 8pt; COLOR: #FFFFFF; FONT-FAMILY: Tahoma, Verdana, Arial; TEXT-DECORATION: none
}

So your saying its a waste of time to worry about putting a <h1> tag into a sentence using a keyword?

if trying to use headings as inline elements then it depends on which search engine bots you are aiming at.

You have to set your <h1> to display:inline;


.text {
}
h1 {
	display: inline;
	font-size: 12px;	
}


<div class="text">This is my <h1>Keyword</h1> I am using!</div>

I used a <div> instead of a <span> otherwise it won’t validate. But why not use it the other way around If I may ask. Use a heading and use <span> inside of your heading to create size differences, if that’s where you’re after.

using an H1 in the middle of a sentence is a hack which corrupts the purpose of the H1

H1 should be used for the main heading of the document

perverting the semantics of html tags for the sake of dubious seo merits is despicable

no offence personally, of course

:slight_smile:

totally agree :agree: and I said before I think search engine bots are awake to this very obvious attempt to get a higher ranking.

Why are you adding h1 in the middle of a sentence? What are you trying to achieve? I’m sure there’s a better way of doing whatever it is you want to do.