Neatware  Header

    Text

    Text Module consists of h1-h6 for heading, div, p, and pre for block, span, br, em, and strong for inline. Other deprciated commands are abbr, acronym, address, cite, code, dfn, kbd, samp, var, q, and blockquote. Developers should avoid to use the deprciated commands.

  1. Whitespace

    Whitespaces are space, tab, form feed (), and zero-width space (​). The carriage return (CR) and line feed (LF) are also whitespaces in the XHTML document. Whitespace characters will have no visual formatting effects. A number of whitespace will only compact to one space.

  2. Heading

    _h1 to _h6 are heading commands to describe the topic of a section. There are six levels. _h1 is the highest level (usually larger font) and _h6 is the lowest level. You need to set their attributes in the style sheet.

    _body();
      _h1(); quote( "H1 Title" ); h1_();
      _h2(); quote( "H2 Title" ); h2_();
    body_();
    
  3. Block

    The _div command offers a generic mechanism to construct structure documents. _div defines block content. By using 'class' and 'id' attributes, authors may easily control the content in the block for presentation. _div along with inline block_span commands are prefered commands to separate structure and presentation.

    div block

    _div( "id='David' class='client'" );
    

    span inline

      _span( "class='title'" );
        quote( "Client information:" ); 
      span_();
    

    table

      _table( "class='data'" );
        _tr();
          _th(); quote( "Last name:" ); th_();
          _td(); quote( "David" ); td_();
        tr_();
        _tr(); 
          _th(); quote( "First name:" ); th_();
          _td(); quote( "Robert" ); td_();
        tr_();
        _tr();
          _th(); quote( "Tel:" ); th_();
          _td(); quote( "(905) 534-2812" ); td_();
        tr_();
        _tr(); 
          _th(); quote( "Email:" ); th_();
          _td(); quote( "robertd@neatware.com" ); td_();
        tr_();
      table_();
    div_();
    
  4. Paragraph

    _p command defines a paragraph. It is also used as a newline in the Snaml. Its 'clear' attribute specifies the property that floats around another object. __br command forces a line break. The character ' ' is a real space.

    Plain hyphen is just a regular character '-'. Usually a browser did not display soft hyphen if a line is not broken at a soft hyphen, otherwise it displays the '-' in the end of a line.

    _pre command defines preformatted text. It will render the text content of the _pre command "as is". All the newline and space characters will be kept.

    _p( "clear=right" );
      quote( "float paragraph" ); 
      __br();
      quote( "in the document." );
    p_();
    
    _pre();
      quote( "preformatted text with space and newline." );
    pre_();        
    
  5. Inline Block

    The _span command separates the small text inline block. _br is a new line command. Usually it is used with an empty command __br. em and strong are emphasis and strong commonds.

    The _em and _strong are two most common commands to make structural text. _em is emphasis (default italic) and _strong is strong emphasis (default bold).

    _em(); quote( "The emphasis is italic." ); em_();
    _strong(); quote( "The strong is blod." ); strong_();
    
    
  6. Others

    Other commands work for special purposes. The _cite command is a citation or reference to other source; _dfn command is the defining instance of the enclosed term; _code command is used to represent computer code; and _samp command is for the sample output. In addition, _var command marks the instance of a variable; _abbr command tags abbreviated form; _acronym_kbd command represents the text to be entered by user. Finally, _sup and _sub mark the text as superscript and subscript.

    _cite(); quote( "citation" ); cite_();
    _dfn(); quote( "defining instance" ); dfn_();
    
    _code(); quote( "computer code" ); code_();
    _samp(); quote( "sample output" ); samp_();
    _var(); quote( "variable" ); var_();
    _abbr(); quote( "abbreviated form" ); abbr_();
    

    _blockquote and _q command are for long and short quotation respectively. Browsers generally render _blockquote as an indented block. _q command generally shows text with delimiting quotation marks.

    _blockquote( "id='group'" ); 
      quote( "block words." );
    blockquote_();
    _q(); quote( "quote words" ); q_();        
    

    Finally, _ins and _del commands mark the sections of a document that has been inserted or deleted. They are rarely used.