# htp on-line reference : BLOCKDEF, /BLOCKDEF

## syntax

`<blockdef name="tagname" [option="option1 [option2 ...]" ] [global] [expand]>
... <use block> ...
</blockdef>
`

## synopsis

BLOCKDEF creates block metatags, which is a fancy way of saying it creates new block tags. A block tag is a tag that takes a whole block as additional parameter. This block is surrounded by <tagname> and </tagname>. The contents of this block are automatically stored in the block macro named BLOCK.

For example:

`<alttext name="logo.gif" text="Company logo">
this line: <img src="logo.gif">
becomes this after processing: <img src="logo.gif" alt="Company logo">
this line: <img src="../image/logo.gif">
will also have an ALT attribute appended to it
this line: <img src="logo.gif" alt="Click here for more information!">
remains unchanged.
`

All block metatags have the implicit option EXPAND, which tells htp to expand the contents of the block before the definition is expanded.

A more thorough discussion and more elaborate examples are discussed in the metatag section.

hosted by Sourceforge HTML coding

Copyright © 1995–96 Jim Nelson. Copyright © 2001–2014 Jochen Hoenicke. Permission to reproduce and distribute this hypertext document granted according to terms described in the License section. last updated Sat May 16, 2015