HTML Basics

 

HTML Basics

HTML BasicsIf you’re doing business on the Internet, learning some basic web design skills is an absolute must. Not only will you have the ability to create your own web pages, but you’ll also save yourself a great deal of money.

Web pages are created with special codes known as HTML (Hypertext Markup Language). These codes, also referred to as 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> </font>

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 tags to the right of the element and are separated by a space and followed by an equal (=) sign. The value follows the equal sign and is enclosed in quotes.

Basic Web Page HTML Document Structure

Below, is a very basic web page HTML document structure. It contains the opening HTML tag, the TITLE tag enclosed between the opening and closing HEAD tags, the opening and closing BODY tags and the closing HTML tag. All of your text, graphics and any additional HTML codes will be placed between the <body> and </body> tags.

<html>
<head>
<title>Your Web Page Title</title>
</head>
<body>

</body>
</html>

Each HTML tag above contains an opening tag and a closing tag. The opening tag is written with the command enclosed with brackets.

<html>

The closing tag contains a forward slash followed by the command enclosed with brackets.

</html>

The opening tag is telling the browser to begin the specified action and the closing tag is telling the browser to end the action.

The proper way to write HTML is to place your closing tags in sequence with your opening tags.

<b><i>Example of the proper sequence of writing HTML</i></b>

Notice that the closing tags are in sequence with the opening tags.

When you have several opening tags, the closing tags will begin with the last opening tag and end with the first. Are you totally confused now? Here’s some more examples.

This is an example of a properly written code:

<b><i>Example</i></b>

This is an example of an improperly written code:

<b><i>Example</b></i>

Creating a Basic Web Page HTML Document

Begin writing your HTML by creating your document’s basic layout — beginning with <html> and ending with </html>:

<html>
<head>
<META NAME="Description" CONTENT="Description of your
web page">
<META NAME="KEYWORDS" CONTENT="Keywords that best
describe your web page separated with a comma.">
<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.
</body>
</html>

<html> – Begins your HTML document

<head> – Contains information about the page such as, the TITLE, META tags for proper Search Engine indexing, STYLE tags, which determine the page layout and JavaScript coding for special effects.

<title> – The TITLE of your page. This will be visible in the title bar of your visitors’ browser.

Make sure you include your most relevant keyword phrase within your "title" for Search Engine indexing. A keyword phrase is two or more words that best describe your website. For example, if your website focuses on "grooming dogs" then your best keyword phrase will be "dog grooming."

</title> – Closes the <title> tag.

</head> – Closes the <head> tag.

<body> – This is where you will begin writing your
document.

</body> – Closes the <body> tag.

</html> – Closes the <html> tag.

Basic Text Elements

<b> – Bold Text

<b>Example</b>

<i> – Italic

<i>Example</i>

<u> – Underline

<u>Example</u>

RGB and Hexadecimal Color Codes

If you would like to specify a certain text or background color, you can do so by using color codes.

RGB color codes are represented as hexadecimal values. The RGB color codes contain three sets of numbers representing the amount of Red, Green and Blue contained in a color. These codes must be used within your HTML to specify your selected colors.

Now, to put the above statement in English…if you’d like to display your text in a certain color, you must include the hexadecimal color code within your font tag. Each color has its own color code.

Here are a few of the basic color codes:

Black – #000000
White – #FFFFFF
Red – #FF0000
Green – #00C000
Blue – #0000FF
Yellow – #FFFF00

HTML

<font color="#FF0000">Example</font>

CSS

<span style="color:blue">Blue</span>

Visit the HTML Color Codes page for additional color codes.

Creating HTML Links

In order to navigate a web page, you must create links. Links are created with an anchor, an href attribute and a URL (Uniform Resource Locator). URL’s provide the browser with the location of the link, the name of the file and the method in which to access the file.

<a href="http://www.domain.com/">Link</a>

When you begin writing your HTML code, all of your codes will be placed between your <body> and </body> tags, as this is the only part of your web page that will be viewed through a web browser.

Visit the HTML Codes page for a wealth of copy and paste codes.

This chart will provide you with all of the basic HTML codes, descriptions and examples to assist you in creating your web page.

 
This concludes this very basic overview of HTML. You’re now ready to begin the HTML Tutorial.