This section contains carefully selected MCQs and Previous Year Questions with explanations to help students understand concepts and prepare effectively for examinations, interviews, and competitive tests.
Q: 1How many basic types of lists are there in HTML?
Option B
In HTML, a list is used to group related items so that content becomes more organized and readable. HTML provides three basic types of lists, each with its own semantic meaning and tags.
Unordered List (<ul>):
Ordered List (<ol>):
Description List or Definition List (<dl>, <dt>, <dd>):
Q: 2The main container for the HTML tags <tr>, <td>, and <th> is ________.
Option D
In HTML, the tags <tr> (Table Row), <td> (Table Data), and <th> (Table Header) are all used to define the structure of a table, and they must be enclosed within the <table> tag.
The <table> tag acts as the main container, inside which rows and cells are created to organize data in tabular form.
Q: 3Consider the following HTML code
<table>
<tr><td>Name</td></tr>
<tr><td>Class</td></tr>
</table>
What will it print?
Option C
In HTML:
In the given code, there are two <tr> tags, which means two rows.
Each row contains only one <td> tag, which means each row has only one column.
So the table structure becomes:
| Name |
| Class |
Q: 4Which of the following can be used to display black color in HTML?
Option A
In HTML and CSS, colors can be represented using the RGB color model, where RGB stands for Red, Green, and Blue. Each color is represented using three numerical values in the range 0 to 255:
A value of 0 means that the particular color component has no intensity, while 255 represents its maximum intensity.
Black is produced when there is no red, no green, and no blue light. Therefore, RGB(0, 0, 0) = Black.
Understanding RGB Values:
| RGB Value | Color | Explanation |
|---|---|---|
| RGB(0, 0, 0) | Black | No red, green, or blue component is present. |
| RGB(255, 255, 255) | White | Red, green, and blue are all at maximum intensity. |
| RGB(255, 0, 0) | Red | Red is at maximum intensity, while green and blue are absent. |
| RGB(0, 255, 0) | Green | Green is at maximum intensity, while red and blue are absent. |
Q: 5The correct sequence of HTML tags for starting a webpage is –
Option D
The correct and standard sequence of HTML tags to start a web page is:
This sequence ensures proper structure and rendering of the web page in browsers.
<html>
<head>
<title>Page Title</title>
</head>
<body>
<!-- Displayable Content -->
</body>
</html>
Q: 6Which of the following statement about HTML attributes is false?
Option C
In HTML, an attribute provides additional information about an HTML element or changes its behavior. Attributes are written inside the opening tag of an element, not in the closing (end) tag.
An attribute generally follows the name-value format: name="value"
E.g.:
<a href="https://www.surakuacademy.com" target="_blank">Visit Website</a>
Here, href and target are attributes of the <a> element. They are written inside the opening tag <a ...>.
Q: 7Which of the following values has to be assigned to the <target> tag in the <base> tag to open the link page in a new window?
Option A
In HTML, the <base> tag is used to define a default target for all hyperlinks on a page. The target attribute specifies where the linked document will open. When the value is _blank, the link opens in a new window or new tab.
| TARGET VALUE | MEANING |
|---|---|
| _blank | Opens in a new window or tab. |
| _self | Opens in same window. This is default. |
| _parent | Opens in parent frame. |
| _top | Opens in full window, replacing all frames if the page is inside a frameset or iframe. |
Q: 8How many forms can we have on a webpage at the maximum?
Option D
In HTML, a form is used to collect input from users such as name, password, email, feedback, etc. Forms are created using the <form> tag.
<form>
Name: <input type="text">
</form>
A webpage can contain multiple forms depending on the requirement of the website. HTML does not define any fixed maximum number of forms on a webpage. For example, a webpage may contain:
All these forms can exist on the same webpage.
Q: 9Which tag is used to create a drop-down menu in website using HTML?
Option B
The <select> tag in HTML is used to create a drop-down list. It is usually combined with <option> tags which define the options available in the menu.
<select name="Course">
<option value="BCI">Basic Computer Instructor</option>
<option value="SCI">Senior Computer Instructor</option>
<option value="Patwar">RSSB Patwar Exam</option>
<option value=”IA”>DOITC Informatics Assistant</option>
</select>
Q: 10How many different levels of heading does HTML support?
Option A
HTML supports six different levels of headings, represented by the tags <h1> to <h6>. These heading tags are used to organize and structure the content of a webpage.
Thank you so much for taking the time to read my Computer Science MCQs section carefully. Your support and interest mean a lot, and I truly appreciate you being part of this journey. Stay connected for more insights and updates! If you'd like to explore more tutorials and insights, check out my YouTube channel.
Don’t forget to subscribe and stay connected for future updates.