Know the following about forms. * The
element has these attributes action="" the destination where form data goes method="" this can be either "post" or "get" * To get one line of input, use Important attributes: name="" the field name for this data maxlength="" maximum # of characters allowed in input size="" amount of space to use on screen * To send information to the server, use value="" this is the text that displays on the button ============================================= Know about the element: alt="" describes what the picture shows a cat black male cat w. white ears width="" height="" Note: the src="" attribute should usually give a relative pathname to the location of the image. Know how to link a picture so that when you click the picture, the browser takes you to another picture or web page. ============================================== Know how to create tables, using the table attributes rather than style="" bgcolor="" sets background color for , , or
/ only in the form of a keyword or #aabbcc -- it does NOT have a ; in it. This is not a style! align="" can have values left, right, or center valign="" vertical alignment; has values top, bottom, or middle colspan="" number of columns that a cell spans rowspan="" number of rows that a cell spans ================================================ Stylesheets: color: sets foreground color background-color: sets background color Know how to set borders on any side of an element, for example "Make all paragraphs have a 4-pixel double green border" p { border: 4px double green; } "Make all paragraphs have a top border of 1 pixel solid magenta" p {border-top: 1px solid magenta;} or p { border-top-width: 1px; border-top-style: solid; border-top-color: magenta; } Along with borders, know how to use margins and padding: p { margin-left: 0.5em; padding: 1em 2px 3pt 4cm; /* top right bottom left */ } Know how to use generic classes: .example { color: green; } You can apply this class to ANY element:

abc

  • def
  • Know how to set a style for an element that has an id="" attribute.

    this is a test

    #test { line-height: 150%; } Know how to set a background image: ul { background-image: url(myimage.png); } Note that there are no quote marks, though you may use them if you wish, and you must NOT leave a blank after the word url and before the opening parenthesis. The item in between the parentheses is a relative path name, so it can be complex: p { background-image: url( ../images/backgrounds/myimage.png ); } Know about context selectors vs. multiple selectors div li { color: red; } div, li { color: red; } The first one applies to any
  • element that is nested inside
    element. The second one applies to all
    elements , and all
  • elements. Know about floating an element. Whenever you float an element in a stylesheet, you must give a width: .floatingStuff { width: 20%; color: orange; float: right; border: 2px dashed green; } Then in my HTML I would have:
    This paragraph floats to the right.
    The style ensures that this second paragraph begins *after* the first paragraph is completely drawn. Know who invented the World Wide Web. Hint: It was not Clyde Tolson. You will have one stylesheet with errors in it, and you have to correct the errors. Know how to link an external stylesheet: Please remember that an external stylesheet *never* has any HTML elements in it at all. It doesn't even have HTML comments. /* stylesheet comment; use these in your external stylesheet */