Example of different HTML Tags | Grade 11

TABLE Example

<html>
<body>
<table border=”4″>
<caption>Countries & Capital</caption>
<tr>
<td>S.N.</td>
<td>Country</td>
<td>Capital</td></tr>
<tr>
<td>1</td>
<td>Nepal</td>
<td>KTM</td></tr>
<tr>
<td>2</td>
<td>China</td>
<td>BJG</td></tr>
<tr>
<td>3</td>
<td>Japan</td>
<td>TKY</td></tr>
</table>
</body>
</html>

Output

Attributes of <table>:

height (in px), width (in px), border (0-4), bordercolor, background, bgcolor, align, cellspacing (distance between cell and cell’s border), cell padding (distance between cell content and cell border)

<TABLE>Example 2

<html>
<body>
<table border=”4″>
<caption>My Table</caption>
<tr><td>Mero</td><td colspan=2>Paper</td></tr>
<tr><td rowspan=2>Binit</td><td>Ghimire</td><td>123</td></tr>
<tr><td colspan=2>MeroPaper</td></tr>
</table>
</body>
</html>

Output

Ordered and List Example

<html>
<body>
<h1>Computer Memory</h1>
<ul type=”square”>
<li>Primary Memory</li>
<ol type=”a”>
<li>RAM</li>
<li>ROM</li>
<li>Cache Memory</li>
</ol>
<li>Secondary Memory</li>
<ul type=”circle”>
<li>Magnetic Memory</li>
<ol type=”i”>
<li>Magnetic Disk</li>
<li>Magnetic Tape</li>
<li>Magnetic Drum</li>
</ol>
<li>Optical Memory</li>
<li>Virtual Memory</li>
</body>
</html>

Output

Hyperlink

There are 2 types of hyperlink: External Link (Hyperlink) and Internal Link (Bookmark).

Internal Link Example

<a href=”#bottom”>Click here to go to bottom</a><br>
<a href=”#abc”>ABC</a><br>
<a href=”#computer”>Computer</a><br>
<a href=”#meropaper”>MeroPaper</a><br>
.<br>.<br>.<br>
<a name=”meropaper”>this is meropaper</a>
.<br>.<br>.<br>
<a name=”abc”>This is abc part of webpage.</a><br>
.<br>.<br>.<br>
<a name=”computer”>This is computer part of webpage</a><br>
.<br>.<br>.<br>
<a name=”bottom”>This is the bottom of webpage.</a>

Output

External Link Example

<a href=”https://binitghimire.me”>Visit my website!</a><br>
<a href=”https://google.com”>Visit Google!</a>

Output

Frame Example

<html>
<frameset rows=”20%,*”>
<frame src=”https://meropaper.com”>
<frameset cols=”30%,70%”>
<frame src=”https://binitghimire.me”>
<frame src=”https://techsanjal.com”>
</frameset>
</frameset>
</html>

Output

Form Example

<html>
<body>
<h1>Example of FORM</h1>
<form method=”post” action=”main.php”>
Name: <input type=”text” name=”name” value=” Enter your Name”><br>
Date of Birth: <input type=”date” name=”dob” ><br>
Gender: <input type=”radio” name=”gender” value=”Male”>Male &nbsp; &nbsp;
<input type=”radio” name=”gender” value=”Female”>Female<br>
Address: <input type=”text” name=”address”> <br>
Country: <select><option value=”np”>Nepal</option><option value=”in”>India</option><option value=”none”>Others</option></select><br>
Occupation: <br><input type=”checkbox” checked=true name=”pro1″>Student<br><input type=”checkbox” name=”pro2″>Govt. Work<br><input type=”checkbox” name=”pro7″>Others (if any) &nbsp;<textarea rows=1 cols=50>Mention other occcupation</textarea><br>
Phone Number: <input type=”tel”> <br>
<input type=”submit” value=”Submit”> <input type=”reset” value=”Reset”>
</form>
</body>
</html>

Output

Out of these tags, any one might come in final examination of Grade 11. This question is also one of the important questions.

Comments

comments

Hemant

Hemant Chaudhary is an student 19 years old. He is interested in Hacking, Blogging,coding. He like to Visit new Places and make new Friends. He used to Learn His web works From Friends and Currently is is CEO and Founder of Meropaper and meroreview.com