CTC 101-HTML CSS & JAVASCRIPT
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:
a) <title>Caleb University - Home</title>
b) <head>Caleb University - Home</head>
c) <h1>Caleb University - Home</h1>
d) <header>Caleb University - Home</header>
Answer: (a) <title>Caleb University - Home</title>
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:
a) <p>We are a leading tech company specializing in web development.</p>
b) <para>We are a leading tech company specializing in web development.</para>
c) <text>We are a leading tech company specializing in web development.</text>
d) <description>We are a leading tech company specializing in web
development.</description>
(a) <p>We are a leading tech company specializing in web development.</p>
Explanation: The <p> tag is used to define a paragraph in HTML.
Question 3
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:
a) <h1>Caleb University Wins National Award</h1>
b) <h6>Caleb University Wins National Award</h6>
c) <heading>Caleb University Wins National Award</heading>
d) <head>Caleb University Wins National Award</head>
Answer: (a) <h1>Caleb University Wins National Award</h1>
Explanation: The <h1> tag is used for the main heading.
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>
Answer: (b) <h2>Mission Statement</h2>
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:
a) <a href="https://example.com">Visit our website</a>
b) <link src="https://example.com">Visit our website</link>
c) <a src="https://example.com">Visit our website</a>
d) <href="https://example.com">Visit our website</href>
Answer: (a) <a href="https://example.com">Visit our website</a>
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:
a) <a href="https://example.com" target="_blank">Visit Example</a>
b) <a href="https://example.com" target="_new">Visit Example</a>
c) <a href="https://example.com" newtab="true">Visit Example</a>
d) <a href="https://example.com" open="new">Visit Example</a>
Answer: (a) <a href="https://example.com" target="_blank">Visit Example</a>
Explanation: The target="_blank" attribute opens the link in a new tab.
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:
a) <img src="campus.jpg" alt="Caleb University Campus">
b) <image src="campus.jpg" alt="Caleb University Campus">
c) <img href="campus.jpg" alt="Caleb University Campus">
d) <picture src="campus.jpg" alt="Caleb University Campus">
Answer: (a) <img src="campus.jpg" alt="Caleb University Campus">
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:
a) <img src="photo.jpg" alt="Photo"><caption>This is a photo</caption>
b) <figure><img src="photo.jpg" alt="Photo"><figcaption>This is a
photo</figcaption></figure>
c) <img src="photo.jpg" alt="Photo"><p>This is a photo</p>
d) <image src="photo.jpg" alt="Photo"><caption>This is a photo</caption>
Answer: (b) <figure><img src="photo.jpg" alt="Photo"><figcaption>This is a
photo</figcaption></figure>
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:
a) <ul><li>Product 1</li><li>Product 2</li><li>Product 3</li></ul>
b) <ol><li>Product 1</li><li>Product 2</li><li>Product 3</li></ol>
c) <list><li>Product 1</li><li>Product 2</li><li>Product 3</li></list>
d) <ul><item>Product 1</item><item>Product 2</item><item>Product 3</item></ul>
Answer: (a) <ul><li>Product 1</li><li>Product 2</li><li>Product 3</li></ul>
Explanation: The <ul> tag is used for unordered (bulleted) lists.
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:
a) <ul><li>Step 1</li><li>Step 2</li></ul>
b) <ol><li>Step 1</li><li>Step 2</li></ol>
c) <list><li>Step 1</li><li>Step 2</li></list>
d) <ol><step>Step 1</step><step>Step 2</step></ol>
Answer: (b) <ol><li>Step 1</li><li>Step 2</li></ol>
Explanation: The <ol> tag is used for ordered (numbered) lists.
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">
Answer: (a) <input type="text">
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">
Answer: (b) <input type="email">
Explanation: The email input type is used for email addresses.
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">
Answer: (c) <input type="range">
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">
Answer: (b) <input type="date">
Explanation: The date input type is used for date selection.
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">
Answer: b) <input type="email">
Explanation: The email input type is used for email addresses.
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">
Answer: b) <input type="password">
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">
Answer: a) <input type="radio">
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">
Answer: a) <input type="file">
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">
Answer: b) <input type="search">
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">
Answer: c) <input type="tel">
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">
Answer: b) <input type="datetime-local">
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">
Answer: b) <input type="color">
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">
Answer: c) <input type="range">
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">
Answer: b) <input type="date">
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">
Answer: a) <input type="text">
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">
Answer: b) <input type="radio">
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>Dr. John Doe</td>
<td>Computer Science</td>
<td>john.doe@calebuniversity.edu</td>
</tr>
</table>
Run HTML
b)
html
Copy
<table>
<td>Name</td>
<td>Department</td>
<td>Email</td>
<tr>
<td>Dr. John Doe</td>
<td>Computer Science</td>
<td>john.doe@calebuniversity.edu</td>
</tr>
</table>
Run HTML
c)
html
Copy
<table>
<th>Name</th>
<th>Department</th>
<th>Email</th>
<tr>
<td>Dr. John Doe</td>
<td>Computer Science</td>
<td>john.doe@calebuniversity.edu</td>
</tr>
</table>
Run HTML
d)
html
Copy
<table>
<tr>
<td>Name</td>
<td>Department</td>
<td>Email</td>
</tr>
<tr>
<td>Dr. John Doe</td>
<td>Computer Science</td>
<td>john.doe@calebuniversity.edu</td>
</tr>
</table>
Run HTML
Answer: a)
html
Copy
<table>
<tr>
<th>Name</th>
<th>Department</th>
<th>Email</th>
</tr>
<tr>
<td>Dr. John Doe</td>
<td>Computer Science</td>
<td>john.doe@calebuniversity.edu</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">
Answer: b) <input type="date">
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">
Answer: b) <input type="password">
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">
Answer: b) <input type="email">
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">
Answer: b) <input type="radio">
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">
Answer: c) <input type="tel">
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">
Answer: b) <input type="datetime-local">
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">
Answer: b) <input type="color">
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">
Answer: c) <input type="range">
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">
Answer: b) <input type="date">
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">
Answer: a) <input type="text">
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">
Answer: b) <input type="radio">
Explanation:
The radio input type allows users to select only one option.
Intermediate-Level HTML Questions (Continued)
Question 46
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">
Answer: b) <input type="date">
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">
Answer: c) <input type="range">
Explanation:
The range input type is used for selecting a value within a range.
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">
Answer: b) <input type="password">
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">
Answer: b) <input type="email">
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">
Answer: c) <input type="tel">
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">
Answer: b) <input type="datetime-local">
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">
Answer: b) <input type="color">
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">
Answer: c) <input type="range">
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">
Answer: b) <input type="date">
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">
Answer: a) <input type="text">
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">
Answer: b) <input type="radio">
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.