Look especially at › File Tips and Shortcuts › Student video
are special symbols with special meanings How would you display A < B ? Suggestions? < for & is an escape symbol, handled specially. Always ends with ; Means that you need a special way to display “&” too: & Good list at
HTML Content CSS Presentation JavaScript Behavior
CSS is for giving style to your content HTML: content CSS: style CSS Zen Garden
Font: size, color, style › More on color next week › For now, by name Background Border › Must have size color and style Position: margins, centering Size
Selector specifies the HTML element to style Declaration: always contains a property & value ends with a semicolon Property: style element you want to change Value: what you are changing the property to
Formatting Practices: some flexibility, but you must be consistent. always comment unclear code! /* someCommentHere */ curly braces tab alignment Bad practices: declarations on the same line as braces or selector multiple declarations on the same line leaving off the last semi-colon
full reference sheet
Preferable to use: universality Multiple fonts: use first available
pt refers to printer’s font measurement px refers to pixels em is a relative measure › 1 em = base size (defined in body or default) › Great for changing all at once
Put your title here What will appear on the page
Every page needs › Header (DIFFERENT THAN head) › Content › Footer Minimal content › Header: title › Footer: who wrote it and when
Basic model: … Use for main title … Use for the main content … Use for accreditations and citations Each section can be formatted independently (soon)
The best (only way for this class!) way to insert CSS to your HTML is by using an External Style Sheet Define all your styles in one place Easily change the look of your site Use the following tag within the tag Save your external style sheet as a.css file.
Contains all needed pages › HTML › CSS › (more to follow) Main (first) page called index.html Can view the page with the folder name unc.edu/~pozefsky/foldername