View on GitHub

reading-notes

Chapters:

  1. Chapter 5: “Images” (pp.94-125)
  2. Chapter 11: “Color” (pp.246-263)
  3. Chapter 12: “Text” (pp.264-299)

Chapter 3: “IMG”

Note: You should read A quick primer on URLs and paths to refresh your memory on relative and absolute URLs before continuing.

So for example, if your image is called dinosaur.jpg, and it sits in the same directory as your HTML page, you could embed the image like so:

<img src="dinosaur.jpg"> If the image was in an images subdirectory, which was inside the same directory as the HTML page, then you’d embed it like this:

<img src="images/dinosaur.jpg"> And so on.

Note: Search engines also read image filenames and count them towards SEO. Therefore, you should give your image a descriptive filename; dinosaur.jpg is better than img835.png.

You could embed the image using its absolute URL, for example:

<img src="https://www.example.com/images/dinosaur.jpg"> But this is pointless, as it just makes the browser do more work, looking up the IP address from the DNS server all over again, etc. You’ll almost always keep the images for your website on the same server as your HTML.

img

chapter11 :colors

***Note: Although values are precisely defined, their actual appearance may vary (sometimes significantly) from device to device. This is because most devices are not calibrated, and some browsers do not support output devices' color profiles.***

There are a few caveats to consider when using color keywords:

The color keywords all represent

  1. plain
  2. solid colors
  3. without transparency.

Several keywords are aliases for each other:

  1. aqua / cyan
  2. fuchsia / magenta
  3. darkgray / darkgrey
  4. darkslategray / darkslategrey
  5. dimgray / dimgrey
  6. lightgray / lightgrey
  7. lightslategray / lightslategrey
  8. gray / grey
  9. slategray / slategrey

chapter12: Text

img

examples:

img

JPEG vs PNG vs GIF

img

img

img