An external style sheet is used to define the style for many HTML pages.
With an external style sheet, you can change the look of an entire web site, by changing one file!
To use an external style sheet, add a link to it in the
<head> section of the HTML page:
NOTE>>IN ORDER FOR THE LINK TO WORK FROM YOUR CSS TO HTML YOU MUST HAVE THE FULL FILE PATH NAME NOT JUST THE NAME OF THE FILE IT SELF.
<!– the link relationship below will not work for your CSS because it has the wrong file name.–>
<!– “styles” is the name of the CSS file for HTML5 Harold chosen by the book author to style that particular website.–>
<!– ~~first, create a style sheet.–>
<!–To establish your own stylesheet go to your text editor.–>
<!–open the text editor and enter the following code…–>
<!–Now you save as… –>
<!–and correct the “href” on your html page.–>
<link rel=”stylesheet” href=”my_file_name.css”>
<!–but wait it’s still not working??!–>
<!–In order for it to properly work you need to have the full file path, not just the file name…–>
<!– To get the full file path of your CSS…
<!– open the CSS page in your web browser just as you would an HTML page.–>
!–In your browser View, copy the URL from your browser search box as that will be the full file path to your CSS page…–>
<!– so for example, if this –>
“stylesheet” href=”my_full file_path/my_file_name.css”
<!– is what appears in the URL search box then copy this file path.–>
<!– Then open your HTML page and modify the “href” on your html page to the full file path that you copied from the URL box from the CSS page view.–>
<link rel=”stylesheet” href=”my_full file_path/my_file_name.css”
<!– To build a fully functional web app (as opposed to an old fashioned read-only website) you must have the CSS properly connected to your HTML Pages; not just the index but all of your HTML pages.–>
<!– On the bright side, once you figure out how to connect the CSS link to your html; you simply copy and paste the information from the head of your index page (home page) to every other HTML page for that websit. then make necessary modifications for specific pages on the website such as page title, ect…–>
<!–One final thing to note, building your homepage in your computer is fine but you will have to correct your links when you move it over to your server in general you want to upload your pages to your web server.–>
~~ lesson exercises ~~
use the information above to create a CSS sheet to style your HTML page and Link them together.
Copy the example below 4 times… I did the first one fo you…