REBOL Document

Build-tag - Function Summary


Generates a tag from a composed block.


build-tag values


values - Block of parens to evaluate and other data. (must be: block)


Constructs an HTML or XML tag from a block. Words within the block are used to construct the attribute words within the tag. If they are followed by a value, that value will be assigned to the attribute. Parenthesized elements are evaluated as expressions and their resulting value is used.

    print build-tag [font size 3]
    <font size="3">

    print build-tag [font size (10 / 2)]
    <font size="5">

    print build-tag [img src %image.jpg]
    <img src="image.jpg">

    main-index: %index.html
    print build-tag [A HREF (join site main-index)]
    <A HREF="">

    root: %images/
    download: %download1.gif
    alt-download: "Download the Latest REBOL!"
    print build-tag [
        IMG SRC (rejoin [site root download])
        ALT (alt-download)
    <IMG SRC="" ALT="Download 
the Latest REBOL!">


compose - Evaluates a block of expressions, only evaluating parens, and returns a block.

<Back | Index | Next>

Copyright 2004 REBOL Technologies