HTML Coding
 Designing a Site
 Publishing a Site
 My Cool Sites




  HTML Coding
 
Guides you with some of the HTML Codes

HTML Tags | Saving HTML Documents
HTML Tags


Basic Tags Of HTML:

<html>
<head>

</title>MIKESH SHRESTHA - WEB PRESENTATiON</title>
<BODY>
Your Text Here Between Opening Body tag & Closed Body tag. i hope you know about Opening Body Tag & Closing Body Tag. if You want more information about it then point to introduction, select HTML & select the topic you want.
</body>
</html>

 

Formatting Text:

The following are the tags for bold, underline, italic, superscript, subscript, and strike.
To Bold text - <I>Text to be Bold</I> or <STRONG></STRONG>
To italic text - <I>Text to be italic</I> or <EM></EM>
To underline - <U>Text to be italic</U>
To Superscript - <sup>Text to be superscripted</sup>
To Subscript - <sub>Text to be subscripted</sub>
To Strike - <strike>Text to be stroked</strike>

Example:
The <I>formula</I> of <b>(a+b)<sup>2</sup></b> is:
<BR><U><STRONG><EM>
a<sup>2</sup>+2ab+b<sup>2</sup><EM></STRONG></U></BR>

Output:
The formula of (a+b)2 is:
a2+2ab+b2

Paragraph Align:
<p></p> tags are used when we want to write a paragraph.
E.g.:<p align="Center">This will align the selected paragraph to center alignment</p>
Other align attributes are Left, Right, Justify.

Horizontal Rules
HR tag is used to draw a Horizontal Line. The following is the example of Horizontal Rules:
<hr width="70%" color="e3d3c3" size="70" align="center">

The Font Tag:
It is used to give font attributes to the text in the Web Page. For E.g.:
<font color="#f3d2c1" face="Lucida Handwriting" size=5>
The color attribute changes the desired color of the text.
The size attribute can be in absolute size, from 1 to 7, or in relative size +1 to +7, or -1 to -7 which increases or
decreases the size.

Break Line:
<BR> tag is used to introduce a line break. For E.g.: .........<BR>.......

Headings:

When we make a web page, we usually have a heading which can be bigger or smaller and bold than normal text. The heading
attributes
are from <h1> to <h6>
For E.g.:<h1 align=center>Biggest Heading</h1>
<h6 align=right>Smallest Heading</h6>

Page Color & Background image:
In the basic document we had noticed that the browser shows the text between the opening <BODY> tag and closing <BODY> tag. To get the background page color
&amp; image, you can add one more attribute in <BODY>tag.
For E.g.: <BODY BGCOLOR="#e1d1c1">(This is a hex code for color beginning with # & followed 2-2 numbers of R, G, and B)
<BODY BGCOLOR="aqua">
<BODY background="../images/mikesh.jpg">

Images:
We can insert images/pictures into our web page using <img> tag. it is single paired tag. To insert the web page you need to type the following code with the source of image files.
<img src="file:///c:/windows/web/wallpapers/Azul.jpg" align="center" alt="The picture will not appear if it is not present in the given directory" border=1>or<img scr="../images/Mikesh.gif" align="middle" alt="This picture must be present on the images directory which is one step backward of this file.">

Hyperlink:
Hyperlink connects two different web pages. You can link to same web page to bookmarks and to another web page. To link the two web pages we use <a>...</a>tag called Anchor tag.
For E.g.: <a href="../My Webs/index.htm" target=_blank>Go to Main Page</a>(Linking to another web page named index.htm in New Window)
<a href="#Mikesh" target=_parent>Mikesh</a>(Linking same web page to bookmark named Mikesh in Same Window)
<a href="mailto:mikeshshr@enet.com.np">Send Comments</a> (Sends E-Mail to mikeshshr@enet.com.np)

Marquee Tag:
Marquee Tag is used to display a scrolling text message within a web page to any directions.
For E.g.:
<marquee bgcolor="#a2b4c6" direction=left behavior=slide height=10>Text Moving/Scrolling</marquee>

Table: Table is used to format images & data's on the page. We can make a table by using <table></table> tags.
For e.g.:
<html>
<head>
</title>
This code is for making Table</title>
<BODY>
<table border=1 align=center bgcolor=aqua>
<Caption align=center>
Census</Caption>
<tr>
<th rowspan=2>
Year</th>
<th align=center colspan=3>Population</th>
</tr>
<tr>
<th cellpadding=2>
Male</th>
<th cellpadding=2>
Female</th>
<th cellpadding=3>
Total</th>
</tr>
<tr>
<th>
1991 A.D.</th>
<td>
92,45,657</td>
<td>
92,45,440</td>
<td>
1,84,91,097</td>
</tr>
<tr>
<th>
2001 A.D.</th>
<td>
1,15,63,921</td>
<td>
1,15,87,502</td>
<td>
2,31,51,423</td>
</tr>
</table>
</body>
</html>



Output:

Census
Year Population
Male Female Total
1991 A.D. 92,45,657 92,45,440 1,84,91,097
2001 A.D. 1,15,63,921 1,15,87,502 2,31,51,423
[ TOP ]
 
Saving HTML Document

      After finishing typing all the code of HTML Document in Notepad or any HTML text editors, if you want to save it. Click on File menu and click on Save or Save As... option as shown below:

      After Clicking on Save or Save As... option, a dialogue box appears as shown below:

     Give the any file name with extension having .HTM or .HTML. After saving go the saved file's location and execute it, then automatically Internet Explorer or any other default web browser will appear, you can see your web page from it.

Note: Your texts will be seen but the codes you have written within less than sign & greater than sign will not be seen.

[ TOP ]