HTML document structure, headings, links, lists, tables, media, semantic elements and metadata.
40 cards · basic cards · AI-written, checked twice. Edit anything.
- What element wraps the entire HTML document?
Show answer
<html>
- What element contains metadata and other invisible content?
Show answer
<head>
- What element contains all visible page content?
Show answer
<body>
- What does the DOCTYPE declaration specify?
Show answer
The version of HTML used in the document
- What attribute sets the character encoding in an HTML5 document?
Show answer
charset (typically <meta charset='utf-8'>)
- What is the purpose of the <title> element?
Show answer
To set the text shown in the browser tab and search engine results
- What is the semantic difference between h1 and h2?
Show answer
h1 is the top-level heading; h2 is a subheading below it
- How many h1 elements should typically appear on a single page?
Show answer
One, representing the main topic of the page
- What makes a proper heading hierarchy?
Show answer
h1 is the main heading, followed by h2, h3, etc., without skipping levels
- Why should headings be chosen by semantic level rather than visual appearance?
Show answer
For accessibility to screen readers and to preserve document structure
- What does the <a> element stand for?
Show answer
Anchor; it creates a hyperlink
- What attribute specifies the destination URL of a link?
Show answer
href
- What does target='_blank' do?
Show answer
Opens the linked page in a new browser tab or window
- What is the difference between /page and ./page in an href attribute?
Show answer
/page is an absolute path from the root; ./page is relative to the current directory
- What is a fragment identifier in a URL?
Show answer
A hash (#) followed by an element id, used to jump to a specific part of a page