Q1easyWhat will be the result of the following CSS selector: ul li:first- child? ASelects the first ul element.BSelects all list items in the document.CSelects the last list item.DSelects the first li element inside any ul.Check AnswerReveal Answer & ExplanationDiscuss on Board
Q2easyGiven the CSS below, what will be the total width of the div element in the browser?A100pxB150pxC130pxD120pxCheck AnswerReveal Answer & ExplanationDiscuss on Board
Q3easyWhat does z-index: 100; do?ASets the width of the element.BSets the stack order of a positioned element; higher numbers appear in front of lower numbers.CAdds a blur effect.DIncreases the font size to 100px.Check AnswerReveal Answer & ExplanationDiscuss on Board
Q4easyWhich CSS property is used to change the text color of an element?Atext-color:Bfont-color:Cbackground-color:Dcolor:Check AnswerReveal Answer & ExplanationDiscuss on Board
Q5easyWhat happens to the layout when using box-sizing: border-box;?AIt prevents the border from showing.BThe padding and border are included within the width/height of the element.CIt adds a margin to all sides.DIt makes the element smaller than defined.Check AnswerReveal Answer & ExplanationDiscuss on Board
Q6easyWhat does the position: absolute; property do?AMoves the element based on the user's scroll position.BPositions the element relative to its nearest "positioned" ancestor (not static).CFixes the element to the top of the browser window.DCenters the element on the page automatically.Check AnswerReveal Answer & ExplanationDiscuss on Board
Q7mediumYou want an element to be removed from the document layout entirely, as if it doesn't exist, while still being present in the HTML. Which property achieves this?Avisibility: hidden;Bmargin: auto;Copacity: 0;Ddisplay: none;Check AnswerReveal Answer & ExplanationDiscuss on Board
Q8easyWhat is a CSS Pseudo-element like ::before used for?ATo insert content dynamically before the selected element without touching the HTML.BTo make the element blink.CTo change the color of an element when hovered.DTo create a new button.Check AnswerReveal Answer & ExplanationDiscuss on Board
Q9easyWhat is the difference between display: inline; and display: inline-block;? Ainline supports height/width; inline-block does not.BThere is no difference.Cinline-block allows setting width/height and margins, while inline respects only horizontal margins/padding.Dinline is for lists; inline-block is for images.Check AnswerReveal Answer & ExplanationDiscuss on Board
Q10easyWhich CSS selector has the highest specificity and will override others?A.menu-item { color: blue; }Bdiv { color: black; }Cdiv.header #nav-link { color: green; }D#submit-btn { color: red; }Check AnswerReveal Answer & ExplanationDiscuss on Board