Coding Manual
Coding Manual
Objective:
After this lab the students should be able to understand the use of “Hypertext Markup
Language” (HTML) and its basic tags. Add linking information, creating multiple pages, and
navigating in a website and add tables in web pages.
Activity Outcomes:
Instructor Note:
As pre-lab activity, read Chapter 1, 2 and 3 from the textbook “Web Design Playground:
HTML & CSS the Interactive Way”, 1st Edition, April 2019 by Paul McFedries.
Useful Concepts
TAG Description
<!DOCTYPE> Defines the document type
<html> Defines an HTML document
<head> Contains metadata/information for the document
<title> Defines a title for the document
<body> Defines the document's body
<h1> to <h6> Defines HTML headings
<p> Defines a paragraph
<br> Inserts a single line break
<hr> Defines a thematic change in the content
<!--...--> Defines a comment
<img src=”abc.jpg”> Inserts an image
<video
Inserts Video
src=”abc.mp4”>
<ol></ol> Order list
<li> </li> Adding list items
<ul> Unoredered list
<dl> tag defines a description list.
<dt> defines terms/names
<!DOCTYPE html>
<html>
<head>
<title> Page Title Goes Here </title>
</head>
<body>
<h1> Main Page Heading </h1>
Page content goes here
<h2> Adding Image </h2>
<img src="CUIlogo.jpg">
</body>
</html>
1. Open Notepad
2. Click on File -> Save as…
3. In the File name pull-down box, type in webpage.html
4. Click on Save
5. Type in content for your file
6. Once you finished the content, click on File -> Save
Lab Activity 1
Solution
Output:
Lab Activity 2:
Solution
<dl>
<dt>Coffee</dt>
<dd>- black hot drink</dd>
<dt>Milk</dt>
<dd>- white cold drink</dd>
</dl>
<img src="CUIlogo.jpg" alt="Mountain View farrrr" style="width:200px;height:200px;">
<iframe width="956" height="538" src="https://www.youtube.com/embed/uDytOHFVw2Q"
title="Surat An-Nasr (The Divine Support) | Mishary Rashid Alafasy | | مشاري بن راشد العفاسي
"سورة النصرframeborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-
media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</body>
</html>
Output
Lab Activity 3:
• Create links to home, departments, admission and exams pages of CUI Islamabad
campus
Solution:
Output
Lab Activity 4:
• Create a table to add the add basic html table including the details of Company,
Contact, and Country.
Solution:
Output
Lab Activity 5:
Solution:
<table>
<thead>
<tr>
<th colspan="2">October</th>
<th colspan="2">November</th>
</tr>
</thead>
<tbody>
<tr>
<td>Sales</td>
<td>Profit</td>
<td>Sales</td>
<td>Profit</td>
</tr>
<tr>
<td>$200,00</td>
<td>$50,00</td>
<td>$300,000</td>
<td>$70,000</td>
</tr>
</tbody>
<tfoot>
<tr>
<th colspan= "4">November was more produstive</th>
</tr>
</tfoot>
</table>
</html>
Output
Lab Task 1
• Learn and try different tags and formatting options on your webpage of Comsats.
Lab Task 2
• Create a webpage for Comsats library. Add lists and apply text formatting to your
page. use videos and images of the library and then add them to your page.
Lab Task 3
• Use inline styling to make the webpage created in lab task 2, more aesthetic.
Lab Task 4
• Create in-page reference to the list created in the body and marks the locations
accordingly.
• Add tables to department and admission pages.
Lab Task 5
• Use tables to create a page layout given below that displays your profile (Personal
homepage)