Techie Hints

A place where to find tech solution

HTML Training Session 2 – Document Code

Document codes identify the web page and specific components of the page. Three essential elements or codes are the HTML, HEAD, and BODY codes.

These three elements must be used in all web pages. The Web Publishing Series document on Essential HTML Elements describes the elements and codes below and explains how they work together to form a web page.

<HTML> </HTML> 

Used to identify the document as an HTML (Web) document. The HTML “on” code should be the very first item in your document; the HTML “off” code should be the very last item

<HEAD> </HEAD>

This code should immediately follow the HTML “on” code. The HEAD code is used for meta-information, or information about the document.

An example of meta-information is the title . The document title, therefore, is placed inside the HEAD code. This code should be turned off before entering the text and codes for the rest of the document.

<TITLE></TITLE>

The text you choose for the title is what will be displayed in the browser’s title bar, used for bookmarks, and used for indexing the file. It does not appear in the Web page itself.

<BODY> </BODY>

The body is the section in which the main content of the page is placed. All text, links, and image references must be placed within the BODY section.

HelloWorld HTML

<!DOCTYPE html>
<HTML>
<HEAD>
<TITLE>
Hello World
</TITLE>
</HEAD>
<BODY>
Hello, Welcome to HTML Page
</BODY>
</HTML>

 

 

Advertisements
%d bloggers like this: