Is <p> a block-level or inline-level element?

Of course it is.

The following are defined as block-level elements in XHTML 1.0:

* address - Address
* blockquote - Block quotation
* center - Centered block
* dir - Directory list
* div - Generic block-level container
* dl - Definition list
* fieldset - Form control group
* form - Interactive form
* h1 - Level-one heading
* h2 - Level-two heading
* h3 - Level-three heading
* h4 - Level-four heading
* h5 - Level-five heading
* h6 - Level-six heading
* hr - Horizontal rule
* isindex - Input prompt
* menu - Menu list
* noframes - Frames alternate content
* noscript - Alternate script content
* ol - Ordered list
* p - Paragraph
* pre - Preformatted text
* table - Table
* ul - Unordered list

The following elements may also be considered block-level elements since they may contain block-level elements:

* dd - Definition description
* dt - Definition term
* frameset - Frameset
* li - List item
* tbody - Table body
* td - Table data cell
* tfoot - Table foot
* th - Table header cell
* thead - Table head
* tr - Table row

The following elements may be used as either block-level elements or inline elements. If used as inline elements (e.g., within another inline element or a p), these elements should not contain any block-level elements.

* applet - Java applet
* button - Button
* del - Deleted text
* iframe - Inline frame
* ins - Inserted text
* map - Image map
* object - Object
* script - Client-side script

More Info Here


The p element should not contain any other block element, although it is a block element itself. If you put block elements inside a p, you will, for example, have a hard time trying to apply css rules to those block elements.


It is a block level element. What that DTD is saying is that <p> tags can only contain inline elements.


It is block, but like any other block element the CSS display property can make it behave in a few ways, including inline or inline-block.

Tags:

Html