Basic HTML Document Code Structure
Basic HTML Document Code Structure
Begin writing your HTML tags by creating your document's basic layout. Copy and paste this
code into your text or HTML editor.
<html>
<head>
<title>Your Page Title</title>
</head>
<body>
This area will contain everything that will be visible through a web browser,
such as text and graphics. All of the information will be HTML coded.
For a complete list of HTML codes, tags and examples, see the HTML chart
below.
</body>
</html>
<title> - The TITLE of your page. This will be visible in the title bar of the viewers’
browser.
<body> - This is where you will begin writing your document and placing your
HTML codes.
A web page is created using a language called, Hypertext Markup Language, better known as
HTML Code. You can write your own coding within a plain text editor, such as Note Pad, or use
an HTML editor, which will write the code for you.
HTML codes, also referred to as HTML tags, are enclosed by the lesser than (<) and greater than
(>) brackets and may be written in capital or lower case letters.
The opening bracket is followed by an element, which is a browser command, and ends with the
closing bracket.
<font size=2>
An element may also be followed by attributes, which are words describing the properties of
the element, and further instruct the browser.
<font size=2>
Attributes are only contained in the opening HTML tags to the right of the element and are
separated by a space and followed by an equal (=) sign.
<font size=2>
<bgsound
src="wonderfu.mid"
autostart="false"
<embed src="yourfile.mid" autostart="true"
loop="1" />
hidden="false" loop="false">
<embed> embed object Music will begin playing
<noembed><bgsound src="yourfile.mid"
when your page is loaded
loop="1"></noembed>
and will only play one time.
A control panel will be
displayed to enable your
visitors to stop the music.
<font face="Times New
<font> font Example (Tip)
Roman">Example</font>
<font face="Times New Roman"
<font> font
size="4">Example</font>
Example (Tip)
<font face="Times New Roman" size="+3"
<font> font
color="#ff0000">Example</font> Example (Tip)
<form
action="mailto:[email protected]">
Name: <input name="Name" value="" Name: (Tip)
size="10"><br>
<form> form Email:
Email: <input name="Email" value=""
size="10"><br> Submit
<center><input type="submit"></center>
</form>
Example 2:
Example 2:
<ol type="i">
<li>List item 1</li> i. List item 1
<li>List item 2</li> ii. List item 2
<li>List item 3</li> iii. List item 3
<li>List item 4</li>
</ol> iv. List item 4
<menu> • List item 1
<li type="disc">List item 1</li>
<menu> menu <li type="circle">List item 2</li> o List item 2
<li type="square">List item 3</li>
</menu> List item 3
<ol> ordered list Numbered Numbered
Lowercase Roman
Capital Letters Special Start Numerals
<head>
<link rel="stylesheet" type="text/css"
<link> link
href="style.css" />
</head>