Q71. Which tag is used to create a table row in HTML?
a) <tr>
b) <td>
c) <th>
d) <row>
Show Answer
Correct Answer: a) <tr>
Explanation: The <tr> tag is used to define a table row in HTML. It contains table cells defined by <td> for standard cells and <th> for header cells.
Q72. How do you specify a color using hexadecimal values in CSS?
a) color: #rrggbb;
b) color: rgb(rr, gg, bb);
c) color: rgba(rr, gg, bb, a);
d) color: hsl(h, s, l);
Show Answer
Correct Answer: a) color: #rrggbb;
Explanation: To specify a color using hexadecimal values in CSS, you use the format #rrggbb, where rr, gg, and bb represent the red, green, and blue components of the color in hexadecimal format.
Q73. What is the correct HTML tag to define the largest heading?
a) <head>
b) <h1>
c) <heading>
d) <header>
Show Answer
Correct Answer: b) <h1>
Explanation: The <h1> tag defines the largest heading in HTML. Headings are defined from <h1> to <h6>, with <h1> being the largest and most important.
Q74. How do you apply styles to multiple elements with the same class in CSS?
a) .class { style properties }
b) class { style properties }
c) #class { style properties }
d) element.class { style properties }
Show Answer
Correct Answer: a) .class { style properties }
Explanation: To apply styles to multiple elements with the same class, you use the class selector in CSS with a dot . followed by the class name (e.g., .class { style properties }).
Q75. Which tag is used to define a form in HTML?
a) <form>
b) <input>
c) <submit>
d) <field>
Show Answer
Correct Answer: a) <form>
Explanation: The <form> tag is used to define a form in HTML. It is used to group various input elements and submit the data to a server.
Q76. What attribute specifies the height of an HTML image?
a) height
b) size
c) dimension
d) width
Show Answer
Correct Answer: a) height
Explanation: The height attribute specifies the height of an HTML image. It sets the height of the image in pixels or as a percentage of the containing element.
Q77. How do you create a clickable button in HTML?
a) <button>
b) <input type=”button”>
c) <clickable>
d) Both a) and b)
Show Answer
Correct Answer: d) Both a) and b)
Explanation: You can create a clickable button in HTML using either the <button> tag or <input type=”button”>. Both elements can trigger actions when clicked.
Q78. What does the padding property in CSS do?
a) Sets the space inside an element, between its content and its border
b) Sets the space outside an element, between its border and adjacent elements
c) Sets the width of an element’s border
d) Sets the color of an element’s border
Show Answer
Correct Answer: a) Sets the space inside an element, between its content and its border
Explanation: The padding property in CSS sets the space inside an element, between its content and its border. It can be applied to all sides or specific sides of an element.
Q79. How do you create a comment in CSS?
a) /* This is a comment */
b) // This is a comment
c) <!– This is a comment –>
d) — This is a comment —
Show Answer
Correct Answer: a) /* This is a comment */
Explanation: CSS comments are created using /* This is a comment */. Comments in CSS are used to add notes or explanations and are not displayed in the browser.
Q80. What is the purpose of the z-index property in CSS?
a) Controls the stacking order of elements
b) Sets the transparency of an element
c) Defines the width of an element’s border
d) Sets the position of an element
Show Answer
Correct Answer: a) Controls the stacking order of elements
Explanation: The z-index property in CSS controls the stacking order of positioned elements. Elements with a higher z-index value appear in front of those with a lower value.