Basic Html Codes

by admin on 2009/08/13

 

Basic Html Codes

Lets start off right at the very beginning of your webpage, you need to tell the web browser what coding language you are using so it can display the content correctly. At the top of your blank page before you write anything you should add the following basic html code

 

<html>

 

which will tell the browser you are using html code. All html tags should have a closing tag as well so at the bottom of your page after you have added your content you now need to close the html tag with

</html>

All html codes and tags should have a closing tag and that should consist of a “/”.

After the html tag you should add the head tag which is where you insert all the important stuff that needs to be read first link meta tags, titles ect. Again this tag should have a closing statement after the content so for example.

<html>

<head>

Head tags and content

</head>
</html>

Basic html codes are enough to build a very basic webpage and by the end of this post you should know the very basics of html codes.

 

If you notice in the top left of your internet explorer you can see a page title, this is displayed using the title tag and will be inserted in-between the head tags.

 

<html>

<head>
<title> Websites Title or Name</title>
Head tags and content

</head>
</html>

 

The other tags that can go in between your head tags are the meta tags which help tell the search engines what your site is about and what keywords your trying to rank for, you can use these two meta tags to tell google abit more about your site:

<html>

<head>
<title> Websites Title or Name</title>

<meta name=”keyword” content=” add, your, keywords here, basic, html, codes”>
<meta name=”description” Content=” write what your webpage is about I.e basic html codes
Head tags and content

</head>
</html>

 

Once you have added that you are now ready to start working on the main content of your website, also known as body. The content has to be put in between body tags like so:

 

<html>

<head>
<title> Websites Title or Name</title>

<meta name=”keyword” content=” add, your, keywords here, basic, html, codes”>
<meta name=”description” Content=” write what your webpage is about I.e basic html codes
Head tags and content
</head>

<body>

Content goes here I.e articles, images, links

ect

ect

 

 

</body>
</html>

 

So now you know the basics of how to start your webpage, all you need to learn now is how to code the content in between the body tags. Its best to just play around with different things to see what happens ect, that is probably the best way to learn, trial and error.

I’ll just cover several more basic html codes to get you going.

The first one is a link tag, this is the best and only way you should code you links unless you have a valid reason not to use it.

<a href=”pagename.php”>Click here </a>

What that does is just displays the “click here” part as a link, no one sees the actual code, that is just for the web browsers benefit.

Another popular tag is the html image tag which is used like this

<img src=”imagefile.gif”>

The link tag is one of few that doesn’t require a closing tag.

Leave a Comment

Previous post: Maintaining Your Search Engine Position

Next post: The Html Link Code