Full Name:
What's wrong with this CSS Grid code?
.grid-container { display: grid; grid-template-areas: "header header" "sidebar main" "sidebar footer"; grid-template-columns: 200px 1fr; grid-template-rows: auto 1fr auto; } .header { grid-area: header; } .sidebar { grid-area: sidebar; } .main { grid-area: main; } .footer { grid-area: footer; }
What accessibility issue exists in this HTML form?
<form> <div>Name: <input type="text" id="name"></div> <div>Email: <input type="email" id="email"></div> <div> <input type="checkbox" id="newsletter"> Subscribe to newsletter </div> <button type="submit">Submit</button> </form>
What's incorrect about this CSS animation?
.animated-box { width: 100px; height: 100px; background-color: red; animation: slide-in 2s ease-in infinite; } @keyframes slide-in { from { transform: translateX(-100%); } to { transform: translateX(0); } }
What semantic HTML issue exists in this code?
<div class="article"> <div class="title">Breaking News</div> <div class="author">By John Smith</div> <div class="date">March 15, 2024</div> <div class="content"> This is the article content... </div> </div>
What's problematic with this flexbox alignment?
.flex-container { display: flex; justify-content: center; align-items: center; align-content: space-between; height: 300px; }
What CSS specificity issue might occur with these selectors?
/* CSS File */ .navigation ul li a { color: blue; } nav a { color: red; } a:hover { color: green; } #main-nav a { color: purple; }
How would this grid layout appear?
<div class="grid"> <div class="item-a">A</div> <div class="item-b">B</div> <div class="item-c">C</div> </div>
.grid { display: grid; grid-template-areas: "header header" "sidebar content"; grid-template-columns: 100px 1fr; grid-template-rows: 50px 200px; } .item-a { grid-area: header; background: red; } .item-b { grid-area: sidebar; background: blue; } .item-c { grid-area: content; background: green; }
What would this CSS produce when hovering over the link?
<a href="#" class="button">Click me</a>
.button { display: inline-block; padding: 10px 20px; background-color: blue; color: white; text-decoration: none; transition: all 0.3s ease; } .button:hover { background-color: red; transform: scale(1.1); } .button:active { transform: scale(0.95); }
What would be the stacking order of these elements?
<div class="container"> <div class="box-a">A</div> <div class="box-b">B</div> <div class="box-c">C</div> </div>
.container { position: relative; } .box-a { position: absolute; z-index: 5; background: red; } .box-b { position: relative; z-index: 10; background: blue; } .box-c { position: absolute; z-index: 1; background: green; }
How would these flex items behave in a 600px container?
<div class="flex-container"> <div class="item-1">Item 1</div> <div class="item-2">Item 2</div> <div class="item-3">Item 3</div> </div>
.flex-container { display: flex; width: 600px; } .item-1 { flex: 1 0 100px; background: red; } .item-2 { flex: 2 0 100px; background: blue; } .item-3 { flex: 1 0 200px; background: green; }
What would this float layout create?
<div class="container"> <div class="sidebar">Sidebar</div> <div class="content">Main content goes here...</div> <div class="footer">Footer</div> </div>
.container { width: 800px; } .sidebar { float: left; width: 200px; height: 300px; background: gray; } .content { margin-left: 220px; background: lightblue; } .footer { clear: both; background: yellow; }
What would this pseudo-element CSS create?
<p class="quote">This is an important quote.</p>
.quote { position: relative; padding: 20px; background: lightgray; } .quote::before { content: """; font-size: 4em; position: absolute; top: -10px; left: 10px; color: red; } .quote::after { content: """; font-size: 4em; position: absolute; bottom: -30px; right: 10px; color: red; }
What would happen with this overflow setup?
<div class="container"> <div class="box"> This is a very long text that will definitely exceed the width of its container and should demonstrate overflow behavior. </div> </div>
.container { width: 200px; height: 100px; border: 2px solid black; } .box { width: 300px; height: 150px; background: lightblue; overflow: hidden; }
What color will the paragraph text be?
<div class="parent"> <div class="child"> <p class="text">What color am I?</p> </div> </div>
.parent { color: red; } .child { color: blue; } p { color: green; } .text { /* No color specified */ }
Your score: 0/14