0
0
HTMLmarkup~20 mins

How browsers read HTML - Practice Exercises

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
HTML Browser Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
How does a browser interpret HTML tags?
When a browser reads an HTML file, what does it do with the tags it finds?
AIt reads tags to build a tree structure representing the page elements.
BIt ignores all tags and only shows the text content.
CIt converts tags into plain text before displaying.
DIt sends tags to the server to process before showing anything.
Attempts:
2 left
💡 Hint
Think about how the browser knows where each element is placed on the page.
📝 Syntax
intermediate
2:00remaining
What error occurs with missing closing tags?
Consider this HTML snippet:
<div><p>Hello</div>

What problem will the browser face when reading this?
AThe browser will automatically close the &lt;p&gt; tag before &lt;/div&gt; and display 'Hello'.
BThe browser will show a blank page because of the error.
CThe browser will throw a syntax error and stop rendering.
DThe browser will ignore the &lt;div&gt; tag and only show the &lt;p&gt; content.
Attempts:
2 left
💡 Hint
Browsers try to fix small mistakes to still show the page.
rendering
advanced
2:00remaining
What is the visual output of nested HTML elements?
Given this HTML:
<section>
  <article>
    <h1>Title</h1>
    <p>Paragraph</p>
  </article>
</section>

How will the browser display this content?
AOnly the Title shows; the Paragraph is hidden inside the article.
BTitle appears bold and large above the Paragraph with spacing below it.
CTitle and Paragraph appear on the same line with no spacing.
DThe browser shows raw HTML tags as text on the page.
Attempts:
2 left
💡 Hint
Think about default styles browsers apply to headings and paragraphs.
selector
advanced
2:00remaining
Which CSS selector targets all direct children of a <nav> element?
You want to style only the immediate child elements inside a <nav> tag. Which CSS selector should you use?
Anav ~ *
Bnav *
Cnav + *
Dnav > *
Attempts:
2 left
💡 Hint
The '>' symbol in CSS means direct child.
accessibility
expert
2:00remaining
What is the effect of missing ARIA roles in a complex web page?
A web page has many sections and interactive elements but does not use ARIA roles. What problem will users with screen readers most likely face?
AScreen readers will read the page faster without ARIA roles.
BScreen readers will ignore all content without ARIA roles.
CScreen readers may not understand the page structure, making navigation confusing.
DScreen readers will automatically add ARIA roles to fix the page.
Attempts:
2 left
💡 Hint
ARIA roles help assistive technologies understand page parts.