HTML Codes For Websites

Hypertext markup language (HTML) is the basic language you must learn to design simple web pages. This article is a list of HTML tags for web designing. Read to understand how the various HTML tags work to create a web page.
The hypertext mark up language (HTML) is the language which a web browser understands and renders a web page according to it. HTML is a mark up language wherein you prompt the web browser as to how you expect the web page to look. It is a mark up language with a WYSIWYG (What You Say is What You Get) philosophy.

Introduction to HTML Tags

The HTML code is the language which the web browser reads. It is inevitable that you know the code and tags to create a web page. There are certain rules that you need to follow in order to write the correct codes for any website.

Every web page is created from a 'source code' file. To create a basic web page, all you need is a text editor like notepad. You write the contents of the web pages in this text file along with all the HTML mark up codes distributed inside. This file is saved with a '.html' or '.htm' extension. When a browser like 'Firefox' or 'Internet Explorer' opens this file, it is rendered as a web page.

Every HTML 'tag' is written within pair of opening angular brackets (<>) and closing angular brackets (</>). In between these two bracket pairs, lies the text to be formatted or given a specialized form. A browser is not case-sensitive to tag text within angular brackets. Every tag may have certain attributes which are placed within the opening angular brackets (<>) after the tag name.

The whole source code of a web page is enclosed within <html> and </html> tags. The web reads the code and content written after <html> tag.

The main content of the web page that is displayed by the browser is contained within the <body> and </body> tags. All the textual and graphic content of the site should be contained within the <body> and </body> tags. The body tag has 'bgcolor' and 'font' attributes to set background color and font type.

There is a <Head> . .</Head> tag that comes before the <Body> tag, which contains extra information about the web page content and also contains the web page title (in the form of <Title> . . </Title> tags). Here is a sample structure of a web page source code:

<html>
<head>
<title>
"Title of Web Page Goes Here!"
</title>
</head> <body>"This text is displayed, while the rest are tags!"</body>
</html>

For Text in Websites
Here are the basic text formatting tags.
  • <b> . .</b> (Bold Tag): Text enclosed within the bold tag appears bold.
  • <i> . .</i> (Italic Tag): Text enclosed within the Italic tag appears Italicized
  • <u> . .</u> (Underline Tag): Text enclosed within appears underlined
  • <p> . .</p> (Paragraph Tag): Text enclosed within the paragraph tag constitutes a paragraph. This tag has an extra attribute of 'align= center/left/right'.
  • <br> . .</br> (Break Tag): This tag gives a break within the sentence and starts text on next line
For Links
In case one wants to hyperlink a phrase in the text body of the web page, that is create a link from that page to another web page, one must use the link tag which is:

<a href="(webpage URL)"> (Phrase to be linked)</a>

For Images
HTML code for websites includes a tag for embedding images. It comes with an 'Alt' attribute to supply extra information about the image, as well as 'height' and 'width' attributes to adjust original size of image. To embed an image use the image tag in the following way:

<Image src="(image URL)" height= "Pixel size" width = "pixel size"> . . .</Image>

For Fonts
HTML code for websites that defines the font for a text is the <Font> tag. You can even define the size of the font along with the font family. It is used as follows:

<Font face="" size= ""> . .</Font>

For Tables
You can create tables using HTML. This is done using the <Table> . . </Table> tags. Here is the code for creating a standard table (the <tr> . . </tr> tags are for creating a row and a cell within a row):

<table>
<tr><td>HTML</td> <td>Codes </td></tr>
<tr><td>For</td><td>Websites</td></tr>
</table>

This will be displayed in the following manner:

HTML Codes
For Websites

There are codes for colors of various shades which you can use to color the background or text. So, these were some of the basic HTML codes used in websites that you absolutely must know. I have covered only a few that are required to create a simple web page. HTML is adequate for text formatting but is rigid and limited. For more advanced and interactive web pages, you can use DHTML (Dynamic HTML) or XML which gives you the freedom of creating your own tags!
By
Published: 1/11/2010
Like This Article?
Follow:
Post Comment
Your Comments:
Your Name: