HTML basic code snippets

1. HTML stands for 'Hypertext Markup Language.'
2. HTML code is composed of tags that tell your browser what to do.
3. When you create an HTML file, it is always better to save it with the extention of .html or .htm.
4. You can code any HTML file using notepad or any other text editor.
Great, that's about it. Just a few basic facts that will come in handy once you're ready to code. Lets being, shall we?.

The regular HTML document is made up of two parts; the head and the body. Most of the code will be in the body part of the document, however, some important information will also have to be stored in the head. Keep in mind that when you start a tag, such as the head, you use , and to end a tag, you always use a slash like this: I will now show you how to make a regular page consisting of basic HTML tags.

Open up your text editor and type the following:

<html> Starting the HTML document.
<head> Starting the head section.
<title> Starting the title.
Title here!
</title> Ending the title.
</head> Ending the head section.
<body> Starting the body section.
Body content here!
</body> Ending the body section.
</html> Ending the HTML document.

Now we save it as index.html.

[b:aa66282d42][u:aa66282d42]Code Bits and Peices[/b:aa66282d42][/u:aa66282d42]
Formatting Text

Bold text:


Italic text:


Underlining text:


Increase your text by one size above default:


Decrease your text by one size below default:


To create a horizontal line across the width of the table column.

This tag also has a percentage function so you can tell the web page how far across the table column you want it to go.
[code:1:aa66282d42]<hr width="100%">[/code:1:aa66282d42]

Invisible Comments

Comment made by you that won't display on the web page, only in the html. Useful for little reminders.

Centred text:


Aligned left:


Aligned right:


Font Size (The default size is 3, it ranges from 1-7):

[code:1:aa66282d42]<font size="2">****</font>[/code:1:aa66282d42]

Font (This will change the font to verdana):

You can add as many fonts as you want, if a computer viewing does not have the font Verdana it will move to Sans-Serif in the below example.

[code:1:aa66282d42]<font face="Verdana, Sans-Serif">****</font>[/code:1:aa66282d42]

Font Color (In place of the six's you should put the hex code of your color) :

[code:1:aa66282d42]<font color="#666666">****</font>[/code:1:aa66282d42]

Image Tags

Adding a picture.

[code:1:aa66282d42]<img src="example.gif">[/code:1:aa66282d42]

Height and width of the image (in pixels)

[code:1:aa66282d42]<img src="example.gif" height="20" width="20">[/code:1:aa66282d42]

Border (0 means no border which is also the default setting)

[code:1:aa66282d42]<img src="example.gif" border="0">[/code:1:aa66282d42]

Alignment (left, center or right)

[code:1:aa66282d42]<img src="example.gif" align="center">[/code:1:aa66282d42]

Embedding Music or Videos

Adding a Video/Audio File.

[code:1:aa66282d42]<embed src="example.wmv">[/code:1:aa66282d42]

Height and width of the video/audio player. (in pixels)

[code:1:aa66282d42]<embed src="example.wmv" height="40" width="140">[/code:1:aa66282d42]

Auto Start (Whether the Audio/Video plays as soon as the page loads True Or False)

[code:1:aa66282d42]<embed src="example.wmv" autostart="false">[/code:1:aa66282d42]

Loop (Whether after starting to play it continues to repeat True or False)

[code:1:aa66282d42]<embed src="example.wmv" loop="false">[/code:1:aa66282d42]

© 2004-2017 All rights reserved.
MyGen v2.6 - 132966393 Unique Visitors
This page was created in 1.018 seconds
Privacy Policy

eXTReMe Tracker