Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is this not indenting HTML?

Tags:

html

css

<div id = "topParagraph"><p id = "topParagraph">text </p>

<p id = "paragraph2"> stuff</p></div>

I though <p> was used to indent. Heres a fiddle to.

like image 793
Soatl Avatar asked Mar 05 '26 17:03

Soatl


1 Answers

You have to specifcy the text-indent style. p doesn't automatically indent, it just creates a new paragraph. Try:

#topParagraph {
text-indent: 10px;
}

Also shown in this fiddle: http://jsfiddle.net/7zybK/2/

like image 94
Thomas Shields Avatar answered Mar 08 '26 06:03

Thomas Shields