Experiment 11
Experiment 11
Experiment 11
HTML is the basis for all Web pages. Compared to regular programming languages, HTML is
easy to learn and simple to use. HTML only requires a simple text editor to start coding.
An HTML file contains “markup tags” that tell the Web browser how to follow the instructions
enclosed within the tags. The angular brackets “<” and “>” indicate that the text within the
brackets is a tag. The start of the tag and the end of the tag are identified using special formats.
For example, <p> indicates the start of a new paragraph, and </p> indicates the end of the
paragraph. Regular text, or other instructions depending on the tag type, is enclosed between
the starting and ending tags. Tags are not case sensitive, that is, <p> and <P> mean the same
thing. Each tag can have attributes. These provide additional formatting and other information
regarding the tag. For example, the <body> tag can have an attribute to specify the background
colour of the Web page. <body bgcolor=”blue”> will render the Web page with a blue
background. Every HTML document starts with the <html> tag indicating to the Web browser
the start of the HTML document, and ends with the </html> tag, which indicates the end of
the document.
A basic HTML document looks like this:
<html>
<head>
<title>My first HTML page</title>
</head>
<body>
This is my first homepage. <b>This text is
bold</b>
</body>
</html>
The <head> tags indicate header information, or information that is not displayed in your page.
The <title> tags enclose the text that will appear in the caption bar of Web browser. The text
between the <body> tags will be displayed in browser window.
<b> and </b> indicate to the Web browser that all text between this tag pair should be bold
There are six levels of headings in HTML. They start with the <h1> </h1> tag pair and go up to
the <h6> </h6> pair. <h1> </h1> can be used for the most important heading, and <h2> </h2>
for a sub-head, and so on. For example:
<h1>Important heading</h1>
<h2>Less important heading</h2>
The <p> and </p> tags enable specify the paragraph breaks in text.
<table border=“1”>
<tr>
<th>Heading 1</th>
<th>Heading 2</th>
</tr>
<tr>
<td>row 1, cell 1</td>
<td>row 1, cell 2</td>
</tr>
<tr>
<td>row 2, cell 1</td>
<td>row 2, cell 2</td>
</tr>
</table>
To add an image to your Web page, you use the <img> tag and specify a location to pick up
the image file from
The ‘src’ (source) attribute tells the browser to get the image file image.jpg from the ‘images’
folder for the Web site, and that it should be displayed in a 200 x 150 pixel area. While the
image is being loaded, the “alt” (alternate) attribute informs the browser to display the text
“Just an image”.
XHTML
XHTML stands for Extensible HyperText Markup Language and is the next step in the
evolution of the Internet. The XHTML 1.0 is the first document type in the XHTML family.
XHTML was developed by the W3C to help web developers make the transition from HTML
to XML. By migrating to XHTML today, web developers can enter the XML world with all of
its attendant benefits, while still remaining confident in their content's backward and future
compatibility.
Developers who migrate their content to XHTML 1.0 will realize the following benefits:
XHTML documents are XML conforming. As such, they are readily viewed, edited, and
validated with standard XML tools. XHTML documents can be written to operate better than
they did before in existing browsers as well as in new browsers.
XHTML documents can utilize applications like scripts and applets that rely upon either the
HTML Document Object Model or the XML Document Object Model.
LAB EXERCISE:11
Implement the following basic tags of HTML to design a student bio-data web
page mentioning Name, Address, Qualification (Table), hobbies and user inputs.
1)<html>
2
2)<head>
4)<body bgcolor=pink>
5)<h1>welcome to html</h1><br/>
10)<h2>creating tables</h2>
<table border="2">
<th>table head</th>
<tr>
<td>row1</td>
<tr>
<td>row2</td>
</tr>
</table>
<br>
17)select box<br/>
18)<select>
<option>one </option>
<option>three </option>
<option>four </option>
</select>