HTML Basics: 18 flashcards
All 18 flashcards from this kit, free and with no sign-up.
1. What does HTML stand for?
Show the answer
HyperText Markup Language
2. What is the purpose of the <!DOCTYPE html> declaration?
Show the answer
It tells the browser that the document is an HTML5 document.
3. Name the two main sections of an HTML document.
Show the answer
The <head> and the <body>.
4. What is the difference between the <head> and <body> elements?
Show the answer
The <head> contains metadata (like title, links to CSS) not displayed on the page; the <body> contains all visible content.
5. What is an HTML tag?
Show the answer
A tag is a keyword surrounded by angle brackets, like <p>, that defines an element in an HTML document.
6. What is the difference between an opening tag and a closing tag?
Show the answer
An opening tag is like <p>; a closing tag has a forward slash, like </p>.
7. What is an HTML element?
Show the answer
An element consists of an opening tag, content, and a closing tag (e.g., <p>Hello</p>).
8. What is an attribute in HTML?
Show the answer
An attribute provides additional information about an element, written inside the opening tag (e.g., href in <a href="...">).
9. What is the purpose of the <title> element?
Show the answer
It sets the title of the web page, shown in the browser tab and used by search engines.
10. What is semantic HTML?
Show the answer
Semantic HTML uses elements that clearly describe their meaning to both the browser and the developer (e.g., <header>, <nav>, <article>).
11. Give three examples of semantic HTML elements.
Show the answer
<header>, <nav>, <main>, <section>, <article>, <footer> (any three).
12. What is the purpose of the <nav> element?
Show the answer
It defines a set of navigation links.
13. What is the purpose of the <article> element?
Show the answer
It represents a self-contained composition, like a blog post or news story.
14. What is the purpose of the <section> element?
Show the answer
It defines a thematic grouping of content, typically with a heading.
15. What is the purpose of the <footer> element?
Show the answer
It defines a footer for a document or section, typically containing author info, copyright, or related links.
16. What is the difference between a block-level element and an inline element?
Show the answer
A block-level element starts on a new line and takes full width (e.g., <p>, <div>); an inline element flows within text and only takes needed width (e.g., <span>, <a>).
17. What is the purpose of the <div> element?
Show the answer
It is a generic container for flow content, used for styling or scripting purposes.
18. What is the purpose of the <span> element?
Show the answer
It is a generic inline container for phrasing content, used for styling or scripting.
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, in 42 languages.
- Chapter notes
- Flashcards
- Practice MCQs
- Scored tests
- Exam prep
Get Veda free See what students get
Free to start · No ads · Works in 42 languages