Bit2102 C.a.ts S
Bit2102 C.a.ts S
<html>
<head>
<title>Cities Temperature Table</title>
</head>
<body>
<table border="1">
<tr>
<th colspan="5">TEMPERATURE</th>
</tr>
<tr>
<th>CITIES</th>
<th>Kiambu</th>
<th>Kisumu</th>
<th>Nyeri</th>
<th>Malindi</th>
<th>Nairobi</th>
</tr>
<tr>
<td>MAXIMUM</td>
<td>58</td>
<td>65</td>
<td>61</td>
<td>82</td>
<td>48</td>
Reference :
Geeks for Geeks. (n.d.). Introduction to HTML. Geeks for Geeks. https://www.geeksforgeeks.org/introduction-to-html/
</tr>
</table>
</body>
</html>
b) Define what an Internet Protocol is and Explain any four different protocols used in the internet
explaining their importance (5 marks)
• Internet protocol is derived from the TCP/IP suite of protocols which is the set of protocols
used to communicate across the internet according to the format of data sent via the
internet or local network.
Different protocols
• FTP - File Transfer Protocol allows file transfer between two computers with login
required.
• HTTP - Hypertext Transfer Protocol is used to transport HTML pages from web servers to
web browsers. The protocol used to communicate between web servers and web browser
software clients.
• DHCP - Dynamic host configuration protocol is a method of assigning and controlling the IP
addresses of computers on a given network. It is a server based service that automatically
assigns IP numbers when a computer boots. This way the IP address of a computer does
not need to be assigned manually.
• UDP - An unreliable connection less protocol used to control the management of
application-level services between computers. It is used for transport by some applications
which must provide their own reliability.
c) Write down the tags to format a heading to blue color, red background, bold and
border of 2 pixels (4marks)
<html>
<head>
Reference :
Geeks for Geeks. (n.d.). Introduction to HTML. Geeks for Geeks. https://www.geeksforgeeks.org/introduction-to-html/
<title>Formatted Heading</title>
</head>
<body>
<h1 style="color: blue; background-color: red; font-weight: bold; border: 2px solid;">Color Is Blue And
Bolder </h1>
</body>
</html>
d) What html code renders the text below on the browser? (2 marks)
Jamhuri 12th December 2024
<html>
<head>
<title></title>
</head>
<body>
<p>
<b>< Jamhuri</b>
<sup>12<sup>th</sup></sup>
<i>December</i>
<u>2024</u>
</p>
</body>
</html>
e) Write an HTML code that will display the following information (6 marks)
List of Students who were Admitted in 2023/2024 Academic year
Student Number Surname Gender Nationality COURSE
Reference :
Geeks for Geeks. (n.d.). Introduction to HTML. Geeks for Geeks. https://www.geeksforgeeks.org/introduction-to-html/
BBIT-001-05 CHINEDU M NIGERIAN BIT
BSCCS-001-06 ASHANTEE F GHANIAN COMPUTER
SCIENCE
BIT-001-07 POTTER M AMERICAN BIT
BIS-001-08 JANICE F KENYAN BIS
<html>
<head>
<title>List of Students Admitted in 2023/2024 Academic Year</title>
</head>
<body>
<table border="1">
<tr>
<th><b><u>Student Number</u></b></th>
<th><b><u>Surname</u></b></th>
<th><b><u>Gender</u></b></th>
<th><b><u>Nationality</u></b></th>
<th><b><u>COURSE</u></b></th>
</tr>
<tr>
<td>BBIT-001-05</td>
<td>CHINEDU</td>
<td>M</td>
<td>NIGERIAN</td>
<td>BIT</td>
</tr>
<tr>
<td>BSCCS-001-06</td>
<td>ASHANTEE</td>
<td>F</td>
<td>GHANIAN</td>
<td>COMPUTER SCIENCE</td>
</tr>
<tr>
<td>BIT-001-07</td>
<td>POTTER</td>
<td>M</td>
Reference :
Geeks for Geeks. (n.d.). Introduction to HTML. Geeks for Geeks. https://www.geeksforgeeks.org/introduction-to-html/
<td>AMERICAN</td>
<td>BIT</td>
</tr>
<tr>
<td>BIS-001-08</td>
<td>JANICE</td>
<td>F</td>
<td>KENYAN</td>
<td>BIS</td>
</tr>
</table>
</body>
</html>
End of LISTING
f) Using an example, differentiate internal style sheet and inline style sheet (4 marks)
• Inline CSS is a way of defining the styling of an HTML element by adding CSS rules directly
to the element’s tag using the “style” attribute. It is used for quick and simple styling
changes to specific elements, without creating a separate CSS file.
Example Syntax
<p style="css_styles">
// Content
</p>
Reference :
Geeks for Geeks. (n.d.). Introduction to HTML. Geeks for Geeks. https://www.geeksforgeeks.org/introduction-to-html/
• Internal CSS, also known as embedded CSS, involves adding CSS rules directly within the
<style> element in the <head> section of an HTML document. It allows styling specific to
that document.
Example syntax
<style>
// CSS Properties
</style>
g) Write HTML code to create a form that contains the following fields: Employee ID, Employee Name,
Address, City, Postal Code, and Country. The data should be sent to “demo_add”
(4 marks)
<html>
<head>
<title> </title>
</head>
<body>
<h2><b><u>Employee Form</b></u></h2>
<label for="address">Address:</label><br>
<input type="text" id="address" name="address"><br><br>
<label for="city">City:</label><br>
<input type="text" id="city" name="city"><br><br>
Reference :
Geeks for Geeks. (n.d.). Introduction to HTML. Geeks for Geeks. https://www.geeksforgeeks.org/introduction-to-html/
<label for="postalCode">Postal Code:</label><br>
<input type="text" id="postalCode" name="postalCode"><br><br>
<label for="country">Country:</label><br>
<input type="text" id="country" name="country"><br><br>
</body>
</html>
Reference :
Geeks for Geeks. (n.d.). Introduction to HTML. Geeks for Geeks. https://www.geeksforgeeks.org/introduction-to-html/