Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us















Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


HTML Body: Block-level Elements

Certain HTML elements that may appear in BODY are said to be "block-level" while others are "inline" (also known as "text level"). Generally,
  • inline elements may contain only data and other inline elements. They do not create new lines.
  • block-level elements may contain inline elements and other block-level elements. They begin on new lines, and will close an unterminated paragraph element. This enables you to omit end-tags for paragraphs in many cases.
Generally, block elements create "larger" structures than inline elements. By default, block-level elements are formatted differently than inline elements.

Headings

The line just above was a header, i.e. a title for a new section of the document. A heading element briefly describes the topic of the section it introduces. Heading information may be used by user agents, for example, to construct a table of contents for a document automatically.

There are 6 headers: H1, H2, H3, H4, H5, and H6. H1 is the "main" header, usually used once at the top of the document. H6 is the "smallest" header and is rarely used, though it's often abused to make small bold text (use the FONT tag instead).

One of the original philosophies about HTML was that it should be designed for software tools to extract useful information from HTML documents. The header tags were supposed to be useful for generating a 'table of contents'. Bear in mind that software other than visual browsers might visit your web pages - e.g. text-to-speech convertors for the visually impaired, or search engines. In such cases, good use of headings can give valuable clues about the meaning of your page.

You always need the start and end tags. H1 elements are more important than H2 elements and so on, so that H6 elements define the least important level of headings. More important headings are generally rendered in a larger font than less important ones. Use the ALIGN attribute to set the text alignment within a heading, e.g.

	<H1 ALIGN=CENTER> <I>... centered heading ...</I> </H1>

ADDRESS

The ADDRESS element is used for information about the author of the document. It requires start and end tags.

Block elements

P paragraphs
The paragraph element requires a start tag, but the end tag can always be omitted.
PRE preformatted text
Requires start and end tags. These elements are rendered with a monospaced font and preserve layout defined by whitespace and line break characters.
DIV document divisions
Requires start and end tags. It is used with the ALIGN attribute to set the text alignment of the block elements it contains. ALIGN can be one of LEFT, CENTER or RIGHT.
CENTER text alignment
Requires start and end tags. It is used to center text lines enclosed by the CENTER element. See DIV for a more general solution.
BLOCKQUOTE quoted passage
Requires start and end tags. It is used to enclose extended quotations and is typically rendered with indented margins.
FORM fill-out forms
Requires start and end tags. This element is used to define a fill-out form for processing by HTTP servers. The attributes are ACTION, METHOD and ENCTYPE. Form elements can't be nested.
ISINDEX primitive HTML forms
Not a container, so the end tag is forbidden. This predates FORM and is used for simple kinds of forms which have a single text input field, implied by this element.
HR horizontal rules
Not a container, so the end tag is forbidden. attributes are ALIGN, NOSHADE, SIZE and WIDTH.
TABLE can be nested
Requires start and end tags. Each table starts with an optional CAPTION followed by one or more TR elements defining table rows. Each row has one or more cells defined by TH or TD elements. attributes for TABLE elements are WIDTH, BORDER, CELLSPACING and CELLPADDING.


Lists



Up to => Home / Authoring / HTML




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers