HTML , or HyperText Markup Language is a universal coding system that is being used worldwide for many purposes, from creating a personal web page to establishing a company web site .
Since we cannot use our own language to start a web page , codes of HTML are used to build and design the web page. Some of the functions of HTML in a website are:
- Format text as title/heading
- Arrange graphics on web pages
- Link different websites
- <h1> (the start tag for heading)
- </h1> (end tag for heading)
- <p> (opening of a paragraph)
- </p> (closing of paragraph)
- <a href="link to any web page"> (start tag for link to other pages)
- </a> (end tag for link)
For example, if we want to create a table in our website , we can use HTML codes as well.
The code for a table is <table>
These are the codes we need to create a table with two columns and two rows:
<table border="1">
<tr>
<td>A</td>
<td>B</td>
</tr>
<tr>
<td>a</td>
<td>b</td>
</tr>
</table>
and here is the table that we would get:
Column A | Column B |
any content related to A | any content related to B |
Next:
How to create link using html
First of all, open the
notepad and type the
<html>
<body>
and
<p>
The tags to produce links are the <a>and </a>.
Then type <a>
The <a>tells where the links should start and the
</a> indicates where the link ends.
Everything between these two will work as a link.
The target of the link is added to the<a>tag using the
href=http://www.whateverpage.com setting.
The example belowshows how to make the word here work as a
link to yahoo.
|
You simply:
- Specify the target in the <a
href=" ">.
- Then add the text that should
work as a link.
- Finally add an </a> tag to indicate where the
link ends.
If you want to continue
to write further more about the links, you can add <h2>Chapter
</h2> and
<p> This chapter
explains......</p>
At the end type
<body>
and
<html>
to close the html text.
How to create images using html
In HTML,
images are defined with the <img> tag.
The
<img> tag is empty, which means that it contains attributes only,
and has no closing tag.
To
display an image on a page, you need to use the src attribute. Src stands for
"source".
The value
of the src attribute is the URL of the image you want to display.
The steps
of creating images using HTML are as below,
<html>
<body>
<p>
An image:
<img
src="image.gif" alt="smiley face"
width="32"
height="32" />
</p>
<p>
A moving image:
<img src="image2.gif
alt="Computer man"
width="48"
height="48" />
</p>
<p>
Note that the syntax of inserting
a moving image is no different from a non-moving image
The image will appeare according
to the text above.
Finally , after finishing the content for the website , the final code is
</body>
</html>
Finally , after finishing the content for the website , the final code is
</body>
</html>