<p>...</p> | Paragraph |
<div>...</div> | Generic division |
<blockquote>...</blockquote> | Quoted text |
BLOCK ELEMENT | EFFECT |
---|---|
p | Renders text into paragraphs with a blank line in between each... (More) |
div | Renders text into generic division with no blank line in between each... (More) |
blockquote | Renders text into an indented paragraph which is typically used to indicate quoted text... (More) |
<p>...</p>
tags. The end </p>
tag terminates the first paragraph while a new start <p>
tag begins a new paragraph. Example:<p>
This is the first paragraph. In printed text, paragraphs are traditionally rendered by merely breaking the flow of text to the next line and then indenting the first line of the new paragraph. In web pages, however, a new paragraph is typically rendered by breaking the flow of text to the next line which then contains a line of 'white space'. The blank line is subsequently followed by the new paragraph whose first line appears flush with the left margin.
</p>
<p>
This is the next paragraph. Note that any line breaks created in the source code by pressing the 'Enter' key will be ignored by the web browser when it displays the web page. Creating line breaks in the visible text can only be accomplished by using one of various HTML elements. In this case, we are using the 'p' element.
</p>
<p>...</p>
tags, the end tag may be omitted. Each <p>
start tag will automatically begin a new paragraph. Example:<p>
First paragraph starts here...
<p>
Second paragraph starts here...
<p>
Third paragraph starts here...
div
element differs from the p
element in that the </div>
end tag only breaks the flow of text to the next line. No blank line will appear between it and the succeeding text. Example:<div>
This is the first generic division. The text will continue to flow normally until this 'div' element is terminated by the end tag.
</div><div>
This is the second generic division. Use the 'div' element in conjunction with CSS to achieve a much more refined control over formatting blocks of text on your web page.
</div>
</p>
end tag, the </div>
end tag is mandatory. div
element to create a traditional paragraphing style:<div style="text-indent: 30px;">
This uses the 'div' element in conjunction with the 'style' attribute to create a paragraph style similar to printed text paragraphing. The first line of text in this generic division is indented by a space of 30 pixels.
</div>
<div style="text-indent: 30px;">
Here is the second generic division. The flow of text breaks to the next line and the first line of text is also indented by a space of 30 pixels.
</div>
<blockquote>...</blockquote>
tags. Here's an example:In the official HTML 4.01 Specification, the World Wide Web Consortium (W3C) makes this distinction between block level and inline elements:<blockquote>
Generally, block-level elements may contain inline elements and other block-level elements. Generally, inline elements may contain only data and other inline elements. Inherent in this structural distinction is the idea that block elements create "larger" structures than inline elements.</blockquote>
Free Text Editors
Free Graphics Editors
Website Analysis Tools
Free Website Templates
See also:
If you need a .COM web address, you can get one quick and easy at...
INTRO | TOP | NEXT~> |