WDI Fundamentals

WDI Fundamentals Unit 3

Linking our Files

We've gotten really far with learning about HTML and CSS. But how does the CSS file communicate with HTML file? In order for the HTML file to pull in the proper CSS file, you're going to have link the two! Let's find out how.

Relative vs. Absolute Addressing: A relative address/path is one defined with respect to one's own position within a filesystem (e.g. ./index.html, main.css); an absolute address/path is one defined with respect to some fixed location within a filesystem (like / or ~).

A good rule of thumb to remember is that an absolute path always points to the same place, no matter where you might be in your filesystem.

Checkpoint:

  • What are some best practices for organizing my files and folders on my computer? Should I be saving my work elsewhere?
  • What is the common name for primary css pages?
  • Where in the HTML boilerplate would you put the link element?
  • What do rel, type and href describe?
  • Where does "text/css" go in the link attribute?

On to the next lesson.