Quiz Answer Key and Fun Facts
1. Before a Cascading Style Sheet is useful, you need to include one into your HTML page. What HTML tag can you use to apply CSS rules to a document?
2. The HTML 'link' tag allows you to include an external style sheet into your document, as if it had been defined there in a 'style' tag. What is the equivalent rule in CSS?
3. Now to start defining some CSS rules! How do I set the colour of all text on the page to red? (Due to technical restrictions, the curly braces have been substituted for square brackets.)
4. Can you explain what the following property means?
border: 2px solid #FF0000
5. The CSS 'box model' describes a rectangular area around an element, used when laying out elements on the page. Which three properties affect the box model?
6. I've applied borders around all four edges to every cell in a table. (The table itself has no border.) However, the borders between cells are twice as thick as I wanted them to be. I want them to be the same width as the borders on the edges of the table. What should I add to the rule for the 'TD' element to accomplish this?
7. I have a document that contains a single image and several paragraphs of text below it. I want to place the image on the left of the page and have the text wrap around it on the right side. How do I do this?
8. I have a simple document containing a long paragraph of text (P) with an image (IMG) placed roughly in the middle of the text. There are no styles in the document yet. I want to place the image 8 pixels higher than its normal, unstyled position - what should I add to the image's 'style' attribute to achieve this?
9. I have a DIV element containing a lot of content (text, images etc.). I want to restrict the width and height of the DIV element, limiting the amount of content visible at any time, but still allow the user to view all of its contents.
10. Lots of websites have links that change colour when you move your cursor over them. This is implemented in CSS nowadays, though many newbies are unaware of this non-obvious solution. What selector represents an A tag that has the cursor over it?
Source: Author
Lutrine
This quiz was reviewed by FunTrivia editor
crisw before going online.
Any errors found in FunTrivia content are routinely corrected through our feedback system.