Sideway
output.to from Sideway
Draft for Information Only

HTML Structure

The first section of a HTML document is a line of delcaration used to declare the document type.
The second section of a HTML document is a header section used to declare the related document information.
The third section of a HTML document is a content section used to contain the document contents of the HTML document.

Code Sample::
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>TITLE</title>
.....
</head>
<body>
<h1>HTML</h1>
<p>A Web Page Sample</p>
.....
</body>
</html>
Code Sample:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>TITLE</title>
.....
</head>
<body>
<h1>HTML</h1>
<p>A Web Page Sample</p>
.....
</body>
</html>
Code Sample:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title>TITLE</title>
.....
</head>
<frameset cols="50%,50%">
<frame src="frame_left.htm">
<frame src="frame_right.htm">
.....
</frameset>
</html>
<!DOCTYPE>
<!DOCTYPE> is a tag used for document type declaration. It must be the first line of a HTML document and is used to specify what version of HTML is used in the document. For HTML 4.01 specification, there are three DTDs.
child elements: ---
attributes: HTML PUBLIC "FPI" ["URL"]
events: ---
HTML 4.01 Strict DTD:
The Strict DTD allows the using of all elements and attributes, except those are outdated. Frameset is also not allowed.
 HTML Code
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
 "http://www.w3.org/TR/html4/strict.dtd">
HTML 4.01 Transitional DTD:
The Transitional DTD allows the using of all Strict DTD elements and attributes, including those outdated elements and attributes. Frameset is not allowed also.
HTML Code
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
HTML 4.01 Frameset DTD:
The Frameset DTD allows the using of all Transitional DTD elements and attributes, but allowing the usage of frameset."
 HTML Code
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
 "http://www.w3.org/TR/html4/frameset.dtd">
<html> open tag: <html>   end tag: </html>
The <html> element is the root element used to contain all the content of an HTML document except the <DOCTYPE> element. And the <html> element should be placed after the <DOCTYPE> element.
child elements: ( <head>, ( <body> | <frameset> ) )
attributes: lang dir version
events: ---
<head> open tag: <head>   end tag: </head>
The <head> element is used to contain the related infromation of the HTML document. Elements within the head section are manudipated through other mechanism and they are usually not for direct rendering. Elements are used to define title, keywords, ... etc. But only the <title> element is required in every HTML document.
child elements: ( ( <title> ) & ( <isindex> )? & ( <base> )? ) +( <script> | <style> | <meta> | <link> | <object> )*
attributes: lang dir profile
events: ---
<body> open tag: <body>   end tag: </body>
The <body> element is used to contain the content of the HTML document. Elements within the body section are manudipated by a user agent for presentation. Elements of the HTML document content can be text, images, table, hyperlinks, etc. Elements are used by a browser for rendering in a web page.
child elements: ( ( <p> | ( <h1> | <h2> | <h3> | <h4> | <h5> | <h6> ) | ( <ul> | <ol> | <dir> | <menu> ) | ( <pre> ) | <dl> | <div> | <center> | <noscript> | <noframes> | <blockquote> | <form> | <isindex> | <hr> | <table> | <fieldset> | <address> ) ( * | + ) | ( ( #PCDATA ) | ( <tt> | <i> | <b> | <u> | <s> | <strike> | <big> | <small> ) | ( <em> | <strong> | <dfn> | <code> | <samp> | <kbd> | <var> | <cite> | <abbr> | <acronym> ) | ( <a> | <img> | <applet> | <object> | <font> | <basefont> | <br> | <script> | <map> | <q> | <sub> | <sup> | <span> | <bdo> | <iframe> ) | ( <input> | <select> | <textarea> | <label> | <button> ) )( * | + ) ) +( <ins> | <del> )*
attributes: id class style title lang dir background bgcolor text link vlink alink
events: onclick ondbclick onmousedown onmouseup onmouseover onmousemove onmouseout onkeypress onkeydown onkeyup onload onunload
<frameset> open tag: <frameset>   end tag: </frameset>
The <frameset> element is used to contain multiple HTML documents in one HTML document within the same window. The <frameset> element only defines the arrangement of HTML documents. Each HTML document is hold by a <frame> element. The multiple views arrangement allows the management of each HTML document individually in a web page. Therefore the <body> element cannot be used together with the <frameset> in the same level.
child elements: ( ( <frameset> | <frame> )+ & ( <noframes> )? )
attributes: id class style title rows cols
events: onload onunload
required Optional tag Deprecated Transitional Frameset Exclusion
Optional Element or Content Occurrence Character:
(+) one or more;  (*) zero or more;  (?) zero or one times;  ( ) exactly once 
Choice or Sequence Element or Content :
(|) or  (&) and  (,) sequence  (+) include  (-) exclude

©sideway

ID: 100800027 Last Updated: 3/12/2011 Revision: 3 Ref:

close

References

  1. http://www.w3.org/TR/1999/REC-html401-1999, 1999, HTML 4.01 Specification: W3C Recommendation, updated 24 December 1999
close

Latest Updated LinksValid XHTML 1.0 Transitional Valid CSS!Nu Html Checker Firefox53 Chromena IExplorerna
IMAGE

Home 5

Business

Management

HBR 3

Information

Recreation

Hobbies 8

Culture

Chinese 1097

English 339

Reference 79

Computer

Hardware 249

Software

Application 213

Digitization 32

Latex 52

Manim 205

KB 1

Numeric 19

Programming

Web 289

Unicode 504

HTML 66

CSS 65

SVG 46

ASP.NET 270

OS 429

DeskTop 7

Python 72

Knowledge

Mathematics

Formulas 8

Algebra 84

Number Theory 206

Trigonometry 31

Geometry 34

Coordinate Geometry 2

Calculus 67

Complex Analysis 21

Engineering

Tables 8

Mechanical

Mechanics 1

Rigid Bodies

Statics 92

Dynamics 37

Fluid 5

Fluid Kinematics 5

Control

Process Control 1

Acoustics 19

FiniteElement 2

Natural Sciences

Matter 1

Electric 27

Biology 1

Geography 1


Copyright © 2000-2024 Sideway . All rights reserved Disclaimers last modified on 06 September 2019