Module 3 Practice Questions
Instructions: Solve these questions yourself to reinforce your learning.
-
Explain the difference between inline, internal, and external CSS. Give an example of each.
-
Create a simple webpage with a header, navigation bar, and paragraph. Use colors, fonts, and borders to style it.
-
Draw a diagram of the CSS Box Model and explain each part.
-
Write CSS to center a div horizontally and vertically on a page using Flexbox.
-
Create a grid layout with 3 columns and 2 rows. Add background colors to each item.
-
Write CSS using pseudo-classes to change the color of links when hovered and visited.
-
Use a pseudo-element to add quotation marks before a blockquote.
-
Write a transition that smoothly changes a button’s background color and size on hover.
-
Create a keyframe animation that moves a square from left to right and back.
-
Write CSS to make a website responsive: adjust text size and container width for screens below 768px.
-
Explain the difference between Flexbox and Grid. Give a practical example of when to use each.
-
What is the purpose of
box-sizing: border-box? How does it affect element sizing? -
How do
relative,absolute,fixed, andstickypositioning differ? Give examples of use cases. -
Create a webpage using Google Fonts and style headings and paragraphs with different fonts.
