The workshop contains quiz questions and activities to help you solidify your understanding of the material covered. Try to answer all questions before looking at the "Answers" section that follows.
Quiz
1:
What's the difference between relative and absolute positioning?
2:
Which CSS style property do you use to control the manner in which elements overlap each other?
3:
Write the HTML code to display the words What would you like to, starting exactly at the upper-left corner of the browser window, and THROW TODAY? in large type exactly 80 pixels down and 20 pixels to the left of the corner.
Answers
A1:
In relative positioning, content is displayed according to the flow of a page, with each element physically appearing after the element preceding it in the HTML code. Absolute positioning, on the other hand, allows you to set the exact position of content on a page.
A2:
The z-index style property is used to control the manner in which elements overlap each other.
A3:
<span style="position:absolute; left:0px; top:0px"> What would you like to</span> <h1 style="position:absolute; left:80px; top:20px"> THROW TODAY?</H1>