Loretta Kasper
Week One Review Questions

  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?
    You need to have an opening and a closing tag when using STYLES so that the browser knows exactly when to apply the style sheet parameters and when not to apply them. While some HTML tagging, like P and LI is more flexible, style sheet tagging is very precise.

  2. What is an inline style? Please provide and example.
    Inline styles are used when you want only one section of a web page to look different. You add the style attribute to an HTML tag.
    For instance, the following HTML code, which would be placed in the BODY of the document, makes the first H4 text (the one with the style attribute) green, italic, and Arial, but not the second:
    (open the H4 tag) H4 style="font-family: Arial; font-style: italic; color: green">This is a green, italic, Arial H4 header. (close the H4 tag).
    (open the second H4 tag)This is an H4 header, but it's not green, italic, or Arial. (close the second H4 tag)

    The style is applied to the first H4 tag only and the result looks like this:

    This is a green, italic, Arial H4 header.

    This is an H4 header, but it's not green, italic, or Arial.

  3. What is a document level style? Please provide an example.
    A document level style sheet is used to define the parameters for one individual document. You put the style parameters within the HEAD of the document and they apply to that document only.
    For example within the HEAD of the document you would tag the code as follows: (open the STYLE tag) STYLE type="text/css" (close the STYLE tag) Close the HEAD tag. (Open the BODY tag.) (Open the H3 tag)This is a green, italic, Arial H3 header. (Close the H3 tag.

    (Open the second H3 tag) So is this. (Close the second H3 tag). (Close the BODY tag.)

    This is a green, italic, Arial H3 header.

    So is this.

  4. What is a linked style? Please provide an example.
    You use a linked style sheet if you want to use the same styles for several pages or a whole site. A linked style sheet is an external style sheet that you link to from your HTML documents. First, you create a file that contains the style you want to apply globally to many documents or to the entire site. You give the global style sheet a name like style1.css and you type your parameters into that document. For example: H3 { font-family: Arial; font-style: italic; color: green } Next, you start a new HTML document (for example, style1.html), and add a LINK element that calls the style sheet in the document's head: The LINK element's attributes tell the browser to find an external style sheet, that the style sheet is a CSS file, and that the name of that file is style1.css

  5. What is the advantage to having linked style sheets as opposed to to inline styles or document level styles?
    You can apply the styles to more than one document by linking the style sheet to the document. This is good because when you need to make changes in the style, you make them only to the linked style sheet, rather than to each individual page.
  6. What does the Cascade refer to in Cascading Style Sheets?
    Cascading Style Sheets means that more than one style sheet can be used on the same document, with different levels of importance. The Cascade refers to the level of importance of a particular style attribute.

    According to the CSS document on CNET.com, if you define conflicting styles for the same HTML element, the innermost definition--the one closest to the individual tag--takes priority. For example, a tag's style attribute takes precedence over a surrounding element's style, which has priority over a style defined in the head of the document, which in turn wins over an attached style sheet. If conflicting styles are defined at the same level, the one occurring later wins.

  7. What effect will this coding create if applied to the H1 tag?
    { font-size : large; font-family : monospace; font-weight : bold; color : #008000; background-color : #FFFF00; }

    It will result in the level 1 headings appearing in a large font that looks something like an old typewriter font. It will be boldface type, in blue with a yellow background.