Home    News    Product    Order    Forum    Feedback    Partner    Profile  © Neatware 2000
 Neatware Snaml
Search
  Font
Home  : Last Update: Wed Apr 12 20:01:22 2000

 
Snaml Font

 
Snaml Basic
      Introduction
      Syntax
      Control
      Types
      Modules
      Status
Snaml HTML
      HTML
      Structure
      Link
      Objects
      Text
      Font
Snaml CSS
      CSS
      Script
Snaml CGI
      CGI
      Variables
      Output
      Form
      Application
Snaml XML
      XML
      Document
      EBNF
  1. Formatting

    Typically, 'bgcolor' attribute sets the background color with a color value. 'align' attribute aligns block elements such as tables, objects, and paragraphs on the canavas. The possible values are the left, center, right, and justify. For left-to-right text and right-to-left text, the default values are left and right respectively. An object will float on the left or right margin because of its 'align' attribute. The 'clear' attribute of _br command controls text flow around floating objects. Its value 'none' (default) starts next line normally. The value 'left' and 'right' will make next line begin at nearest line below any floating objects on the left and right margin. The value 'all' is for either margin.

    _html
    _head 
      _title; _quote "Formatting"; title_ 
      _style "type='text/css'"
        _comment
          _rule "br#test" {clear: left}
        comment_
      style_
    head_
    _body "bgcolor='white'"
      _quote "long text paragraph"
      _br "id='test'"
      _quote "is separated."
    body_
    html_
    

  2. Font

    Although font command is depreciated in favor of style sheets, they have been widely used in the current web pages. Here, _tt command renders text as teletype or monospaced; _i command renders text as italic; and _b command renders text as bold. In addition, _small and _big commands render text in a small and big font respectively. Finally, _strike and _u commands render text as strike-through and underline.

    Rather than uses font command, style sheet is clarity to achieve visual effects. Following example shows green and italic text in a paragraph with style sheet.

    _html
    _head 
      _title; _quote "Font"; title_ 
      _style
        _comment
          _rule "p.igreen" {font-style: italic; color: green}
        comment_
      style_
    head_
    _body
      _p "id='igreen'"
      _quote "Green italic text by style sheet."
      p_
    
      # the font equivalent
      _font "color='green'"
        _i; _quote "Green italic text by font."; i_
      font_
    body_
    html_
    		

    _font command changes the font size and color of the text in its content. The _basefont command sets the base font size with 'size' attribute. Typical default base font size is 3. The 'size' attribute must be an integer from 1 to 7. The '+' and '-' sign of an integer means relative increasement and decreasement in font size. To declare font names, 'face' attribute must specify a comma-separated list. In addition, 'color' attribute specifies the text color.

    _font "face='arial, helverta' size='+2' color='red'"
      _quote "This is red arial text with size 2."
    font_
    

    _hr command shows a horizontal rule. Boolean 'noshade' attribute will render rule in a solid color rather than a groove. Furthermore, 'size' attribute specifies the height of the rule; 'width' attribute specifies its width (default 100%); and 'align' attribute specifies its horizonal alignment.

    _hr "align='center' width='50%' size='3' noshade" 

Formatting

Font

     
Home  : Last Update: Wed Apr 12 20:01:22 2000
Search
  Font
 Neatware Snaml
Home    News    Product    Order    Forum    Feedback    Partner    Profile  © Neatware 2000