Some Block Level Elements

A Block level element is one that occupies the width of its container. View the page source to see how it's done. Examples below are from Netscape.

Headings Example

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

Address Example

Netscape Communications Corporation
501 East Middlefield Road
Mountain View, CA 94043

Blockquote Example

Here is an extract from a press release about Netscape Netcaster.

On August 13 1997, Netscape Communications announced the availability of Netscape Netcaster push client software as part of Netscape Communicator. Netscape Netcaster is the first push software based on open Internet standards, such as HTML, Java and JavaScript, allowing virtually any Web site to become a "channel" that delivers up-to-date information directly to the desktop.
Bob Lisbonne, vice president of client product marketing at Netscape said:
"Networked enterprises can begin to deploy Webtops as consistent corporate computing interfaces that span all platforms and can be updated dynamically."

Aligning a Block of Content to the Right (the old way)

You can use a DIV tag to align a block of content to the right.

The content can include anything you like, including tables, images, lists, and so on. Note, however, that right-aligned lists often do not look very neat.

Note: The way it is done here is deprecated in HTML4 and not supported in HTML5

Aligning a Block of Content to the Right (the new, HTML5 way)

You can use a DIV tag to align a block of content to the right.

The content can include anything you like, including tables, images, lists, and so on. Note, however, that right-aligned lists often do not look very neat.

Note: The way it is done here is the new, suggested HTML5 way.

Paragraph Example

Use the P tag to display paragraphs. The P element starts on a new line, and is preceded by extra space.

You can also use the P tag to insert a line break with extra space. In most, but not all, cases, it is OK to omit the closing tag.


PRE Example

The example below preserves formatting, but the rendering engine will look inside and render html elements! Otherwise the rendering engine will ignore whitespace and flow text continuously.

To: Lee Smith

From: Chris Brown

Subject: Meeting schedule and agenda for Web Site team
Date: Thurs, 14 Aug 1997 22:00:05

9/20/97 8:00 a.m.Room 218
9/21/97 9:00 a.m.Room 218
9/22/97 2:00 p.m.Room 111

At the first meeting, we should discuss how to use

the <STYLE> tag to make our home page more interesting.


XMP Example

An xmp element (not supported in HTML5) displays exactly the text in the element body. For example: The basic structure of an HTML document is:

<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Document Title</title> </head> <body> Page Content Goes here! </body> </html>