100% found this document useful (1 vote)
651 views5 pages

Web Technology Paper Mids

The document contains a midterm exam paper for the course "Web Technologies" at Arid Agriculture University, Rawalpindi. It includes questions to be answered by the student regarding differences between HTML and XML, differences between DIV/CSS layouts and HTML tables, and generating HTML code for a table with specific formatting. The student provides answers to the questions in the allotted space.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
651 views5 pages

Web Technology Paper Mids

The document contains a midterm exam paper for the course "Web Technologies" at Arid Agriculture University, Rawalpindi. It includes questions to be answered by the student regarding differences between HTML and XML, differences between DIV/CSS layouts and HTML tables, and generating HTML code for a table with specific formatting. The student provides answers to the questions in the allotted space.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Pir Mehr Ali Shah

Arid Agriculture University, Rawalpindi


Office of the controller of Examinations
Mid Exam Spring 2021 (Paper Duration 12 hours)
To be filled by Teacher

Course No.: … CS-566……………Course Title:………… Web Technologies ……………..….……………………………


Total Marks:……12……………………………Date of Exam:……30-04-2021 ……….……......................................
Degree: …BSIT……………………………….Semester:……4…………………… Section:………A………………………………
Marks
Q. No. 1 2 3 4 5 6 7 8 9 10 Obtained/
Total Marks
Marks
Obtained
Total Marks in Words:
Name of the teacher:
Who taught the course: Signature of teacher / Examiner:

To be filled by Student

Registration No.: 19 ARID 5327 Name: Muhammad Haroon Rauf

Q1. Please answer the following questions


a. Please write down the differences between HTML and XML.

b. Write the difference between DIV/CSS layouts vs. HTML Table layouts, which is more
useful and why?

ANSWER:

XML and HTML are both markup language with a lot of similarities and differences between them.
XML supplements HTML functionally via added extensions like CSS. XML would never be a
replacement for HTML but would be an extension to it.

Difference between XML and HTML is discussed on next page.


Q2. Write the HTML code for the following table. Please execute the exact formatting of
the given table (e.g. Bold, Italic and Background Color).

Answer:

The code is:

<!DOCTYPE html>

<html>

<head>

<style>

table {

width:50%;

table, th, td {

border: 1px solid black;

border-collapse: collapse;

padding: 2px;

td, th {

text-align:left;

</style>

</head>

<body>

<table>

<tr>

<th><u><b>Province</b></u></th>
<th><u><b>Capital</b></u></th>

<th><u><b>Population</b></u></th>

</tr>

<tr>

<td bgcolor="#ff0000">Punjab</td>

<td>Lahore</td>

<td>12,642,000</td>

</tr>

<tr>

<td ><b>Sindh</b></td>

<td bgcolor="#006400"><b>Karachi</b></td>

<td ><b>16,094,000</b></td>

</tr>

<tr>

<td><b><i>KPK</i></b></td>

<td><b><i>Peshawer</i></b></td>

<td bgcolor="#0096FF"><b><i>2,203,000</i></b></td>

</tr>

</table>

</body>

</html>

The output of the following code is


Q4. Make the HTML form which exactly includes: name, email, password, phone number,
file field, placeholder and disabled attributes. In addition, include the “Fill Again” and
“Save” buttons at the end.

Answer:

The code is:

<html>

<body>

<form>

<label>Name:</label><br>

<input type="text" placeholder="Haroon" disabled="true"></input><br>

<label>Email:</label><br>

<input type="text" placeholder="haroonrauf.com" disabled="true"></input><br>

<label>Phone Number:</label><br>

<input type="text" placeholder="032134565544" disabled="true"></input><br>

<label>File Field:</label><br>

<input type="text" placeholder="dir:\\" disabled="true"></input><br>

<button type="button">Fill Again</button>

<button type="button">Save</button>
</form>

</body>

</html>

The output for this code is

You might also like