Home    News    Product    Order    Forum    Feedback    Partner    Profile  © Neatware 2000
 Neatware Snaml
Search
  Structure
Home  : Last Update: Wed Apr 12 20:06:50 2000

 
Snaml Table

 
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. Frame

    Frames allow authors to present document in multiple views. _frameset command replaces the _body command to divide web page into several frames. 'cols' attribute specifies frames that are divided along the column. The 'cols' value specifies the width of each columns. You may specifies any number of columns with length list such as '33%, 67%'. 'rows' attribute specifies frames that are divided along the row. When both rows and cols are set simultaneously _frameset command creates a grid. Frames are created from left to right for the columns and from top to bottom for the rows. _frameset may be nested to any level. 'frameborder' attribute with value '0' will hide the frame border and value '1' will show a 3D border. Finally, 'framespacing' attribute specifies the number of whitespaces between frames.

    The _frame command in the content of _frameset loads the html file from the 'src' attribute value. Its 'name' attribute is an id that allows other commands target this frame. The value '1' of the 'frameborder' attribute draws a border around the frame and the value '0' makes no border. 'marginheight' and 'marginwidth' specify the margin height and width of a frame. The value 'yes' of the 'scrolling' attribute makes browser display a scrolling bar on the frame. The value 'no' will hide the scrolling bar.

    The content of the _noframes command is compabitiable to the browser that does not support the frame.

    _html
      _head
      _title; _quote "Frame"; title_
      head_
      _frameset "cols='33%, 67%' 
        frameborder='0' framespacing='1'"
        _frame "name='index' src='index.html'"
        _frame "name='content' src='content.html'"
      frameset_
      _noframes
        _quote "older browser without frame."
      noframes_
    html_

  2. Table

    _table is a command to construct a table. The _tr command specifies table row and the _td command specifies table data. _table content may include a _caption command. The attributes of a _table are: (i) 'border' attribute sets the table border with the integer from 0 to n; (ii)'align' attribute controls the horizontal alignment of the table with the value left, right, or center; (iii)'valign' attribute controls the verticle alignment with the value top, bottom, or middle; (iv)boolean 'nowrap' attribute does not wrap the contents in the table. To declare the position of cells, the 'cellspacing' attribute specifies the space between two cells; 'cellpadding' attribute sets the space between the border and the content of a cell; and the 'height' and 'width' attributes specify the height and width of a table respectively. Finally 'bgcolor' attribute specifies the background color of a table.

    To specify visible sides, 'frame' attribute may be one of the value: void, above, below, hsides, vsides, lhs, rhs, box, and border. They represent the none side(default), top side, bottom side, top&bottom side, left&right side, left-hand side, right-hand side, and all four sides respectively. To describe which rules will appear between cells, the 'rules' attribute may have one of a value none, groups, rows, cols, or all. In default when there are no frame and rules attributes, border='0' implies frame='void' and rules='none'; border='2' implies frame='border', rules='all', and border width is 2.

    The _tr command defines a row. Its content may be subdivied into head (_thead), foot (_tfoot), and body (_tbody) sections. To group columns, _colgroup and _col commands define the property of group. _th command specifies a cell head in the _tr. Usually it can be replaced by the _td command that defines a cell (data) in the content. _td command may have the attributes 'align', 'valign', 'nowrap', 'height', 'width', 'bgcolor', and other attributes in the _table. In addition, The 'colspan' attribute allows a cell span its width to one or more cells (default 1). The 'rowspan' attribute spans its height to more cells.

    _html
      _head
        _title; _quote "Table"; title_ 
      head_
      _body
      _table "border='1' 
        bgcolor='#FFFFFF' nowrap
        align='center' valign='middle' 
        cellspacing='4' cellpadding='8'
        width='320' height='200'
        frame='hsides' rules='groups'" 
    
      _caption 
        _quote "Table Demo"
      caption_
      _thead
        _tr
          _td; _quote "Title 1'; td_
          _td; _quote "Title 2"; td_
        tr_
      thead_
    
      _tbody
      _tr "width='30%'"
        _td "colspan='1' bgcolor='#FF0000'"
          _quote "Area A"
        td_
        _td "bgcolor='#0000FF'"
          _quote "Area B"
        td_
      tr_
      _tr
        _td "colspan='2' bgcolor=#00FF00"
          _quote "Area C"
        td_
      tr_
      tbody_
      table_
      body_
    html_
    

  3. List

    Firstly, _ol (order list) command creates a numbered list. Secondly, _ul (unorder list) creates a bulleted list. In their contents, _li represents the marker of an order and unorder list. Finally, _dl creates a definition list where _dt (definition title) and _dd (definition description) are markers for the list elements.

    Lists may be nested and combined with different types. The _ol only 'start' attribute specifies the starting marker of the first item in an ordered list (default 1). The 'type' attribute of _ol may have the value '1', 'a', 'A', 'i', 'I' for arabic numbers, lower alpha, upper alpha, lower roman, and upper roman markers respectively. However, the 'type' attribute in _ul sets the shape of markers with value disc, square, and circle. In addition, the _li only 'value' attribute sets the number of the current list item.

    These presentation attributes are better to be replaced by CSS controls.

    _html
    _head 
      _title; _quote "List"; title_ 
    head_
    _body
      _ul "type='circle'"; # shape of marker
        _li; _quote "First Item"
        _li; _quote "Second Item"
        _li; _quote "Third Item"
      ul_
      _ol "start=2 type='i'"
        # starting marker 2 with lower roman
        _li "value='1'"; _quote "1st Item"	
        # current item
        _li; _quote "2nd Item"
        _li; _quote "3rd Item"
      ol_
      _dl
        _dt; _quote "1st Title"; _dd 
        _quote "1st Content"
        _dt; _quote "2nd Title"; _dd 
        _quote "2nd Content"
        _dt; _quote "3rd Title"; _dd 
        _quote "3rd Content"
      dl_
    body_
    html_
    

Frame

Table

List

     
Home  : Last Update: Wed Apr 12 20:06:50 2000
Search
  Structure
 Neatware Snaml
Home    News    Product    Order    Forum    Feedback    Partner    Profile  © Neatware 2000