To add class
and id
attributes to HTML elements and use those
as CSS selectors.
Web Programming book reading for THIS class
Web Programming book reading for NEXT class
line-height
Property padding
Property, margin
PropertyAdditional References
Just Color Picker Tool
Questions from our last class or the readings?
<style>
tags .css
<link rel="stylesheet" type="text/css" href="filename.css">
<link>
tag should go in the <head>
section <br>
and <img>
tags,
the <link>
tag is what the textbook author calls a
“void” tag and does not have to be closed css
subfolder to hold all of your CSS files
<link rel="stylesheet" type="text/css" href="css/filename.css">
<link rel="stylesheet" type="text/css" href="../css/ClassNotes.css">
"../css/filename.css"
? "../css/"
mean?
Dean, Web Programming, p. 92
In our last class we looked at named colors.
Specifying Colors with RGB Values
color: rgb( 0, 0, 0 )
= blackcolor: rgb( 255, 0, 0 )
= pure redcolor: rgb( 0, 255, 0 )
= pure greencolor: rgb( 0, 0, 255 )
= pure bluecolor: rgb( 255, 255, 255 )
= whitecolor: #600 ; /* dark brown */ background-color: #FFC ; /* light yellow */
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
Using the Just Color Picker Tool
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
em
vs.px
- each has pluses and minuses
- pixels are fixed, percentages are not
em
is relative to the “base text size”
1em = 100% =
base text size2em = 200% =
2 * base text size
https://www.w3schools.com/cssref/css_units.php- the
em
andrem
units are valuable for creating perfectly scalable layouts- * the viewport is 100% of the browser window size
- thus, if the viewport is
50cm
wide,1vw
is 1% of the entire viewport, which would be0.5cm
- note again that there must not be a space between a number and its units
Font Families
Dean, Web Programming, p. 105
- serifed vs. non-serifed fonts
- be especially careful with non-standard fonts, as these are not on all users’ systems
- font groups and font mapping
Dean, Web Programming, p. 105
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.
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 ;
<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.