Chrome, Edge, Firefox, and Safari are all examples of what type of program?
A web browser
Why:
A web browser.
Which HTML section normally contains the content visitors can see on the webpage?
<body>
Why:
Headings, paragraphs, images, links, lists, forms, and buttons normally belong inside <body>.
Which attribute tells the browser where an image file is located?
src
Why:
src means source. It gives the browser the image’s file name, path, or URL.
Example:
<img src="dog.jpg">
What is the main job of CSS?
CSS controls the appearance and layout of a webpage.
Why:
HTML creates the structure and content. CSS changes how that content looks and is arranged.
Which CSS declaration turns an element into a Flexbox container?
display: flex;
What word means the rules for writing code correctly?
Syntax
Why: Every coding language has syntax rules. HTML uses angle brackets around tags, CSS uses colons between properties and values, and Python uses indentation to organize blocks of code.
What text will appear on the browser tab?
<head> <title>Gaming Club</title> </head>
<body> <h1>Welcome!</h1> </body>
Gaming Club
Why:
The <title> element controls the browser-tab text. The <h1> displays “Welcome!” inside the webpage.
Explain the job of each attribute:
<img src="dog.jpg" alt="A brown dog running" width="250 height="200">
What does each declaration change?
.card { color: blue; background-color: white; padding: 15px; border-radius: 10px; }
Where should display: flex be placed if the goal is to arrange the two cards beside each other?
<div class="cards"> <div class="card">Games</div> <div class="card">Art</div> </div>
It should be placed on .cards, the parent container.
Why:
Flexbox controls how a parent arranges its children. The two .card elements are the children.
In this code, what is src="cat.jpg"?
<img src="cat.jpg" alt="A sleeping cat">
An HTML attribute.
Why:
An attribute provides additional information about an HTML element.
In this example:
Which section contains information about the document that does not normally appear as regular page content?
<head>
Why: The <head> can contain:
The visible page content belongs inside <body>.
What happens when the user clicks this link?
<a href="https://www.nasa.gov" target="_blank"> Visit NASA </a>
The NASA website opens in a new browser tab.
Why:
Explain how these two pieces of code connect:
<p class="message">Hello!</p>
.message { color: blue; }
The HTML paragraph has class="message". The CSS uses .message to select every element with that class. The paragraph’s text becomes blue.
What is the difference between these values?
flex-direction: row;
flex-direction: column;
Identify the selector, property, and value in this CSS rule:
.title { color: purple; }
Why: The selector chooses what will be styled. The property identifies what will change. The value tells the browser how it should change.
In this code, which element is the parent, and which elements are its children?
<div class="menu"> <button>Play</button> <button>Settings</button> </div>
Why: A parent contains other elements. An element placed directly inside that parent is one of its children.
Explain the difference between type, placeholder, and value in this code:
<input type="text" placeholder="Enter your name">
<input type="button" value="Submit">
Why will this paragraph not become purple?
<p class="important-message"> Read this! </p>
.important { color: purple; }
The names do not match. The HTML uses important-message, while the CSS uses important.
The menu items currently stack from top to bottom. The goal is to place them beside each other with space between them. What CSS declarations should be changed?
.menu { display: flex; flex-direction: column; }
flex-direction: column stacks the items vertically. Changing it to row arranges them beside each other.
What is an identifier, and which of these is the better identifier?
.box1
or
.signup-form
An identifier is a name used to identify something in code. .signup-form is the better name because it explains the element’s purpose.
Describe what the browser will display from this code:
<!DOCTYPE html> <html> <head> <title>Pet Club</title> </head>
<body> <h1>Welcome to Pet Club</h1> <ul> <li>Cats</li> <li>Dogs</li> </ul> </body> </html>
The browser tab will say “Pet Club.” The webpage will show the heading “Welcome to Pet Club” followed by a bulleted list containing Cats and Dogs.
Why:
Find and correct every problem in this code:
<label for="student-email">Email:</label>
<input id="email" type="text" value="Enter your email">
hint: 3 errors
<label for="student-email">Email:</label>
<input id="student-email" type="email" placeholder="Enter your email">
Why:
Find and correct all three problems:
<h1 class="page-title">Art Club</h1>
page-title { color = purple }
.page-title { color: purple; }
Why:
How will the three buttons be arranged?
<div class="menu"> <button>Home</button> <button>Games</button> <button>Contact</button> </div>
.menu { display: flex; flex-direction: column; align-items: center; }
The buttons will stack from top to bottom and align in the center.
Why: flex-direction: column stacks the buttons vertically. align-items: center centers them across the other direction.