FREE HTML CODE
Search HTML Code

MySpace HTML Tutorial

HTML Tags

HTML stands for Hypertext Markup Language, and is the main language used to create websites. HTML uses "tags" that allow you to specify things (or "elements") to go on your web page. Some of the more common elements include headings, paragraphs, images, list items, music, and more.
HTML tags almost always have an opening tag and a closing tag, with some text in between. Something like this: <htmltag>some text</htmltag>. Note that there isn't actually an HTML tag called "htmltag" - this is just an example. You'll see some real HTML tags below.

There are some HTML tags that don't have a closing tag. They look something like <htmltag> or <htmltag />

Bold Text

You can make some text bold by using the <b> tag.

Example HTML code:

<b>bold text</b>
Result:
Bold text

Italic Text

You can make some text italic by using the <i> tag.
Example HTML code:

<i>italic text</i>

Result:
Italic text

Links

You can link to another web page using the <a> tag. This tag requires an attribute to determine which page to link to.

Example HTML code:

Learn about the <a href="http://www.natural-environment.com">Natural Environment</a>
Result:
Learn about the Natural Environment


Images

You can link to an image using the <img> tag. This tag also requires at least one attribute (to determine which image to link to). You can also use attributes to provide the dimensions and "alt text". Alt text is used in the event that the image can't be loaded.
Example HTML code:

<img src="http://www.natural-environment.com/images/milford_sound/milford_sound.jpg" width="442px" height="296px" alt="Photo of Milford Sound, New Zealand" />

Result:
Photo of Milford Sound, New Zealand

Music

You can link to a music file using the <embed> tag. This tag also requires at least one attribute (to determine which music file to link to). There are also optional attributes. In our example below, we use loop="false" to say "replay the music file once it's finished". We use autostart="false" to say don't start automatically when the visitor loads the page - wait until they click the "Play" button.

Example HTML code:

<embed name="lostmojo"
src=" web url "
loop="true"
autostart="false">
</embed>
Result:







| More