Updated on Kisan Patel
HTML stands for Hypertext Markup Language. Hypertext is simply a piece of text. Markup Language is language of writing layout information within documents.
Basically an HTML document is a plain text file. It contains rich text. The rich text means text with tags.
Any HTML program can be written in simple Notepad or Wordpad text editors. The extension to this program should be either
.htm. This program then can be opened in some web browser and the corresponding web page can be viewed.
The program consists of some strings enclosed within angular brackets. Such strings are called tags. The HTML program should be written within
<html> part indicates the start of html program and
</html> denotes end of html program. Use of slash(/) in the angular bracket indicates end of that particular tag.
Any HTML program has two prominent parts :
The head part acts as a header of a file and contains some information like setting the title of web page. In following example we have done the same thing. In the head part of HTML program we have added a title tag which sets the title to our web page as“My webpage”.
<head> <title>My webpage</title> </head>
The body part of HTML program will help us to create a look and feel of the web page. Above given HTML program is the simplest one in which the web page contains the text ”My first webpage”.
<body> My first webpage!!! </body>
One more thing, HTML is not a case sensitive language. You can write the program in any case it will be acceptable.
The comment in HTML can be denoted as follows :
There should not be a space between angular bracket and exclamation mark. This comment in beginning with
<!--and ending with
Following are some commonly used tags for formatting the text:
|<p>||This tag is should be put at the end of every paragraph.|
|<br>||This tag causes a single line break. Generally it is kept at the end of every line. If we want more three blank lines to be inserted after some text then we can put <br><br><br>. We get the line break automatically if the appearing on the web browser is too long. If we do not want suck break then <nobr> tag can be used for such text.|
|<pre>||This tag is used to preserve the white spaces and lines in the text.|
|<div>||This tag is used to make division of sections in the XHTML documents.|