CTC 101 HTML Questions and Answers
CTC 101 HTML Questions and Answers
Question 1
Scenario: You are creating a web page for Caleb University's homepage. You want the browser
tab to display the title "Caleb University - Home." Which HTML code should you use?
Options:
Explanation: The <title> tag defines the title displayed in the browser tab.
Question 2
Scenario: You are creating a web page for a company's "About Us" section. You want to add a
paragraph describing the company. Which HTML code should you use?
Options:
Scenario: You are designing a web page for Caleb University's news section. The main headline
is "Caleb University Wins National Award." Which HTML code should you use for the headline?
Options:
Question 4
Scenario: You are creating a web page with multiple sections. One section has a subheading
"Mission Statement" under the main heading "About Caleb University." Which HTML code
should you use for the subheading?
Options:
a) <h1>Mission Statement</h1>
b) <h2>Mission Statement</h2>
c) <h6>Mission Statement</h6>
d) <sub>Mission Statement</sub>
Explanation: The <h2> tag is used for subheadings under the main heading.
Question 5
Scenario: You are creating a web page for a company. You want to add a link to their official
website. Which HTML code should you use?
Options:
Explanation: The <a> tag with the `href` attribute is used to create hyperlinks.
Question 6
Scenario: You want a link to open in a new tab so users don’t leave your website. Which HTML
code should you use?
Options:
Question 7
Scenario: You are creating a web page for Caleb University's photo gallery. You want to display
an image named "campus.jpg" with the alternative text "Caleb University Campus." Which
HTML code should you use?
Options:
Explanation: The <img> tag with the src and alt attributes is used to embed images.
Question 8
Scenario: You want to add a caption below an image on your web page. Which HTML code
should you use?
Options:
Explanation: The <figure> and <figcaption> tags are used to add captions to images.
Question 9
Scenario: You are creating a web page for a company's product catalog. You want to list items
in a bulleted format. Which HTML code should you use?
Options:
Question 10
Scenario: You are creating a web page for Caleb University's admission process. You want to list
steps in a numbered format. Which HTML code should you use?
Options:
Question 11
Scenario: You are creating a web page to display Caleb University's student grades. You want
to create a table with columns for "Name," "Subject," and "Grade." Which HTML code should
you use?
Options:
a)
html
<table>
<tr>
<th>Name</th>
<th>Subject</th>
<th>Grade</th>
</tr>
<tr>
<td>John</td>
<td>Math</td>
<td>A</td>
</tr>
</table>
b)
html
<table>
<td>Name</td>
<td>Subject</td>
<td>Grade</td>
<tr>
<td>John</td>
<td>Math</td>
<td>A</td>
</tr>
</table>
c)
html
<table>
<th>Name</th>
<th>Subject</th>
<th>Grade</th>
<tr>
<td>John</td>
<td>Math</td>
<td>A</td>
</tr>
</table>
d)
html
<table>
<tr>
<td>Name</td>
<td>Subject</td>
<td>Grade</td>
</tr>
<tr>
<td>John</td>
<td>Math</td>
<td>A</td>
</tr>
</table>
Answer: (a)
html
<table>
<tr>
<th>Name</th>
<th>Subject</th>
<th>Grade</th>
</tr>
<tr>
<td>John</td>
<td>Math</td>
<td>A</td>
</tr>
</table>
Explanation: The <th> tag is used for table headers, and the `<td>` tag is used for table data
cells.
Question 12
Scenario: You are creating a web page for a company's contact form. You want to add a field
for users to enter their name. Which HTML input type should you use?
Options:
a) <input type="text">
b) <input type="name">
c) <input type="string">
d) <input type="input">
Explanation: The text input type is used for single-line text input, such as names.
Question 13
Scenario: You are creating a web page for Caleb University's registration form. You want to add
a field for users to enter their email address. Which HTML input type should you use?
Options:
a) <input type="text">
b) <input type="email">
c) <input type="mail">
d) <input type="address">
Question 14
Scenario: You are creating a web page for a company's feedback form. You want to add a field
for users to rate their experience on a scale of 1 to 5. Which HTML input type should you use?
Options:
a) <input type="text">
b) <input type="number">
c) <input type="range">
d) <input type="rating">
Explanation: The range input type is used for selecting a value within a range.
Question 15
Scenario: You are creating a web page for Caleb University's event registration. You want to
add a field for users to select a date. Which HTML input type should you use?
a) <input type="text">
b) <input type="date">
c) <input type="calendar">
d) <input type="day">
Question 16
Scenario: You are creating a web page for a company's newsletter subscription form. You want
to add a field for users to enter their email address. Which HTML input type should you use?
Options:
a) <input type="text">
b) <input type="email">
c) <input type="mail">
d) <input type="address">
Question 17
Scenario: You are creating a webpage for Caleb University's student portal. You want to add a
field for users to enter their password. Which HTML input type should you use?
Options:
a) <input type="text">
b) <input type="password">
c) <input type="secret">
d) <input type="hidden">
Explanation:
The password input type hides the text entered by the user.
Question 18
Scenario: You are creating a webpage for a company's survey. You want to add a question
where users can select only one option from a list. Which HTML input type should you use?
Options:
a) <input type="radio">
b) <input type="checkbox">
c) <input type="select">
d) <input type="single">
Explanation:
The radio input type allows users to select only one option.
Question 19
Scenario: You are creating a webpage for Caleb University's course registration. You want to
add a dropdown menu for users to select a course. Which HTML tag should you use?
Options:
a) <dropdown>
b) <select>
c) <option>
d) <list>
Answer: b) <select>
Explanation:
The <select> tag is used to create a dropdown menu.
Question 20
Scenario: You are creating a web page for a company's file upload feature. You want to allow
users to upload a file. Which HTML input type should you use?
Options:
a) <input type="file">
b) <input type="upload">
c) <input type="attachment">
d) <input type="document">
Explanation:
The file input type is used for file uploads.
Question 21
Scenario: You are creating a web page for Caleb University's search feature. You want to add a
search bar. Which HTML input type should you use?
Options:
a) <input type="text">
b) <input type="search">
c) <input type="find">
d) <input type="query">
Explanation:
The search input type is used for search bars.
Question 22
Scenario: You are creating a web page for a company's contact form. You want to add a field
for users to enter their phone number. Which HTML input type should you use?
Options:
a) <input type="text">
b) <input type="number">
c) <input type="tel">
d) <input type="phone">
Explanation:
The tel input type is used for telephone numbers.
Question 23
Scenario: You are creating a web page for Caleb University's event registration. You want to
add a field for users to select a date and time. Which HTML input type should you use?
Options:
a) <input type="text">
b) <input type="datetime-local">
c) <input type="date">
d) <input type="time">
Explanation:
The datetime-local input type is used for selecting both a date and a time.
Question 24
Scenario: You are creating a web page for a company's color picker. You want to allow users to
select a color. Which HTML input type should you use?
Options:
a) <input type="text">
b) <input type="color">
c) <input type="picker">
d) <input type="palette">
Explanation:
The color input type is used for selecting a color.
Question 25
Scenario: You are creating a web page for Caleb University's feedback form. You want to add a
field for users to rate their experience on a scale of 1 to 5. Which HTML input type should you
use?
Options:
a) <input type="text">
b) <input type="number">
c) <input type="range">
d) <input type="rating">
Explanation:
The range input type is used for selecting a value within a range.
Question 26
Scenario: You are creating a web page for a company's registration form. You want to add a
field for users to enter their date of birth. Which HTML input type should you use?
Options:
a) <input type="text">
b) <input type="date">
c) <input type="calendar">
d) <input type="dob">
Explanation:
The date input type is used for date selection.
Question 27
Scenario: You are creating a web page for Caleb University's student portal. You want to add a
field for users to enter their student ID. Which HTML input type should you use?
Options:
a) <input type="text">
b) <input type="number">
c) <input type="id">
d) <input type="student">
Explanation:
The text input type is used for single-line text input, such as student IDs.
Question 28
Scenario: You are creating a web page for a company's feedback form. You want to add a field
for users to leave comments. Which HTML tag should you use?
Options:
a) <input type="text">
b) <textarea></textarea>
c) <comment></comment>
d) <input type="comment">
Answer: b) <textarea></textarea>
Explanation:
The <textarea> tag is used for multi-line text input, such as comments.
Question 29
Scenario: You are creating a web page for Caleb University's admission form. You want to add
a field for users to select their gender. Which HTML input type should you use?
Options:
a) <input type="text">
b) <input type="radio">
c) <input type="select">
d) <input type="gender">
Explanation:
The radio input type allows users to select only one option.
Question 30
Scenario: You are creating a web page for a company's product catalog. You want to add a
drop down menu for users to select a product category. Which HTML tag should you use?
Options:
a) <dropdown>
b) <select>
c) <option>
d) <list>
Answer: b) <select>
Explanation:
The <select> tag is used to create a dropdown menu.
Question 31
Scenario: You are creating a web page for Caleb University's faculty directory. You want to
display a list of faculty members with their names, departments, and email addresses in a table.
Which HTML code should you use?
Options:
a)
html
Copy
<table>
<tr>
<th>Name</th>
<th>Department</th>
<th>Email</th>
</tr>
<tr>
<td>Computer Science</td>
<td>[email protected]</td>
</tr>
</table>
Run HTML
b)
html
Copy
<table>
<td>Name</td>
<td>Department</td>
<td>Email</td>
<tr>
<td>Computer Science</td>
<td>[email protected]</td>
</tr>
</table>
Run HTML
c)
html
Copy
<table>
<th>Name</th>
<th>Department</th>
<th>Email</th>
<tr>
<td>Computer Science</td>
<td>[email protected]</td>
</tr>
</table>
Run HTML
d)
html
Copy
<table>
<tr>
<td>Name</td>
<td>Department</td>
<td>Email</td>
</tr>
<tr>
<td>Computer Science</td>
<td>[email protected]</td>
</tr>
</table>
Run HTML
Answer: a)
html
Copy
<table>
<tr>
<th>Name</th>
<th>Department</th>
<th>Email</th>
</tr>
<tr>
<td>Computer Science</td>
<td>[email protected]</td>
</tr>
</table>
Run HTML
Explanation:
The <th> tag is used for table headers, and the <td> tag is used for table data cells.
Question 32
Scenario: You are creating a web page for a company's product catalog. You want to add a
dropdown menu for users to select a product category. Which HTML code should you use?
Options:
a)
html
Copy
<select>
<option value="electronics">Electronics</option>
<option value="clothing">Clothing</option>
<option value="books">Books</option>
</select>
Run HTML
b)
html
Copy
<dropdown>
<option value="electronics">Electronics</option>
<option value="clothing">Clothing</option>
<option value="books">Books</option>
</dropdown>
Run HTML
c)
html
Copy
<list>
<option value="electronics">Electronics</option>
<option value="clothing">Clothing</option>
<option value="books">Books</option>
</list>
Run HTML
d)
html
Copy
<menu>
<option value="electronics">Electronics</option>
<option value="clothing">Clothing</option>
<option value="books">Books</option>
</menu>
Run HTML
Answer: a)
html
Copy
<select>
<option value="electronics">Electronics</option>
<option value="clothing">Clothing</option>
<option value="books">Books</option>
</select>
Run HTML
Explanation:
The <select> tag is used to create a dropdown menu, and the <option> tag defines the
options.
Question 33
Scenario: You are creating a web page for Caleb University's event calendar. You want to add a
field for users to select a date. Which HTML input type should you use?
Options:
a) <input type="text">
b) <input type="date">
c) <input type="calendar">
d) <input type="day">
Explanation:
The date input type is used for date selection.
Question 34
Scenario: You are creating a webpage for a company's feedback form. You want to add a field
for users to rate their experience on a scale of 1 to 5. Which HTML input type should you use?
Options:
a) <input type="text">
b) <input type="number">
c) <input type="range">
d) <input type="rating">
Answer: c) <input type="range">
Explanation:
The range input type is used for selecting a value within a range.
Question 35
Scenario: You are creating a web page for Caleb University's student portal. You want to add a
field for users to enter their password. Which HTML input type should you use?
Options:
a) <input type="text">
b) <input type="password">
c) <input type="secret">
d) <input type="hidden">
Explanation:
The password input type hides the text entered by the user.
Question 36
Scenario: You are creating a webpage for a company's newsletter subscription form. You want
to add a field for users to enter their email address. Which HTML input type should you use?
Options:
a) <input type="text">
b) <input type="email">
c) <input type="mail">
d) <input type="address">
Explanation:
The email input type is used for email addresses.
Question 37
Scenario: You are creating a webpage for Caleb University's admission form. You want to add a
field for users to select their gender. Which HTML input type should you use?
Options:
a) <input type="text">
b) <input type="radio">
c) <input type="select">
d) <input type="gender">
Explanation:
The radio input type allows users to select only one option.
Question 38
Scenario: You are creating a webpage for a company's contact form. You want to add a field
for users to enter their phone number. Which HTML input type should you use?
Options:
a) <input type="text">
b) <input type="number">
c) <input type="tel">
d) <input type="phone">
Explanation:
The tel input type is used for telephone numbers.
Question 39
Scenario: You are creating a webpage for Caleb University's event registration. You want to
add a field for users to select a date and time. Which HTML input type should you use?
Options:
a) <input type="text">
b) <input type="datetime-local">
c) <input type="date">
d) <input type="time">
Explanation:
The datetime-local input type is used for selecting both a date and a time.
Question 40
Scenario: You are creating a webpage for a company's color picker. You want to allow users to
select a color. Which HTML input type should you use?
Options:
a) <input type="text">
b) <input type="color">
c) <input type="picker">
d) <input type="palette">
Explanation:
The color input type is used for selecting a color.
Question 41
Scenario: You are creating a webpage for Caleb University's feedback form. You want to add a
field for users to rate their experience on a scale of 1 to 5. Which HTML input type should you
use?
Options:
a) <input type="text">
b) <input type="number">
c) <input type="range">
d) <input type="rating">
Explanation:
The range input type is used for selecting a value within a range.
Question 42
Scenario: You are creating a webpage for a company's registration form. You want to add a
field for users to enter their date of birth. Which HTML input type should you use?
Options:
a) <input type="text">
b) <input type="date">
c) <input type="calendar">
d) <input type="dob">
Explanation:
The date input type is used for date selection.
Question 43
Scenario: You are creating a webpage for Caleb University's student portal. You want to add a
field for users to enter their student ID. Which HTML input type should you use?
Options:
a) <input type="text">
b) <input type="number">
c) <input type="id">
d) <input type="student">
Explanation:
The text input type is used for single-line text input, such as student IDs.
Question 44
Scenario: You are creating a web page for a company's feedback form. You want to add a field
for users to leave comments. Which HTML tag should you use?
Options:
a) <input type="text">
b) <textarea></textarea>
c) <comment></comment>
d) <input type="comment">
Answer: b) <textarea></textarea>
Explanation:
The <textarea> tag is used for multi-line text input, such as comments.
Question 45
Scenario: You are creating a web page for Caleb University's admission form. You want to add
a field for users to select their gender. Which HTML input type should you use?
Options:
a) <input type="text">
b) <input type="radio">
c) <input type="select">
d) <input type="gender">
Explanation:
The radio input type allows users to select only one option.
Scenario: You are creating a web page for a company's product catalog. You want to add a
drop down menu for users to select a product category. Which HTML tag should you use?
Options:
a) <dropdown>
b) <select>
c) <option>
d) <list>
Answer: b) <select>
Explanation:
The <select> tag is used to create a drop down menu.
Question 47
Scenario: You are creating a web page for Caleb University's event calendar. You want to add a
field for users to select a date. Which HTML input type should you use?
Options:
a) <input type="text">
b) <input type="date">
c) <input type="calendar">
d) <input type="day">
Explanation:
The date input type is used for date selection.
Question 48
Scenario: You are creating a web page for a company's feedback form. You want to add a field
for users to rate their experience on a scale of 1 to 5. Which HTML input type should you use?
Options:
a) <input type="text">
b) <input type="number">
c) <input type="range">
d) <input type="rating">
Question 49
Scenario: You are creating a web page for Caleb University's student portal. You want to add a
field for users to enter their password. Which HTML input type should you use?
Options:
a) <input type="text">
b) <input type="password">
c) <input type="secret">
d) <input type="hidden">
Explanation:
The password input type hides the text entered by the user.
Question 50
Scenario: You are creating a web page for a company's newsletter subscription form. You want
to add a field for users to enter their email address. Which HTML input type should you use?
Options:
a) <input type="text">
b) <input type="email">
c) <input type="mail">
d) <input type="address">
Explanation:
The email input type is used for email addresses.
Question 51
Scenario: You are creating a web page for Caleb University's admission form. You want to add
a field for users to select their gender. Which HTML input type should you use?
Options:
a) <input type="text">
b) <input type="radio">
c) <input type="select">
d) <input type="gender">
Answer: b) <input type="radio">
Explanation:
The radio input type allows users to select only one option.
Question 52
Scenario: You are creating a web page for a company's contact form. You want to add a field
for users to enter their phone number. Which HTML input type should you use?
Options:
a) <input type="text">
b) <input type="number">
c) <input type="tel">
d) <input type="phone">
Explanation:
The tel input type is used for telephone numbers.
Question 53
Scenario: You are creating a web page for Caleb University's event registration. You want to
add a field for users to select a date and time. Which HTML input type should you use?
Options:
a) <input type="text">
b) <input type="datetime-local">
c) <input type="date">
d) <input type="time">
Explanation:
The datetime-local input type is used for selecting both a date and a time.
Question 54
Scenario: You are creating a web page for a company's color picker. You want to allow users to
select a color. Which HTML input type should you use?
Options:
a) <input type="text">
b) <input type="color">
c) <input type="picker">
d) <input type="palette">
Explanation:
The color input type is used for selecting a color.
Question 55
Scenario: You are creating a web page for Caleb University's feedback form. You want to add a
field for users to rate their experience on a scale of 1 to 5. Which HTML input type should you
use?
Options:
a) <input type="text">
b) <input type="number">
c) <input type="range">
d) <input type="rating">
Explanation:
The range input type is used for selecting a value within a range.
Question 56
Scenario: You are creating a web page for a company's registration form. You want to add a
field for users to enter their date of birth. Which HTML input type should you use?
Options:
a) <input type="text">
b) <input type="date">
c) <input type="calendar">
d) <input type="dob">
Explanation:
The date input type is used for date selection.
Question 57
Scenario: You are creating a web page for Caleb University's student portal. You want to add a
field for users to enter their student ID. Which HTML input type should you use?
Options:
a) <input type="text">
b) <input type="number">
c) <input type="id">
d) <input type="student">
Explanation:
The text input type is used for single-line text input, such as student IDs.
Question 58
Scenario: You are creating a web page for a company's feedback form. You want to add a field
for users to leave comments. Which HTML tag should you use?
Options:
a) <input type="text">
b) <textarea></textarea>
c) <comment></comment>
d) <input type="comment">
Answer: b) <textarea></textarea>
Explanation:
The <textarea> tag is used for multi-line text input, such as comments.
Question 59
Scenario: You are creating a web page for Caleb University's admission form. You want to add
a field for users to select their gender. Which HTML input type should you use?
Options:
a) <input type="text">
b) <input type="radio">
c) <input type="select">
d) <input type="gender">
Explanation:
The radio input type allows users to select only one option.
Question 60
Scenario: You are creating a web page for a company's product catalog. You want to add a
drop down menu for users to select a product category. Which HTML tag should you use?
Options:
a) <dropdown>
b) <select>
c) <option>
d) <list>
Answer: b) <select>
Explanation:
The <select> tag is used to create a drop down menu.