Website Flashcards
What are the three main sections of an HTML document?
Title, Head, Body.
What does the <p> tag do in HTML?
It defines a paragraph.
What is the purpose of the <a> tag in HTML?</a>
It creates a hyperlink.
What tag is used to create the largest heading in HTML?
<h1>
</h1>
What is the purpose of the <html> element?
The root element of an HTML page.
What does the <head> element contain?
Meta information about the page.
What is the function of the <title> element?</title>
It sets the page’s title in the browser tab.
What’s the <body> element?
It contains all visible content like text, images, and links.
What is a CSS selector?
It targets an HTML element to style.
How do you style a class in CSS?
Use a period (.) followed by the class name (e.g., .example {}).
How do you change the background color in CSS?
body { background-color: blue; }
Name three features of a good website.
Easy navigation, responsive design, and relevant images.
CSS selectors by name
h1 { color: blue; } (styles all <h1> elements)
CSS selectors by id
header { font-size: 24px; } (styles the element with id=”header”)
CSS selectors by class
.button { background-color: green; } (styles all elements with class=”button”)