HOME   PRODUCTS   PARTNERS   STORE   COMPANY     

    HTML5

  1. Structure

    HTML5 is HyperText Markup Language 5, a standard for Web document. HTML5 modularization decomposes HTML5 into a collection of abstract modules. These modules may be combined to create an HTML5 subset or extension. Content developers can use the subset of HTML5 to fit different platforms such as mobile devices, game consoles, and appliances.

    Element and its attributes are basic components of HTML5. There are three types of element: start tag, end tag, and empty tag. The start and end tag has the format <element attribute> and </element> respectively. The text between the start tag and the end tag is called content. An element may have no end tag. An empty element has neither end tag nor content. An element name is always case-insensitive.

    Attributes are properties of an element. The attribute='value' pairs are attached behind the start element name and inside the < >. Any number of attribute value pairs may be attached in arbitrary order. The attributes that are not used in the start tag are set to be default values. Boolean attribute may only have the value. Usually, double quotation mark " " and single quotation mark ' ' group the value. We prefer to use single quote ' ' as value grouping. To specify attribute name it is better to use letters, digits, hyphens and periods. Both the attribute name and value are case insensitive.

    In Snaml for Tcl, _element and element_ command with underscore in the head and end represent the start tag and the end tag. One argument of the start element command is its attribute. The empty element is represented as double underline element (__element). It specifies that no content and end tag are expected. For example,

    package require HTML5
    
    output hello.html
    
    _html
      _head;
        _title; quote "Title"; title_
      head_
      _body
        quote "Document Content"
      body_
    html_
    

    where "package require HTML5" use the HTML5 package. "output" command writes the generated HTML5 to .html file. _html specifies the xml namespace and language. html_ specifies the end of html. _head command specifies the human readable and machine readable head information of an HTML5 document. The _title command must be included inside the _head content.