PDA

Click to See Complete Forum and Search --> : h & p on same line?


swampart
12-10-2007, 12:42 PM
Hi again *wave*

Is it possible to put both p tags and h tags on the same line?

The reason (i think) i need to do this is because i have some keywords i am trying to add in for SEO, but they are inappropriate to use as visual headings.... so i was thinking that i could put h1 into a body of text where the keywords are...

This is the paragraph that i am talking about and the keywords are in bold...

If you are looking for luxury accomodation in Lake Macquarie, you can go no further than Christina's Bed and Breakfast. We understand what a short break is all about and we aim to make your stay relaxing and peaceful in our brand new bed and breakfast.


Any help would be much appreciated!! Thanks a lot in advance!

CurtisS
12-10-2007, 01:22 PM
If you mean putting a header tag within a p tag or vice versa then no, that is not allowed. As far as I know, a search engine will search general content the same as headers but I don't how much priority one might have over the other.

swampart
12-10-2007, 01:25 PM
Okay thanks for that, do you have any suggestions how my problem might be solved in a different way so that these key words are seen as such to a search engine?

CurtisS
12-10-2007, 01:30 PM
I am not a SEO expert but there is good info out there. SEOmoz.org is one of the better ones. Here is a part of their site that may help you out:

http://www.seomoz.org/article/beginners-guide-to-search-engine-optimization

chalsema
12-11-2007, 12:45 AM
Just bolding or italicizing important words will make them stand out more to the search engines. I'd suggest one keyword rich (but not stuffed) H1 tag with the most important keywords somewhere on the page, and 1-3 H2 tags with keywords as well. So it'd be structured like an outline:

"H1 overview of the page, 1-2 sentences, with keywords"
------"H2 subhead line with keywords"
------------"P with normal text and keywords mixed in and occasionally bolded"
------"H2 with another subhead with other keywords"
------------"P with more normal text/keywords"
------------"H3 subhead if needed"
------------"P with more normal text/keywords"
etc...

You should only use one H1 tag per page, and use H2's and 3's as subheadlines. Make sure all of your text makes sense to people too, because it won't do any good if you rank well in the search engines but people can't read it. :p

tZ
12-11-2007, 02:44 AM
There's no reason you can't. They are both block elements. That doesn't mean you should but, it is allowe4d via the language. Block level elements can contain any number of other block level elements. However, inline elements can only contain other inline elements. Would a span class be a better solution?

<p>Am I <span class = "standout">answering</span> your question?</p>

swampart
12-11-2007, 07:28 AM
thanks for all the replies!

jlknauff
12-11-2007, 11:56 AM
Just bolding or italicizing important words will make them stand out more to the search engines.Slightly more than regular text, yes, but not more than headings. As this has been abused, it now has very little effect.

FYI - h1 inside of a p tag can be done with inline styles, but you're going outside of proper structure. Basically, the way that chalsema explained the structure is how it should be done.

tZ
12-11-2007, 12:21 PM
h1 and p tags are block level elements not inline.

swampart
12-19-2007, 10:46 AM
i thought you could make p and h tags behave like inline elements?

tZ
12-19-2007, 06:58 PM
Block levels elements have all the features of inline but, can exist alone. Inline elements must be placed inside a block element, they can't exist on their own.

Example:

<p>Testing this.</p> – displays "Testing this." in browser

<span>Testing this</span> – displays nothing

<p><span>Testing this</span></p> – displays "Testing this".