Web | This Site

HTML Home
HTML Tags Reference
Selected Reading
© 2011 TutorialsPoint.COM

| Home |  | References |  | Discussion Forums |  | About TP

# HTML <spacer> tag

## Function:

The HTML <select> tag is used to create a block of white space within an html document.

This tag is available in Netscape 4 and higher version only.

## Difference between HTML and XHTML:

In HTML the <spacer> tag has no end tag.

In XHTML the <spacer> tag must be properly closed.

## Example:

    Create some  space <spacer type="block" width="50" /> here.

This will produce following result:

Create some space here.

## Online Practice:

To Become more comfortable - Do Online Practice

## Attributes:

Attribute | Value | Description
--- | --- | ---
type | vertical horizontal block | The type attribute is used to specify whether the spacer will be horizontal, vertical, or block.
size | number | Specifies the number of pixels tall or wide the spacer will be This attribute is only used if the spacer type is "horizontal" or "vertical." If the spacer type is "block," then the width attribute is used.
width | number | The width attribute is used when the spacer type="block". Between the quotes specify a pixel value for the width of the block.
height | number | The height attribute is used when the spacer type="block". Between the quotes specify a pixel value for the height of the block.
align | left right center | The align tag is used to specify the alignment of the block of white space. Valid alignments are left, right, and center.

## Standard Attributes:

Attribute | Description
--- | ---
class | Document wide identifier
dir | Specifies the direction of the text
id | Document wide identifier
title | Specifies a title to associate with the element.
style | Helps to include inline casecadubf style sheet.
lang | Sets the language code.
xml:lang | Sets the language code.
tabindex | Helps determine the tabbing order
accesskey | Access keys (or shortcut keys)

## Event Attributes:

Attribute | Description
--- | ---
onfocus | Script runs when control gets focus
onblur | Script runs when control loses focus
onchange | Script runs when the element changes

Advertisement

Online Image Processing

Indian Baby Names