10a A

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

Open sidebar

HTML Form and Table

Default (GPT-3.5)

User

10. a) (i) What do you understand by the term web developing? (2 marks)

(ii) What are the roles of HTML table and form on website? (2 marks)

b) Write HTML codes for a form with three elements: Name, Gender and a Submit Button.

Both genders should be radio buttons and one of them checked. The background of the form

should be pink. (3 marks)

c) Write html codes that will display the web page given below? (3marks)

Name Salary

Ally Hussein 600,000

Yosepha Hyera 700,000

ChatGPT

a) (i) Web development is the process of creating and maintaining websites or web applications. It
involves tasks like coding, designing, and managing the functionality and appearance of websites.

(ii) HTML tables are used to display tabular data on a website, and HTML forms are used to collect and
submit user input. Tables organize data in rows and columns, while forms allow users to input data and
submit it to a server for processing.

b) Here is an example of HTML code for a form with the requested elements:

html

Copy code

<!DOCTYPE html>

<html>

<head>
<style>

form {

background-color: pink;

</style>

</head>

<body>

<form>

<label for="name">Name:</label>

<input type="text" id="name" name="name"><br><br>

<label for="gender">Gender:</label>

<input type="radio" id="male" name="gender" value="male" checked>

<label for="male">Male</label>

<input type="radio" id="female" name="gender" value="female">

<label for="female">Female</label><br><br>

<input type="submit" value="Submit">

</form>

</body>

</html>

c) To display the provided data in an HTML table, you can use the following HTML code:

html

Copy code

<!DOCTYPE html>

<html>

<head>

<style>
table {

border-collapse: collapse;

table, th, td {

border: 1px solid black;

</style>

</head>

<body>

<table>

<tr>

<th>Name</th>

<th>Salary</th>

</tr>

<tr>

<td>Ally Hussein</td>

<td>600,000</td>

</tr>

<tr>

<td>Yosepha Hyera</td>

<td>700,000</td>

</tr>

</table>

</body>

</html>

This code will create a table with two columns: Name and Salary, and display the provided data in rows
within the table.
Send a message

ChatGPT can make mistakes. Verify important information.

ChatGPT

You might also like