This homework is due on Wednesday, 21 September at 6:30 PM. |--------------------------------------------------------------------- | | INSTRUCTIONS | |--------------------------------------------------------------------- Rename this file, preceding the title with your last name followed by a dash. In my case, for example, this file, css_1_hw_1.txt, would be renamed to vanegas-css_1_hw_2.txt. Note: ONLY HOMEWORK SUBMITTED IN THIS FORMAT WILL BE ACCEPTED. Edit this file as a text-only file; do not use Word or a word processing program that will promote this document to a rich text file or other stylized file. Submit only this file as an ASCII text file for your homework. Attach this file to an email you'll send to rvanegas@hunter.cuny.edu by Wednesday, 21 September at 6:30 PM. ---------------------------------------------------------------------- 1. How many different ways can you include CSS in an HTML document? List and describe each one. ====================================================================== ANSWER ====================================================================== 2. Consider the following, then fill in the blanks. h1 { color: #faf; background-color: #aaa; } h1 is a ___. The left and right curly braces define a ___. color is a ___. #faf is a ___. Both color and #faf are known collectively as a ___. The statement terminator for the last ___ is ___. A rule is also referred to as a ___. All the rules are known collectively as a ___. 3. Describe how an inline tag is placed on a Web page. ====================================================================== ANSWER ====================================================================== 4. Similarly, describe how a block level tag is placed on a Web page. ====================================================================== ANSWER ====================================================================== 5. Explain the difference between an absolute path and a relative path. ====================================================================== ANSWER ====================================================================== 6. The following line of code appears at the top of a document called style.css, which is imported into a document called index.html. Both index.html and style.css reside in the same folder. Is the following path absolute or relative? If you answer relative, then to what is it relative? That is, is it relative to the file that imports it, or is it relative to the file that contains it. Explain your answer. @import url( "stylesheets/headings.css" ); ====================================================================== ANSWER ====================================================================== 7. Is the following ruleset valid? Explain your answer. body { color: red background-color: green } ====================================================================== ANSWER ====================================================================== 8. Explain the reasoning behind using a base/default stylesheet, such as the one found at http://www.w3.org/TR/CSS2/sample.html. ====================================================================== ANSWER ====================================================================== 9. Can more than one item exist at the same node of the DOM tree? Explain. ====================================================================== ANSWER ====================================================================== 10. Although I haven't explained this in class, discuss the phases through which a language governed by the W3 traverses on its way to becoming a "recommendation." ====================================================================== ANSWER ======================================================================