Website Development I

Course Info Class Notes Resources Student Websites

Class No. 5:

CSS Properties, Colors, and Styling Fonts

Today’s Goal

To add class and id attributes to HTML elements and use those as CSS selectors.


Class Resources

Web Programming book reading for THIS class

Web Programming book reading for NEXT class

Additional References

Just Color Picker Tool


Review

Questions from our last class or the readings?


External Style Sheets


CSS Property Categories


Dean, Web Programming, p. 92


CSS Color Properties

In our last class we looked at named colors.

Specifying Colors with RGB Values

Color Wheel


by 8 leaf-clover - Own work, CC BY-SA 4.0,
    https://commons.wikimedia.org/w/index.php?curid=113344793
see also:  Dean, Web Programming, p. 99


Font Properties

Font Style


Dean, Web Programming, p. 100

Font Variants


Dean, Web Programming, p. 101

Font Weights


Dean, Web Programming, p. 102

Font Size


Dean, Web Programming, p. 102

Font Families


Dean, Web Programming, p. 105


Dean, Web Programming, p. 105


Today’s Exercise

Goal:  To complete rendering PRO Manual page 47 in the browser so that it looks as close as possible to the way it looks in the manual.

Note:  This is the same exercise that we did in our last class, so just continue from where you left off.  If you completed the exercise, review your work with one of the instructors to discuss ways that it might be improved or enhanced.

Procedure:

  1. Look at page 47 of the PRO Manual and notice that:
    1. The page header after the page number, “|CTEC: Business & Computer education,” is in a light gray color.  (“Education” should also be capitalized here.)
    2. The main page title at the top of the page, “CTEC: BUSINESS & COMPUTER EDUCATION,” is in white text.
    3. The page text is enclosed in a light gray border.
    4. The “Foundation Classes” section is indented.
    5. The page has additional text formatting characteristics, but ignore the icon in the page header and the CTEC logo image for now.

    Step 2:  Copy the starter code to your dropbox

  2. Open the UltraEdit editor on your computer.  This should open a blank window that is ready for editing.
  3. Leave the editor open and click here to open the starter code in your Microsoft Edge browser.
  4. Type CtrlU to view the source code for the starter code page.
  5. Click anywhere in the browser window and type CtrlA to select all of the code.
  6. Type CtrlC to copy the code.
  7. Return to UltraEdit and type CtrlV to paste the code into the blank editor window.
  8. Type CtrlS to save your copy of the starter code to your dropbox.  Name the file as you see fit.
  9. Open the file you just saved in Microsoft Edge to ensure that you have saved it correctly.
  10. Step 3:  Add CSS to format the page as desired

  11. Attempt to implement these formatting characteristics using CSS.  Here are the CSS properties I used in my version that that you might also want to use.
  12.       font-family: Verdana, Arial, sans-serif ;
          width: 600px ;
          font-style: italic ;
          font-weight: bold ;
          color: white ;
          color: RGB( 121, 143, 156 ) ;  (this is the color of the grayish blue text)
               or  color: lightblue ;
          background-color: RGB( 121, 143, 156 ) ;
               or  background-color: lightblue ;
          border: 2px solid RGB( 121, 143, 156 ) ;
               or  border: 2px solid lightblue ;
          border-radius: 0 10px 10px 0 ;
          float: left ;   /* for the student icon */
          float: right ;  /* for the CTEC logo */
          height: 50px ;
          margin-right: 0.5em ;
  13. You will need the <div> and <span> tags to do a really good job on this exercise.  Note where I have included these in the starter code and assigned each an ID.

To see what can be done, compare page 47 of the PRO Manual with my HTML version of this page.


 


This is Class No. 5.  It was last modified on Saturday, October 21, 2023 at 4:38 PM.  Copyright © 2010-2024 by Jesse M. Heines.  All rights reserved, but may be freely copied or excerpted for educational purposes with credit to the author.