0% found this document useful (0 votes)
71 views8 pages

Tag Name Code Example Browser View

The document describes various HTML tags and their functions. It provides code examples of each tag and how it would appear in the browser. Some key tags covered include headings, paragraphs, links, images, and forms. The tags allow formatting text, adding links and images, and collecting user input on webpages.

Uploaded by

rahulshahare
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views8 pages

Tag Name Code Example Browser View

The document describes various HTML tags and their functions. It provides code examples of each tag and how it would appear in the browser. Some key tags covered include headings, paragraphs, links, images, and forms. The tags allow formatting text, adding links and images, and collecting user input on webpages.

Uploaded by

rahulshahare
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Tag Name Code Example Browser View

<!--This can be viewed in the HTML part of a


<!-- comment Nothing will show
document-->
<a href="http://www.domain.com/">
<a - anchor
Visit Our Site</a>
<b> bold <b>Example</b> Example
<big> big (text) <big>Example</big> Example
body of
<body>The content of your HTML
<body> HTML Contents of your web page
page</body>
document
The contents of your web
The contents of your page<br>The contents page
<br> line break
of your page The contents of your web
page
<center>This will center your This will center your
<center> center
contents</center> contents
<dl> Definition Term
<dt>Definition Term</dt> Definition of the
definition
<dd>Definition of the term</dd> term
<dd> descriptio
<dt>Definition Term</dt> Definition Term
n
<dd>Definition of the term</dd> Definition of the
</dl> term
<dl> Definition Term
<dt>Definition Term</dt> Definition of the
definition <dd>Definition of the term</dd> term
<dl>
list <dt>Definition Term</dt> Definition Term
<dd>Definition of the term</dd> Definition of the
</dl> term
<dl> Definition Term
<dt>Definition Term</dt> Definition of the
definition <dd>Definition of the term</dd> term
<dt>
term <dt>Definition Term</dt> Definition Term
<dd>Definition of the term</dd> Definition of the
</dl> term
This is an <em>Example</em> of using This is an Example of
<em> emphasis
the emphasis tag using the emphasis tag
embed <embed src="yourfile.mid" width="100%"
<embed>
object height="60" align="center">

Music will begin playing


when your page is loaded
embed
<embed> Google search<input type="submit"> and will only play one
object
time. A control panel will
be displayed to enable
your visitors to stop the
music.
<font face="Times New
<font> font Example
Roman">Example</font>
<font face="Times New Roman"
<font> font
size="4">Example</font> Example
<font> font
<font face="Times New Roman" size="+3"
color="#ff0000">Example</font> Example
<form
action="mailto:[email protected]">
Name: <input name="Name" value="" Name:
size="10"><br>
<form> form Email:
Email: <input name="Email" value=""
size="10"><br> Submit Query
<center><input type="submit"></center>
</form>

<h1> heading 1 <h1>Heading 1 Example</h1>


<h2> heading 2 <h2>Heading 2 Example</h2>
<h3> heading 3 <h3>Heading 3 Example</h3>
<h4> heading 4 <h4>Heading 4 Example</h4>
<h5> heading 5 <h5>Heading 5 Example</h5>
<h6> heading 6 <h6>Heading 6 Example</h6>

heading
<head>Contains elements describing the
<head> of HTML Nothing will show
document</head>
document

horizonta Contents of your web page


<hr> <hr />
l rule
Contents of your web page
Contents of your web page
horizonta
<hr> <hr width="50%" size="3" />
l rule
Contents of your web page
Contents of your web page
horizonta
<hr> <hr width="50%" size="3" noshade />
l rule
Contents of your web page
<hr> Contents of your web page
horizonta <hr width="75%" color="#ff0000"
(Internet
l rule size="4" />
Explorer) Contents of your web page
<hr> Contents of your web page
horizonta <hr width="25%" color="#6699ff"
(Internet
l rule size="6" />
Explorer) Contents of your web page
<html>
<head>
<meta>
hypertext
<title>Title of your web page</title>
<html> markup Contents of your web page
</head>
language
<body>HTML web page contents
</body>
</html>
<i> italic <i>Example</i> Example
<img src="Earth.gif" width="41"
<img> image height="41" border="0" alt="text describing
the image" />
Example 1:

<form method=post action="/cgi- Example 1:


input bin/example.cgi">
<input>
field <input type="text" size="10" Submit
maxlength="30">
<input type="Submit" value="Submit">
</form>
Example 2:

<form method=post action="/cgi-


bin/example.cgi"> Example 2:
<input>
input <input type="text" style="color: #ffffff;
(Internet
field font-family: Verdana; font-weight: bold; font-
Explorer) Submit
size: 12px; background-color: #72a4d2;"
size="10" maxlength="30">
<input type="Submit" value="Submit">
</form>
Example 3:
Example 3:
<form method=post action="/cgi-
bin/example.cgi">
<table border="0" cellspacing="0"
input cellpadding="2"><tr><td
<input>
field bgcolor="#8463ff"><input type="text"
size="10" maxlength="30"></td><td
bgcolor="#8463ff" valign="Middle"> <input
type="image" name="submit"
src="yourimage.gif"></td></tr> </table>
</form>
Example 4:
Example 4:
<form method=post action="/cgi-
bin/example.cgi">
Enter Your Comments:<br>
input
<input> <textarea wrap="virtual" name="Comments"
field
rows=3 cols=20
maxlength=100></textarea><br>
<input type="Submit" value="Submit">
<input type="Reset" value="Clear"> Submit Clear
</form>
<input> input Example 5: Example 5:
field Select an option:
<form method=post action="/cgi- option 2
bin/example.cgi">
<center>
Select an option: Submit
<select>
<option >option 1</option>
<option selected>option 2</option>
<option>option 3</option>
<option>option 4</option>
<option>option 5</option>
<option>option 6</option>
</select><br>
<input type="Submit"
value="Submit"></center>
</form>
Example 6:

<form method=post action="/cgi- Example 6:


bin/example.cgi">
Select an option:<br> Select an option:
<input type="radio" name="option"> Option
1 Option 1
<input type="radio" name="option"
checked> Option 2 Option 2
<input type="radio" name="option"> Option
Option 3
input 3
<input>
field <br>
Select an option:
<br>
Select an option:<br> Selection 1
<input type="checkbox" name="selection">
Selection 1 Selection 2
<input type="checkbox" name="selection"
checked> Selection 2 Selection 3
<input type="checkbox" name="selection"> Submit
Selection 3
<input type="Submit" value="Submit">
</form>
Example 1:
Example 1:
 List item 1
<menu>
<li type="disc">List item 1</li>
<li type="circle">List item 2</li> o List item 2
<li type="square">List item 3</li>
</MENU>  List item 3
<li> list item
Example 2:
Example 2:
<ol type="i">
<li>List item 1</li>
<li>List item 2</li> i. List item 1
<li>List item 3</li> ii. List item 2
<li>List item 4</li> iii. List item 3
</ol> iv. List item 4

<head>
<link rel="stylesheet" type="text/css"
<link> link
href="style.css" />
</head>

<marquee
<marquee bgcolor="#cccccc" loop="-1"
> scrolling
scrollamount="2" width="100%">Example
(Internet text
Marquee</marquee>
Explorer)

<menu> menu <menu>  List item 1


<li type="disc">List item 1</li>
<li type="circle">List item 2</li>
<li type="square">List item 3</li>
o List item 2
</menu>
 List item 3

<meta name="Description"
content="Description of your site">
<meta> meta Nothing will show
<meta name="keywords"
content="keywords describing your site">
<meta HTTP-EQUIV="Refresh"
<meta> meta CONTENT="4;URL=http://www.yourdomain.c Nothing will show
om/">
<meta http-equiv="Pragma" content="no-
<meta> meta Nothing will show
cache">
<meta> meta <meta name="rating" content="General"> Nothing will show
<meta> meta <meta name="robots" content="all"> Nothing will show
<meta name="robots"
<meta> meta Nothing will show
content="noindex,follow">
<ol> ordered Numbered Numbered
list
<ol> 1. List item 1
<li>List item 1</li> 2. List item 2
<li>List item 2</li> 3. List item 3
<li>List item 3</li> 4. List item 4
<li>List item 4</li>
</ol>
Numbered Special Start
Numbered Special Start
5. List item 1
<ol start="5"> 6. List item 2
<li>List item 1</li> 7. List item 3
<li>List item 2</li> 8. List item 4
<li>List item 3</li>
<li>List item 4</li> Lowercase Letters
</ol>
a. List item 1
Lowercase Letters b. List item 2
c. List item 3
<ol type="a"> d. List item 4
<li>List item 1</li>
<li>List item 2</li> Capital Letters
<li>List item 3</li>
<li>List item 4</li>
</ol> A. List item 1
B. List item 2
Capital Letters C. List item 3
D. List item 4
<ol type="A">
<li>List item 1</li> Capital Letters Special
<li>List item 2</li> Start
<li>List item 3</li>
<li>List item 4</li> C. List item 1
</ol> D. List item 2
E. List item 3
F. List item 4
Capital Letters Special Start
Lowercase Roman
<ol type="A" start="3"> Numerals
<li>List item 1</li>
<li>List item 2</li> i. List item 1
<li>List item 3</li> ii. List item 2
<li>List item 4</li> iii. List item 3
</ol> iv. List item 4

Lowercase Roman Numerals Capital Roman


Numerals
<ol type="i">
<li>List item 1</li> I. List item 1
<li>List item 2</li> II. List item 2
<li>List item 3</li> III. List item 3
<li>List item 4</li> IV. List item 4
</ol>
Capital Roman
Capital Roman Numerals
Numerals Special Start

<ol type="I">
VII. List item 1
<li>List item 1</li>
VIII. List item 2
<li>List item 2</li>
IX. List item 3
<li>List item 3</li>
X. List item 4
<li>List item 4</li>
</ol>

Capital Roman Numerals Special Start

<ol type="I" start="7">


<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
<li>List item 4</li>
</ol>
<form method=post action="/cgi-
bin/example.cgi">
<center>
Select an option:
<select>
<option>option 1</option>
listbox <option selected>option 2</option> Select an option:
<option> option 2
option <option>option 3</option>
<option>option 4</option>
<option>option 5</option>
<option>option 6</option>
</select><br>
</center>
</form>
<p> paragrap This is an example displaying the use of the This is an example
h paragraph tag. <p> This will create a line displaying the use of the
break and a space between lines. paragraph tag.

Attributes: This will create a line


break and a space
Example 1:<br> between lines.
<br>
<p align="left"> Attributes:
This is an example<br>
displaying the use<br> Example 1:
of the paragraph tag.<br>
<br> This is an example
Example 2:<br> displaying the use
<br> of the paragraph tag.
<p align="right">
This is an example<br> Example 2:
displaying the use<br>
of the paragraph tag.<br> This is an example
<br> displaying the use
Example 3:<br> of the paragraph tag.
<br>
<p align="center">
Example 3:
This is an example<br>
displaying the use<br>
This is an example
of the paragraph tag.
displaying the use
of the paragraph tag.
small
<small> <small>Example</small> Example
(text)
deleted
<strike> <strike>Example</strike> Example
text
strong
<strong> <strong>Example</strong> Example
emphasis
Example 1:

<table border="4" cellpadding="2"


cellspacing="2" width="100%">
<tr>
<td>Column 1</td>
<td>Column 2</td>
</tr> Example 1:
</table>
Column 1 Column 2
Example 2: (Internet Explorer)
Example 2:
<table border="2" bordercolor="#336699"
cellpadding="2" cellspacing="2"
<table> table Column 1 Column 2
width="100%">
<tr>
<td>Column 1</td> Example 3:
<td>Column 2</td>
</tr> Column 1 Column 2
</table>
Row 2 Row 2
Example 3:

<table cellpadding="2" cellspacing="2"


width="100%">
<tr>
<td bgcolor="#cccccc">Column 1</td>
<td bgcolor="#cccccc">Column 2</td>
</tr>
<tr>
<td>Row 2</td>
<td>Row 2</td>
</tr>
</table>
<table border="2" cellpadding="2"
cellspacing="2" width="100%">
<tr>
<td> table data <td>Column 1</td>
Column 1 Column 2
<td>Column 2</td>
</tr>
</table>
<div align="center">
<table>
<tr>
<th>Column 1</th>
<th>Column 2</th>
<th>Column 3</th>
</tr>
<tr>
<td>Row 2</td>
<td>Row 2</td> Column Column Column
<td>Row 2</td> 1 2 3
table </tr>
<th> Row 2 Row 2 Row 2
header <tr>
Row 3 Row 3 Row 3
<td>Row 3</td>
<td>Row 3</td> Row 4 Row 4 Row 4
<td>Row 3</td>
</tr>
<tr>
<td>Row 4</td>
<td>Row 4</td>
<td>Row 4</td>
</tr>
</table>
</div>
Title of your web page will
document
<title> <title>Title of your HTML page</title> be viewable in the title
title
bar.
<table border="2" cellpadding="2"
cellspacing="2" width="100%">
<tr>
<tr> table row <td>Column 1</td> Column 1 Column 2
<td>Column 2</td>
</tr>
</table>
<tt> teletype <tt>Example</tt> Example
<u> underline <u>Example</u> Example
unordere o
<ul>
d list

You might also like