HTML Concepts
The purpose of this presentation of HTML language is to describe the basic concepts of HTML (HyperText Markup Language). This is obviously not an exhaustive description of HTML, but it may be useful in better understanding of the code defining the generated site.
For a more detailed description of HTML, there are many references offering every level of detail, and there are many sites accessible online. The site http://www.W3.org/, of the World Wide Web Consortium, provides access to HTML specifications and offers numerous links to sites that discuss HTML and related subjects.
Presentation
Use
Tags
Structure of HTML Documents
The basic structure of HTML documents is as follows:
<HTML>
<HEAD>
<TITLE>Simple HTML Document</TITLE>
</HEAD>
<BODY>
<P>This is a very simple document.
</BODY>
</HTML>
• The tag <HTML>, which begins all HTML documents, indicates to the browser that there are HTML tags to be interpreted. The end tag </HTML> indicates the end of the document.
• The tag <HEAD> defines the header of the document, which contains:
• Between the <META> tags, keywords used by search engines or for other purposes.
• The title (<TITLE> tags), which will be displayed as the title of the browser window.
• The style sheet (<SHEET> tags), a quick way to define a format for displaying various elements in the page.
• Next, the <BODY> tag indicates the start of the body of the document, composed of text, images, and multimedia objects.
• The <P> tag, which indicates a new paragraph, is frequently used in the body of a document.
Hyperlinks
Hyperlinks to other locations are indicated by the <A HREF> tags, which contain the address of the text, image or other referenced object. When the user clicks on the hyperlink, its content is then displayed, either by replacing the contents of the browser window or inside a frame in the main window. The referenced element can also be another part of the same document. Hyperlinks are generally displayed in a different color than ordinary text. In addition, when the pointer is on a hyperlink, its shape changes.
A hyperlink is defined as follows:
Click <A HREF="//www.mega.com/">here</A> to visit our site.
In this example, “here” is underlined to show that it is a link, but the way links are actually displayed depends on browser configuration.
The address appears inside quotation marks. These can be omitted if the address contains no spaces.
It is possible to create several addresses in the same document, to allow jumping to a specific point in a document.
The tag for defining an address is:
<A NAME="Complinfor">
A jump to this address would be indicated as follows:
For more information see <A HREF="Info.htm#Complinfor">Other Information</A>
It is also possible to indicate a relative path (../xxx.htm). (This is a normal slash and not the usual backslash.)
The name of the page can be omitted if the link refers to another point in the same document.
For example: HREF="#Complinfor".
Other HTML Tags
There are several tags for defining the color of the element concerned. This color can be indicated by using colors predefined in HTML (black, purple) or by their Red/Green/Blue hexadecimal value (#FF0000=red, #00FF00=blue, #0000FF=green, #000000=black; the # can be omitted with certain browsers).
Other tags are used to define text formatting, create lists, tables, etc., as well as to define a document structure using different levels of sub-headers (<H1>, <H2>, …).