Saturday, July 28, 2012

Basic HTML Codes to Create a Webpage

If you want to create a webpage you need to know the basic html to start with. In most cases the basic html code given below are enough to create a webpage. Use your notepad to create a text document containing the words that you want to appear on your Web page. Make sure the name of your text document end in .html (or .htm if you're working on a PC) and save the document as "Text Only." Type out your story or whatever it is you want to publish. Here are some tips for organizing your text:

You need to insert some formatting tags in your document that will tell an Internet browser (such as Safari, Firefox, or Internet Explorer) how to arrange your words and pictures on the screen. These tags make up a language called HyperText Markup Language, or HTML. 
 
The basic skeleton for an HTML document looks like this:

<html>
<head>
<title>Title of Page</title>
</head>
<body>
Text of page...
</body>
</html>

Notice that (1) each formatting tag appears between "less than" (<) and "greater than" (>) signs, and (2) the tags often appear in pairs, with the second tag in the pair beginning with a "slash" (/).

Here's a list of some of the basic formatting tags in HTML:

<h1>...</h1>

header, level 1 (the largest size type for a header, usually used at the beginning of a page or the start of a new section). Smaller headers are tagged with <h2>...</h2>, <h3>...</h3>, etc.

<b>...</b>

boldface text

<i>...</i>

italic text

<center>...</center>

centered text

<p>

paragraph return (inserts an extra line space between paragraphs)

Note: Any paragraph returns that you insert in your document by simply hitting the Return key on your keyboard will be ignored by a Web browser. You must use the tag <p> to create a paragraph break on the screen.


line break (no extra space)

<hr>

horizontal rule (a line running left-to-right across the page, to separate one section from the next)

<ol>...</ol>

ordered, or numbered, list. Each list item begins with the tag <li> and falls somewhere between the <ol>...</ol> tags.

<ul>...</ul>

unordered, or bulleted, list. Again, each list item begins with the tag <li>.

<a href="filename.html">...</a>

a hotlink to another file in the same folder

<a href="http://URL">...</a>

a hotlink to another site. You will have to know the Uniform Resource Locator (URL), or Web address, of any site to which you want to link your page.

<img src="image.gif">

This tag would insert an image with the filename "image.gif" on the far left side of your page.

No comments:

Post a Comment