views:

199

answers:

4

How can I stay on the same line while working with <p> tag ?

Thank

+7  A: 

Use the display: inline CSS property.

Ideal: In the stylesheet:

#container p { display: inline }

Bad/Extreme situation: Inline:

<p style="display:inline">...</p>
Doug Neiner
thanks a lot for your help.
Josh
A: 

The <p> paragraph tag is meant for specifying paragraphs of text. If you don't want the text to start on a new line, I would suggest you're using the <p> tag incorrectly. Perhaps the <span> tag more closely fits what you want to achieve...?

Steve Harrison
+3  A: 

Just don't use <p>. You apparently don't need it. To learn more about HTML tags and what they all are supposed to do, take a look here.

BalusC
+1  A: 

something like:

p
{
    display:inline;
}

in your stylesheet would do it for all p tags.

John Boker