STILL CHAPTER 4 More Style
Topics How to specify “style” for beautifying your content? Using tag and style attributes and values Separate file for.css How to reference images? Using tag How to separate the style items into another file? Move only the style attributes to another file that has.css as type A css file does NOT include tags How to reference files within your computer directory and files out on the web? Using href, relative pathnames and absolute pathnames We will look at examples for these. Also see Lets look at style issues
Style tag How to specify a style item? In the head section using {attribute: value;} Example tag_name{background-color: orange} There can be more style specification for each tag h1 { color:orange; text-align:center; }
Css within the html file body { background-color:#d0e4fe; } h1 { color:orange; text-align:center; } p { font-family:"Times New Roman"; font-size:20px; font-style: italic; } CSS example! This is a paragraph.
Separate html and css files Lets separate them out File1.html File1.css
body {background-color: lightblue;} CSS example! This is a paragraph.
body { background-color:#d0e4fe; } h1 { color:orange; text-align:center; } p { font-family:"Times New Roman"; font-size:20px; font-style: italic; } The css file
References to other html files Link text My Resume Local link, relative path name. W3C CSE dept Web page.
Summary Lets try all these examples. Also lets discuss Lab 1