Tutorials Point


  HTML Home

  HTML Tags Reference
  Selected Reading

Copyright © 2014 by tutorialspoint



  Home     References     Discussion Forums     About TP  

HTML <spacer> tag




Advertisements

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:

AttributeValueDescription
typevertical
horizontal
block
The type attribute is used to specify whether the spacer will be horizontal, vertical, or block.
sizenumberSpecifies 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.
widthnumberThe width attribute is used when the spacer type="block". Between the quotes specify a pixel value for the width of the block.
heightnumberThe height attribute is used when the spacer type="block". Between the quotes specify a pixel value for the height of the block.
alignleft
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:

AttributeDescription
classDocument wide identifier
dirSpecifies the direction of the text
idDocument wide identifier
titleSpecifies a title to associate with the element.
styleHelps to include inline casecadubf style sheet.
langSets the language code.
xml:langSets the language code.
tabindexHelps determine the tabbing order
accesskeyAccess keys (or shortcut keys)

Event Attributes:

AttributeDescription
onfocusScript runs when control gets focus
onblurScript runs when control loses focus
onchangeScript runs when the element changes

Printer Friendly

Advertisements


  

Advertisements