Skunk Creek Computing Services

HTML Coding Example

Local Directory -


HTML Page Format

As of 2010 and HTML Version 4.01, the dust is beginning to settle on the browser wars that hampered web development and quasi-standards are finally emerging that perhaps will be stable enough to trust. The HTML format for web pages is being formalized with structure specified in the HTML, and the presentation or appearance is specified by Style Sheets (CSS).

HTML is currently defined with loose and strict varieties. The loose variety is for transitioning over to the strict formatting rules and some formats are not enforced. The strict variety is for exact conformity to the HTML 4.01 standard, and being recommended.

The basic web page layout is organized as follows -

Doctype declaration with a DOCTYPE statement.
Begin HTML page declaration with an HTML statement.
Begin Head section declaration with a HEAD statement.
Meta content declarations, such as TITLE and META, within the BODY area.
Any style declaration to be used with an HTML statement.
End of Head section declaration with an /HEAD statement.
Begin Body section declaration with a BODY statement.
Web page content
End of Body section declaration with an /BODY statement.
End of HTML page declaration with an /HTML statement.

For the loose variety of HTML which amounts to supporting the programmer being in the process of transitioning to strict adherence to version 4.01 of HTML, the first line of the file must be exactly the following - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

Where -
<!DOCTYPE << Specifies a document type
HTML << An HTML specification is the root element
PUBLIC << HTML 4.01 is publicly available
"-//W3C//DTD HTML 4.01 << Using HTML 4.01
Transitional << Using the trnsitional mode
//EN" << The HTML markup is written in the English language
"http://www.w3.org/TR/html4/loose.dtd"> << Identifier for this standard

For the strict variety of HTML, the first line of the file must be exactly the following - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

Where the elements of this statement are -
<!DOCTYPE << Mandatory - Specifies a document type
HTML << An HTML specification is the root element
PUBLIC << HTML 4.01 is publicly available
"-//W3C//DTD HTML 4.01 << Using HTML 4.01
//EN" << The HTML markup is written in the English language
"http://www.w3.org/TR/html4/strict.dtd"> << Identifier for this standard

The second line of the file must define an HTML file with exactly the following - <html> << Mandatory - defines HTML code following

(Upper/lower case is optional.)

The third line of the file must define the head section with exactly the following - <head> << Mandatory - defines beginning of the HEAD section in this file

(Upper/lower case is optional.)

A title must be defined in the head section - <title> Page Title Content</title>

(Upper/lower case title word is optional.)

A meta tag line to define what language is to be used must be included in the head and body sections - <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

Where this statement has the following fields -
<meta << Opens the meta definition
http-equiv="Content-Type" << Specifies that the Content-Type definition is coming
content="text/html; charset=ISO-8859-1" << The content-type is text/html and the chracter set being used is ISO-8859-1
> << Close the meta definition

Any style element declaration must be defined in this head section -

A simple starter style element declaration is the following -

<STYLE type="text/css">
BODY {
margin: 12px, 50px, 12px, 50px;
background-color: #ffffff;
color: black;
font-size: medium;
font-family: Times New Roman, Times, Georgia, serif;
p { text-align: left; font-family: Times New Roman, Times, Georgia, serif}
H1 { font-family: Verdana, Arial, sans-serif}
H2 { font-family: Verdana, Arial, sans-serif}
H3 { font-family: Verdana, Arial, sans-serif}
H4 { font-family: Verdana, Arial, sans-serif}
H5 { font-family: Verdana, Arial, sans-serif}
}
</STYLE>

The head section must be closed with - </head> << Mandatory - closes the HEAD section

(Upper/lower case is optional.)

The next line must begin the content section of the page - <body> << Mandatory - Defines the beginning of the HTML text

(Upper/lower case is optional.)

Web page content goes here.

The content area must be closed with - </body> << Mandatory - defines the end of the BODY section

(Upper/lower case is optional.)

The entire HTML file must be closed with - </html> << Mandatory - defines the end of the HTML file

(Upper/lower case is optional.)




HTML Page Validation

The W3 organzation now offers the following advertisement free validation service -




HTML Colors

The following is one attempt to define and standardize web colors and their names -



Return to SCCS reference page.
Return to SCCS home page.
URL of this page: http://www.sccs.com/sccshpag.htm
Revised '1-Jul-2010,12:34:18'
Copyright © 1999, 2010 SCCS.