0% found this document useful (0 votes)
203 views

Lab 1-3 HTML CODES

The document contains instructions for 3 HTML coding labs: 1. How to open websites and search within websites by typing URLs and search terms. 2. How to write HTML code to design a basic web page with links to a university website and email address. 3. How to write HTML code to create a table displaying student data such as ID, name, and degree, with all values center-aligned.

Uploaded by

Ali Ibrahim
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
203 views

Lab 1-3 HTML CODES

The document contains instructions for 3 HTML coding labs: 1. How to open websites and search within websites by typing URLs and search terms. 2. How to write HTML code to design a basic web page with links to a university website and email address. 3. How to write HTML code to create a table displaying student data such as ID, name, and degree, with all values center-aligned.

Uploaded by

Ali Ibrahim
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Practical Labs

Lab 1: Accessing Website


How to open any web site and search any website?

Solution:-You should follow the following steps to open any website.

1. Connect to internet through modem or network


2. Double click on any web browser like internet explorer, Mozilla Firefox and Google
Chrome etc.
3. Type URL of web site which wants to access and press enter.

1. Searching any Website:


2. Open any searching engine i.e www.google.com
3. Type the word related to the site you are searching i.e Virtual University.
4. The related link will be in front of you. Open the most related link.
Lab 2: Writing HTML Code
Write html code to design the following page and create links for VU website and any email
address?

Solution:-

1. Open Notepad: Start, Programs, Accessories, Notepad


2. You are required to paste your code in notepad file. Example of code is given below:

<HTML>

<HEAD><TITLE>ALI’s Home Page</TITLE></HEAD>


<BODY>

<H1>ALI</H1>

<h2>Virtual University of Pakistan</h2>

<P><B>Student of MIT</B><BR>

<A HREF = "http://www.vu.edu.pk/"> Virtual University</A><BR><BR><BR>

<A HREF = "mailto:[email protected]"> Email </A><BR></P>

<P> I choose VU to realize my dreams. VU has steered my career in the right direction <A
HREF = http://www.vu.edu.pk/cs101/ ></A></P>

</BODY>

</HTML>  

3. You must be sure to save the file with ".html" extension because Notepad will otherwise
add ".txt" extension.
4. Open the saved file in any web browser i.e. Google chrome.

Lab 3: Writing HTML Code for Table


Write the HTML code for creating a table as shown in the following screenshot. You have to
write your own VU Id, name and last degree. All the values in the table should be center aligned.

Solution:-

<html>
<head><title>Table Creation</title></head>
<body>
<H1 align="center">VU Student Data<H1><br><br>
<table border="1" align="center">
<tr> <th align = "center">VU Id</th>
<th align = "center">Name</th>
<th align = "center">Last Degree</th>
</tr>
<tr>
<td align = "center">BC123456</td>
<td align = "center">Javed</td>
<td align = "center">MBA</td>
</tr>
<tr>
<td align = "center">BC987654</td>
<td align = "center">Umer</td>
<td align = "center">MIT</td>
</tr>
<tr> <td align = "center">BC4512875</td>
<td align = "center">Farukh</td>
<td align = "center">MCS</td>
</tr></table>
</body></html>

You might also like