Getting Started
Block Elements
Block example
<p> tags and <div> tags are naturally displayed block-style.
(I say "naturally" because you can override the display style by setting the CSS display property e.g. display:inline;.)
A block-display element will span the full width of the space available to it, and so will start on a new line in the flow of HTML. The flow will continue on a new line after the block-display element.
Here I've started a paragraph and now I'm going to insert a <div>
new div inside my paragraph
and then continue the text here...
See how the <div> jumped in and took over the full width of the space?
Common HTML elements that are naturally block-display include:
- <div>
- Your general-purpose box
- <h1> ... <h6>
- All headings
- <p>
- Paragraph
- <ul>, <ol>, <dl>
- Lists (unordered, ordered and definition)
- <li>, <dt>, <dd>
- List items, definition list terms, and definition list definitions
- <table>
- Tables
- <blockquote>
- Like an indented paragraph, meant for quoting passages of text
- <pre>
- Indicates a block of preformatted code
- <form>
- An input form
