HTML Basics: 245 MCQs
Showing 200 of 245 multiple-choice questions from this kit.
Warm-up · 123 questions
Q1. What is the very first line in every HTML5 document?
BeginnerAnswers and explanations are in the Veda app.
Q2. Which element is the root container that wraps all other HTML content?
BeginnerAnswers and explanations are in the Veda app.
Q3. Which of the following is NOT typically placed inside the `<head>` section?
BeginnerAnswers and explanations are in the Veda app.
Q4. What is the main consequence of forgetting the `<!DOCTYPE html>` declaration?
BeginnerAnswers and explanations are in the Veda app.
Q5. Why are CSS stylesheets linked inside the `<head>` rather than the `<body>`?
BeginnerAnswers and explanations are in the Veda app.
Q6. A developer places a `<script>` tag inside the `<head>` that loads a large JavaScript file. What is the most likely negative effect?
BeginnerAnswers and explanations are in the Veda app.
Q7. Which attribute on the `<html>` tag improves accessibility by specifying the language of the page?
BeginnerAnswers and explanations are in the Veda app.
Q8. A student writes an HTML file with the following structure: `<!DOCTYPE html><html><body><head><title>Test</title></head></body></html>`. What is the main structural error?
BeginnerAnswers and explanations are in the Veda app.
Q9. The `<!DOCTYPE html>` declaration is an HTML tag.
BeginnerAnswers and explanations are in the Veda app.
Q10. The `<head>` and `<body>` elements are siblings, both nested directly inside the `<html>` element.
BeginnerAnswers and explanations are in the Veda app.
Q11. Placing `<link>` tags for CSS in the `<body>` is a best practice for performance.
BeginnerAnswers and explanations are in the Veda app.
Q12. A valid HTML document can have multiple `<body>` elements.
BeginnerAnswers and explanations are in the Veda app.
Q13. The ___ declaration must be the very first line in every HTML5 document to prevent quirks mode.
BeginnerAnswers and explanations are in the Veda app.
Q14. The ___ element is the root container that wraps all other HTML content.
BeginnerAnswers and explanations are in the Veda app.
Q15. The ___ section contains metadata such as the title and links to CSS files.
BeginnerAnswers and explanations are in the Veda app.
Q16. The ___ attribute on the `<html>` tag specifies the language of the page, improving accessibility.
BeginnerAnswers and explanations are in the Veda app.
Q17. What is the purpose of the `<!DOCTYPE html>` declaration?
BeginnerAnswers and explanations are in the Veda app.
Q18. Name the four main structural components of an HTML document in order.
BeginnerAnswers and explanations are in the Veda app.
Q19. What is the role of the `<html>` element?
BeginnerAnswers and explanations are in the Veda app.
Q20. What type of information is stored in the `<head>` section?
BeginnerAnswers and explanations are in the Veda app.
Q21. What is the function of the `<body>` element?
BeginnerAnswers and explanations are in the Veda app.
Q22. What does the `<meta charset="UTF-8">` tag do?
BeginnerAnswers and explanations are in the Veda app.
Q23. How many `<html>`, `<head>`, and `<body>` elements should a valid HTML document have?
BeginnerAnswers and explanations are in the Veda app.
Q24. What is the relationship between the `<head>` and `<body>` elements?
BeginnerAnswers and explanations are in the Veda app.
Q25. Which of the following is the correct way to write a closing tag for a paragraph?
BeginnerAnswers and explanations are in the Veda app.
Q26. What is the main difference between an opening tag and a closing tag?
BeginnerAnswers and explanations are in the Veda app.
Q27. Which of the following is a self-closing tag?
BeginnerAnswers and explanations are in the Veda app.
Q28. What does semantic HTML primarily improve?
BeginnerAnswers and explanations are in the Veda app.
Q29. What is the correct nesting order for an unordered list with two items?
BeginnerAnswers and explanations are in the Veda app.
Q30. Which tag should you use to mark up a navigation menu for better accessibility?
BeginnerAnswers and explanations are in the Veda app.
Q31. What happens if you write `<p>Hello` without a closing tag?
BeginnerAnswers and explanations are in the Veda app.
Q32. Why is using `<strong>` preferred over `<b>` in modern HTML?
BeginnerAnswers and explanations are in the Veda app.
Q33. All HTML tags require a closing tag.
BeginnerAnswers and explanations are in the Veda app.
Q34. HTML tag names are case-insensitive, but lowercase is the convention.
BeginnerAnswers and explanations are in the Veda app.
Q35. Using semantic HTML tags can improve a website's search engine ranking.
BeginnerAnswers and explanations are in the Veda app.
Q36. The `<img>` tag requires a closing `</img>` tag.
BeginnerAnswers and explanations are in the Veda app.
Q37. An HTML ___ consists of an opening tag, content, and a closing tag.
BeginnerAnswers and explanations are in the Veda app.
Q38. The ___ tag is used to create a hyperlink to another webpage.
BeginnerAnswers and explanations are in the Veda app.
Q39. Placing one HTML element inside another is called ___.
BeginnerAnswers and explanations are in the Veda app.
Q40. The `<h1>` to `<h6>` tags define headings with ___ importance as the number increases.
BeginnerAnswers and explanations are in the Veda app.
Q42. What is the difference between an opening tag and a closing tag?
BeginnerAnswers and explanations are in the Veda app.
Q44. What is a self-closing tag? Give two examples.
BeginnerAnswers and explanations are in the Veda app.
Q46. What do the `<h1>` to `<h6>` tags represent?
BeginnerAnswers and explanations are in the Veda app.
Q50. What is the convention for writing tag names in HTML?
BeginnerAnswers and explanations are in the Veda app.
Q51. What does HTML stand for?
BeginnerAnswers and explanations are in the Veda app.
Q52. Which of the following is a self-closing HTML tag?
BeginnerAnswers and explanations are in the Veda app.
Q53. Why is HTML not considered a programming language?
BeginnerAnswers and explanations are in the Veda app.
Q54. What is the purpose of the `alt` attribute on an `<img>` tag?
BeginnerAnswers and explanations are in the Veda app.
Q55. Which HTML element wraps the entire document?
BeginnerAnswers and explanations are in the Veda app.
Q56. What is semantic HTML?
BeginnerAnswers and explanations are in the Veda app.
Q57. Which of the following is a valid HTML element with an attribute?
BeginnerAnswers and explanations are in the Veda app.
Q58. What is the main advantage of separating HTML structure from CSS presentation?
BeginnerAnswers and explanations are in the Veda app.
Q59. HTML is a programming language that can perform calculations.
BeginnerAnswers and explanations are in the Veda app.
Q60. The `<head>` element contains the visible content of a web page.
BeginnerAnswers and explanations are in the Veda app.
Q61. Using semantic HTML tags can improve a website's search engine ranking.
BeginnerAnswers and explanations are in the Veda app.
Q62. The `<br>` tag requires a closing tag like `</br>`.
BeginnerAnswers and explanations are in the Veda app.
Q63. HTML uses ___ to annotate text and define the structure of a web page.
BeginnerAnswers and explanations are in the Veda app.
Q64. The ___ attribute on an `<img>` tag provides a text description for accessibility and SEO.
BeginnerAnswers and explanations are in the Veda app.
Q65. The hierarchical structure of an HTML document is called the ___.
BeginnerAnswers and explanations are in the Veda app.
Q66. Modern best practice separates HTML for structure and ___ for presentation.
BeginnerAnswers and explanations are in the Veda app.
Q68. Is HTML a programming language? Explain briefly.
BeginnerAnswers and explanations are in the Veda app.
Q69. What is the difference between an opening tag and a closing tag?
BeginnerAnswers and explanations are in the Veda app.
Q70. Give two examples of self-closing HTML tags.
BeginnerAnswers and explanations are in the Veda app.
Q71. What is the purpose of the `alt` attribute on an `<img>` tag?
BeginnerAnswers and explanations are in the Veda app.
Q72. What are the two main sections inside an `<html>` element?
BeginnerAnswers and explanations are in the Veda app.
Q74. What is the purpose of the `<head>` element?
BeginnerAnswers and explanations are in the Veda app.
Q75. What does the term 'HyperText' in HTML refer to?
BeginnerAnswers and explanations are in the Veda app.
Q76. Which HTML tag is used for the most important heading?
BeginnerAnswers and explanations are in the Veda app.
Q77. What does the `<p>` tag define?
BeginnerAnswers and explanations are in the Veda app.
Q78. How many `<h1>` tags are recommended per web page?
BeginnerAnswers and explanations are in the Veda app.
Q79. Why is it important not to skip heading levels (e.g., going from `<h1>` to `<h4>`)?
BeginnerAnswers and explanations are in the Veda app.
Q80. Which of the following is a correct use of headings and paragraphs?
BeginnerAnswers and explanations are in the Veda app.
Q81. What is the primary role of headings in a web page?
BeginnerAnswers and explanations are in the Veda app.
Q82. A student writes `<h1>Main Title</h1><h3>Subsection</h3>`. What is the issue?
BeginnerAnswers and explanations are in the Veda app.
Q83. How do search engines primarily use heading tags?
BeginnerAnswers and explanations are in the Veda app.
Q84. The `<p>` tag automatically adds space before and after the paragraph.
BeginnerAnswers and explanations are in the Veda app.
Q85. You can use `<h1>` multiple times on a single page without any negative effects.
BeginnerAnswers and explanations are in the Veda app.
Q86. Headings should be used for their visual appearance, such as making text larger.
BeginnerAnswers and explanations are in the Veda app.
Q87. A well-structured page with headings and paragraphs improves both accessibility and SEO.
BeginnerAnswers and explanations are in the Veda app.
Q88. HTML headings range from `<h1>` (most important) to `<h6>` (___ important).
BeginnerAnswers and explanations are in the Veda app.
Q89. The ___ tag defines a paragraph in HTML.
BeginnerAnswers and explanations are in the Veda app.
Q90. Skipping heading levels (e.g., from `<h1>` to `<h3>`) breaks the logical ___ for screen readers.
BeginnerAnswers and explanations are in the Veda app.
Q91. To change the visual size of a heading, you should use ___ instead of misusing heading tags.
BeginnerAnswers and explanations are in the Veda app.
Q92. What are the HTML tags used for headings and what do they represent?
BeginnerAnswers and explanations are in the Veda app.
Q93. What does the `<p>` tag define and how do browsers display it by default?
BeginnerAnswers and explanations are in the Veda app.
Q94. How many `<h1>` tags should you use per page and why?
BeginnerAnswers and explanations are in the Veda app.
Q95. Do paragraphs have a hierarchy like headings?
BeginnerAnswers and explanations are in the Veda app.
Q96. What is the best practice for using multiple `<h2>` tags?
BeginnerAnswers and explanations are in the Veda app.
Q97. When would you use `<h4>` to `<h6>` tags?
BeginnerAnswers and explanations are in the Veda app.
Q98. Do you need a heading before every paragraph?
BeginnerAnswers and explanations are in the Veda app.
Q99. What is the main purpose of using headings in a web page?
BeginnerAnswers and explanations are in the Veda app.
Q100. Which HTML element is used to group input fields and control form submission?
BeginnerAnswers and explanations are in the Veda app.
Q101. What attribute of the `<input>` tag determines the behavior and appearance of the input field?
BeginnerAnswers and explanations are in the Veda app.
Q102. What happens if you forget to include the `name` attribute on an input field?
BeginnerAnswers and explanations are in the Veda app.
Q103. Which input type creates a button that automatically submits the form?
BeginnerAnswers and explanations are in the Veda app.
Q104. A developer uses `<input type="button" value="Click">` expecting it to submit the form. What will happen?
BeginnerAnswers and explanations are in the Veda app.
Q105. Which input type provides basic email validation and shows a mobile-friendly keyboard?
BeginnerAnswers and explanations are in the Veda app.
Q106. What is the primary difference between `<input type="checkbox">` and `<input type="radio">`?
BeginnerAnswers and explanations are in the Veda app.
Q107. A student writes `<form><input type="text"></form>` and wonders why no data is sent. What is the most likely missing element?
BeginnerAnswers and explanations are in the Veda app.
Q108. The `<form>` element is visible on the page by default.
BeginnerAnswers and explanations are in the Veda app.
Q109. An input field without a `name` attribute will still send its value to the server on form submission.
BeginnerAnswers and explanations are in the Veda app.
Q110. `<input type="number">` restricts input to numeric values and shows a numeric keypad on mobile devices.
BeginnerAnswers and explanations are in the Veda app.
Q111. Using `<input type="button">` will submit the form when clicked.
BeginnerAnswers and explanations are in the Veda app.
Q112. The ___ attribute of the `<input>` tag determines the kind of input field, such as text, password, or email.
BeginnerAnswers and explanations are in the Veda app.
Q113. To create a password field that masks user input, use `<input type="___">`.
BeginnerAnswers and explanations are in the Veda app.
Q114. A form cannot be submitted without a(n) ___ element, such as `<input type="submit">`.
BeginnerAnswers and explanations are in the Veda app.
Q115. If an input field lacks the ___ attribute, its value will not be sent to the server when the form is submitted.
BeginnerAnswers and explanations are in the Veda app.
Q116. What is the purpose of the `<form>` element in HTML?
BeginnerAnswers and explanations are in the Veda app.
Q117. Name three common input types used in HTML forms.
BeginnerAnswers and explanations are in the Veda app.
Q118. Why is the `name` attribute important on an input field?
BeginnerAnswers and explanations are in the Veda app.
Q119. What does `<input type="password">` do differently from `<input type="text">`?
BeginnerAnswers and explanations are in the Veda app.
Q120. What is the purpose of `<input type="number">`?
BeginnerAnswers and explanations are in the Veda app.
Q121. What does the `<form>` element look like on a webpage without CSS styling?
BeginnerAnswers and explanations are in the Veda app.
Q122. List two real-world examples of forms on websites.
BeginnerAnswers and explanations are in the Veda app.
Q123. What attribute must be added to an input field for its value to be sent to the server?
BeginnerAnswers and explanations are in the Veda app.
Building up · 57 questions
Q124. Why is the `<title>` tag important for SEO?
IntermediateAnswers and explanations are in the Veda app.
Q125. Where should CSS stylesheets be linked in an HTML document and why?
IntermediateAnswers and explanations are in the Veda app.
Q126. Why are `<script>` tags often placed at the end of the `<body>`?
IntermediateAnswers and explanations are in the Veda app.
Q127. What is quirks mode and what causes it?
IntermediateAnswers and explanations are in the Veda app.
Q128. What does the `lang` attribute on the `<html>` tag do?
IntermediateAnswers and explanations are in the Veda app.
Q129. What happens if you place `<title>` or `<link>` tags inside the `<body>`?
IntermediateAnswers and explanations are in the Veda app.
Q130. In what order does a browser process an HTML document?
IntermediateAnswers and explanations are in the Veda app.
Q131. A developer writes the following HTML snippet: ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>My Page</title> </head> <body> <h1>Welcome</h1> <p>This is a paragraph.</p> </body> </html> ``` If the developer removes the `<!DOCTYPE html>` declaration, what is the most likely consequence?
IntermediateAnswers and explanations are in the Veda app.
Q132. Consider the following HTML document structure: ```html <!DOCTYPE html> <html> <body> <head> <title>Test</title> </head> <p>Content</p> </body> </html> ``` What is the primary structural error in this document?
IntermediateAnswers and explanations are in the Veda app.
Q133. A developer wants to improve the performance of a webpage that includes a large JavaScript file. Where should the `<script>` tag be placed, and why?
IntermediateAnswers and explanations are in the Veda app.
Q134. Which of the following statements best explains the relationship between the `<head>` and `<body>` elements in a valid HTML5 document?
IntermediateAnswers and explanations are in the Veda app.
Q135. A developer notices that their webpage displays a flash of unstyled content (FOUC) when loading. Which of the following is the most likely cause related to document structure?
IntermediateAnswers and explanations are in the Veda app.
Q138. Why is semantic HTML important for accessibility?
IntermediateAnswers and explanations are in the Veda app.
Q139. What happens if you forget a closing tag in HTML?
IntermediateAnswers and explanations are in the Veda app.
Q140. What is the tree structure of HTML elements?
IntermediateAnswers and explanations are in the Veda app.
Q141. Consider the following HTML snippet: ```html <article> <h2>Title</h2> <p>Content <strong>important</strong> text.</p> </article> ``` Which statement best explains the relationship between the `<strong>` element and the `<p>` element?
IntermediateAnswers and explanations are in the Veda app.
Q142. Which of the following best explains why using `<nav>` for a navigation menu is preferred over using a generic `<div>` with a class like `class="nav"`?
IntermediateAnswers and explanations are in the Veda app.
Q143. An HTML document contains the following code: ```html <p>First paragraph <p>Second paragraph</p> ``` What is the most likely outcome when a browser renders this code?
IntermediateAnswers and explanations are in the Veda app.
Q144. Given the following HTML: ```html <ul> <li>Apples</li> <li>Bananas</li> </ul> ``` If a developer wants to add a third item 'Cherries' after 'Bananas', which of the following correctly demonstrates the proper nesting and tag usage?
IntermediateAnswers and explanations are in the Veda app.
Q145. Which of the following statements correctly compares the `<b>` tag and the `<strong>` tag in modern HTML?
IntermediateAnswers and explanations are in the Veda app.
Q146. What is the Document Object Model (DOM)?
IntermediateAnswers and explanations are in the Veda app.
Q148. Why should you avoid using `<font>` or `<center>` tags in modern HTML?
IntermediateAnswers and explanations are in the Veda app.
Q149. How does HTML help with web accessibility?
IntermediateAnswers and explanations are in the Veda app.
Q150. What is the difference between HTML and CSS?
IntermediateAnswers and explanations are in the Veda app.
Q151. Name three places where HTML is used besides web pages.
IntermediateAnswers and explanations are in the Veda app.
Q152. Given the following HTML snippet: ```html <ul> <li>Item A</li> <li>Item B</li> </ul> ``` Which statement best describes the relationship between the `<ul>` and `<li>` elements?
IntermediateAnswers and explanations are in the Veda app.
Q153. Why is HTML considered a **markup language** rather than a **programming language**?
IntermediateAnswers and explanations are in the Veda app.
Q154. A developer writes the following HTML: ```html <img src="logo.png" alt="Company Logo"> ``` Which of the following best explains the role of the `alt` attribute in terms of accessibility and SEO?
IntermediateAnswers and explanations are in the Veda app.
Q155. Compare the following two approaches for creating a heading on a web page: - Approach A: `<h1>Welcome</h1>` - Approach B: `<div style="font-size: 32px; font-weight: bold;">Welcome</div>` Which statement correctly explains the advantage of Approach A?
IntermediateAnswers and explanations are in the Veda app.
Q156. Which of the following best explains why modern best practice separates HTML structure from CSS presentation, as opposed to using tags like `<font>` and `<center>`?
IntermediateAnswers and explanations are in the Veda app.
Q157. Why is it important not to skip heading levels?
IntermediateAnswers and explanations are in the Veda app.
Q158. How do screen readers use heading tags?
IntermediateAnswers and explanations are in the Veda app.
Q159. What is the impact of headings on SEO?
IntermediateAnswers and explanations are in the Veda app.
Q160. Can headings be used just to make text larger? Why or why not?
IntermediateAnswers and explanations are in the Veda app.
Q161. Is it acceptable to nest a heading inside a `<p>` tag? Explain.
IntermediateAnswers and explanations are in the Veda app.
Q162. What happens if you use headings solely for visual appearance?
IntermediateAnswers and explanations are in the Veda app.
Q163. How do headings and paragraphs work together to form a web page structure?
IntermediateAnswers and explanations are in the Veda app.
Q164. A developer creates a webpage with the following structure: ```html <h1>My Blog</h1> <h2>About Me</h2> <p>I am a web developer.</p> <h3>My Skills</h3> <p>HTML, CSS, JavaScript.</p> <h2>Contact</h2> <p>Email me at example@example.com.</p> ``` Which of the following best describes the relationship between the `<h3>` tag and the `<h2>` tags in this structure?
IntermediateAnswers and explanations are in the Veda app.
Q165. Consider the following HTML snippet: ```html <p>Welcome to our site.</p> <h2>Services</h2> <p>We offer web design.</p> <h3>Web Design</h3> <p>We create responsive layouts.</p> ``` What is the main structural issue with this snippet?
IntermediateAnswers and explanations are in the Veda app.
Q166. A student writes the following code: ```html <h2>Section Title</h2> <p>Some text here.</p> <h4>Subsection</h4> <p>More text.</p> ``` Why is this considered poor practice?
IntermediateAnswers and explanations are in the Veda app.
Q167. Which of the following statements best explains how headings and paragraphs contribute to accessibility?
IntermediateAnswers and explanations are in the Veda app.
Q168. A developer wants to make a subheading appear smaller than the main heading but still maintain proper document structure. Which approach is correct?
IntermediateAnswers and explanations are in the Veda app.
Q169. How does `<input type="email">` improve the user experience on mobile devices?
IntermediateAnswers and explanations are in the Veda app.
Q170. What is the difference between `<input type="submit">` and `<input type="button">`?
IntermediateAnswers and explanations are in the Veda app.
Q171. What happens if you forget to include a submit button in a form?
IntermediateAnswers and explanations are in the Veda app.
Q172. Can a form be submitted without a `name` attribute on its inputs? Explain.
IntermediateAnswers and explanations are in the Veda app.
Q173. How do checkboxes and radio buttons differ in terms of user selection?
IntermediateAnswers and explanations are in the Veda app.
Q174. What is a common mistake beginners make when creating a submit button?
IntermediateAnswers and explanations are in the Veda app.
Q175. Why might a developer use `<input type="email">` instead of `<input type="text">` for an email field?
IntermediateAnswers and explanations are in the Veda app.
Q176. A developer creates a form with `<input type="text" name="city">` and `<input type="submit">`, but when the form is submitted, the server receives no data. Which of the following is the most likely cause?
IntermediateAnswers and explanations are in the Veda app.
Q177. Consider the following HTML snippet: ```html <form> <input type="radio" name="color" value="red"> Red <input type="radio" name="color" value="blue"> Blue <input type="radio" name="color" value="green"> Green <input type="submit"> </form> ``` If a user selects "Blue" and submits the form, what will be sent to the server?
IntermediateAnswers and explanations are in the Veda app.
Q178. A developer uses `<input type="button" value="Click">` inside a form expecting it to submit the form. What will happen when the button is clicked?
IntermediateAnswers and explanations are in the Veda app.
Q179. Which of the following best explains why `<input type="email">` improves user experience on mobile devices compared to `<input type="text">`?
IntermediateAnswers and explanations are in the Veda app.
Q180. A student writes the following code: ```html <form> <input type="checkbox" name="subscribe" value="yes"> Subscribe to newsletter <input type="submit"> </form> ``` When the form is submitted with the checkbox unchecked, what data is sent to the server?
IntermediateAnswers and explanations are in the Veda app.
Topper level · 20 questions
Q181. A developer writes the following HTML document: ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>My Page</title> <script src="large.js"></script> </head> <body> <h1>Welcome</h1> <p>Content</p> </body> </html> ``` The developer wants to improve perceived performance. Which of the following changes to the document structure would MOST effectively reduce the time users wait before seeing visible content, assuming `large.js` is a blocking script?
AdvancedAnswers and explanations are in the Veda app.
Q182. Consider the following HTML document: ```html <!DOCTYPE html> <html> <head> <title>Test</title> <style> body { background: red; } </style> </head> <body> <p>Hello</p> <script> document.title = "New Title"; </script> </body> </html> ``` A validator reports that the document is malformed. Which of the following is the MOST accurate description of the structural error?
AdvancedAnswers and explanations are in the Veda app.
Q183. A developer encounters a webpage that renders differently in Internet Explorer 11 compared to Chrome. The developer inspects the source and finds the first line is: ```html <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> ``` The developer wants the page to render consistently in modern browsers using HTML5 standards. Which of the following is the CORRECT change to the document structure?
AdvancedAnswers and explanations are in the Veda app.
Q184. A developer writes the following HTML: ```html <!DOCTYPE html> <html lang="en"> <body> <h1>Title</h1> <head> <title>Page Title</title> <link rel="stylesheet" href="style.css"> </head> <p>Content</p> </body> </html> ``` The page loads, but the CSS does not apply and the browser tab shows an empty title. Which of the following BEST explains the behavior?
AdvancedAnswers and explanations are in the Veda app.
Q185. A developer is building a multilingual website. The page for English users starts with: ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Welcome</title> </head> <body> <p>Hello</p> </body> </html> ``` The developer wants to create a Spanish version of the same page. Which of the following changes to the document structure is BOTH necessary and sufficient to ensure the page is correctly interpreted as Spanish by browsers and assistive technologies?
AdvancedAnswers and explanations are in the Veda app.
Q186. Consider the following HTML snippet: ```html <article> <h2>Title</h2> <p>Content <strong>important</strong> text.</p> </article> ``` If a developer wants to ensure that the `<strong>` element is semantically correct for conveying strong importance, which of the following best describes the relationship between `<strong>` and `<p>` in this snippet?
AdvancedAnswers and explanations are in the Veda app.
Q187. An HTML document contains the following code: ```html <p>First paragraph <p>Second paragraph</p> ``` What is the most likely outcome when a browser renders this code, and why?
AdvancedAnswers and explanations are in the Veda app.
Q188. Which of the following statements correctly compares the `<b>` tag and the `<strong>` tag in modern HTML, considering both semantics and rendering?
AdvancedAnswers and explanations are in the Veda app.
Q189. A developer writes the following HTML: ```html <nav> <a href="/home">Home</a> <a href="/about">About</a> </nav> ``` Which of the following best explains why using `<nav>` for a navigation menu is preferred over using a generic `<div>` with a class like `class="nav"`?
AdvancedAnswers and explanations are in the Veda app.
Q190. Given the following HTML snippet: ```html <html> <head> <title>My Page</title> </head> <body> <article> <h1>Welcome</h1> <p>This is a paragraph.</p> <img src="photo.jpg" alt="Photo"> </article> </body> </html> ``` Which of the following best describes the relationship between the `<article>` element and the `<img>` element in terms of the Document Object Model (DOM)?
AdvancedAnswers and explanations are in the Veda app.
Q191. A developer writes the following HTML for a navigation menu: ```html <nav> <ul> <li><a href="/home">Home</a></li> <li><a href="/about">About</a></li> </ul> </nav> ``` Which statement best evaluates the impact of using the `<nav>` element versus a generic `<div>` with the same content, considering accessibility and SEO?
AdvancedAnswers and explanations are in the Veda app.
Q192. Consider the following two approaches to create a red, bold heading: **Approach A:** ```html <h1 style="color: red; font-weight: bold;">Important Heading</h1> ``` **Approach B:** ```html <div style="font-size: 32px; color: red; font-weight: bold;">Important Heading</div> ``` Which statement correctly analyzes the advantages of Approach A over Approach B in terms of modern best practices?
AdvancedAnswers and explanations are in the Veda app.
Q193. An HTML document contains the following code: ```html <p>This is a <span>highlighted</span> word.</p> ``` A developer argues that the `<span>` element is a block-level element because it is nested inside a `<p>`. Evaluate this claim based on the standard behavior of HTML elements.
AdvancedAnswers and explanations are in the Veda app.
Q194. A developer creates an HTML email newsletter with the following structure: ```html <html> <body> <h1>Monthly Update</h1> <p>Welcome to our newsletter.</p> <img src="banner.png" alt="Banner image"> <p>Read more <a href="https://example.com">here</a>.</p> </body> </html> ``` Which of the following best evaluates the potential issues with this HTML when rendered in an email client that does not support external stylesheets?
AdvancedAnswers and explanations are in the Veda app.
Q195. A developer is creating a documentation page with the following structure: ```html <h1>API Reference</h1> <h2>Authentication</h2> <p>Details about API keys.</p> <h3>Rate Limits</h3> <p>Maximum 100 requests per hour.</p> <h2>Endpoints</h2> <h4>GET /users</h4> <p>Returns a list of users.</p> ``` Which of the following best describes the structural problem in this snippet?
AdvancedAnswers and explanations are in the Veda app.
Q196. Consider the following HTML snippet: ```html <h1>My Portfolio</h1> <h2>Projects</h2> <p>Here are some of my projects.</p> <h3>Project A</h3> <p>Description of Project A.</p> <h3>Project B</h3> <p>Description of Project B.</p> <h2>Skills</h2> <p>I know HTML, CSS, and JavaScript.</p> ``` A developer wants to add a sub-subsection under "Project A" called "Technologies Used" that is less important than the project name but more important than a paragraph. Which of the following is the correct way to maintain proper heading hierarchy?
AdvancedAnswers and explanations are in the Veda app.
Q197. A web page has the following structure: ```html <h1>Online Store</h1> <h2>Electronics</h2> <p>Browse our electronics.</p> <h3>Laptops</h3> <p>High-performance laptops.</p> <h3>Phones</h3> <p>Latest smartphones.</p> <h2>Clothing</h2> <p>Fashion for everyone.</p> <h3>Men's Wear</h3> <p>Shirts and pants.</p> <h4>Formal Shirts</h4> <p>For office wear.</p> <h4>Casual Shirts</h4> <p>For everyday use.</p> ``` A developer wants to add a new section "Accessories" under "Electronics" that is at the same level as "Laptops" and "Phones". Which of the following is the correct HTML to insert?
AdvancedAnswers and explanations are in the Veda app.
Q198. A developer writes the following code for a blog post: ```html <h1>10 Tips for Healthy Living</h1> <p>Introduction paragraph.</p> <h2>Tip 1: Exercise Regularly</h2> <p>Details about exercise.</p> <h2>Tip 2: Eat Balanced Meals</h2> <p>Details about diet.</p> <h3>Breakfast Ideas</h3> <p>Oatmeal, eggs, etc.</p> <h2>Tip 3: Stay Hydrated</h2> <p>Drink water.</p> ``` Which of the following statements best evaluates the structural correctness of this snippet?
AdvancedAnswers and explanations are in the Veda app.
Q199. A student submits the following HTML for a school project: ```html <h1>My Favorite Books</h1> <h2>Fiction</h2> <p>I enjoy fiction books.</p> <h4>Science Fiction</h4> <p>Books about future technology.</p> <h4>Fantasy</h4> <p>Books with magic and mythical creatures.</p> <h2>Non-Fiction</h2> <p>I also read non-fiction.</p> <h3>History</h3> <p>Books about past events.</p> ``` Which of the following best analyzes the issues in this code?
AdvancedAnswers and explanations are in the Veda app.
Q200. Consider the following HTML snippet: ```html <form action="/submit" method="post"> <input type="text" name="username"> <input type="text" name="email"> <input type="button" value="Go"> </form> ``` A developer expects that clicking the "Go" button will send the form data to the server. However, nothing happens. Which minimal change would make the form submit correctly?
AdvancedAnswers and explanations are in the Veda app.
Your notes can be a kit like these
Every kit here was made from real study material. Point Veda at a chapter, a PDF, a photo or a link and get notes, flashcards, practice MCQs, games and a scored test — free to start, in more than 40 languages.
- Chapter notes
- Flashcards
- Practice MCQs
- Scored tests
- Paper Solver
Get Veda free See what students get
Free to start · Android app and web · More than 40 languages