H151 - Review Week 1

  1. Many tags do not have to be closed such as the <p> tag and the <li> tag.  Why is it important to have an opening and a closing tag when using STYLES?

    The closing tag tells the browser that the style definition is complete. Without this, the browser will not display any of the page content.

  2. What is an inline style? Please provide an example.

    Style defined within the context of the document.
    <span style="color:#ff0000;background-color:transparent;font-weight:bold;">This text is red and bold</span>

  3. What is a document level style? Please provide an example.

    Style defined in the head of the document.
    <style type="text/css">
     body {color:#000000;background-color:#ffffff;}
     td {font-size:13px;color:black;cursor:default;}
     a {color:#970617;text-decoration:none;}
    </style>

  4. What is a linked style? Please provide an example.

    Style defined in an external document that is linked from the head of the document.
    <link rel="stylesheet" type="text/css" href="class.css" name="Default">

  5. In the CSS code h1 { font-family: helvetica, arial, sans-serif; }, which font value is given first priority?
    1. helvetica
    2. arial
    3. sans-serif
    4. all have equal priority

    a.

  6. What does the cascade refer to in Cascading Style Sheets?

    Cascade refers to the order of priority that rules are given. In order: Linked (least), document, inline, reader (most).

  7. All class names begin with
    1. a comma (,).
    2. a pound sign (#).
    3. a period (.).
    4. a quotation mark (").

    c.

  8. Convert the following statement using CSS.
    <font color="#008000" face="Arial">This text is green and in Arial font</font>

    <span style="color:#008000;background-color:transparent;font-family:Arial,sans-serif;">This text is green and in Arial font</span>

Jennifer Griner