This forum is now read-only. Please use our new forums at discuss.codecademy.com.

Make a Website: Bootstrap Forum

View Course » View Exercise

140 points
Fa45aed353201853bab6592baa4f0c2b?s=140&d=retro
Submitted by
yomo910
over 1 year ago

1/14 understanding the nuances of the head element

a few qs:

  1. how come by both bootstrap and main.css you do but by the font you did ?
  2. i know why the font link came before main.css but why does it have to come before bootstrap?
  3. also why is there a space between the font link and the other 2 (bootstrap and main.css)

0 votes

permalink

Hi Yomo,

Im not really sure what it is you are asking in the first question, but I will try and answer the 2nd two.

2, the reason Id recommend putting the font file first is because if any of the css files used the font, and the font was loaded after, it wouldnt load. For example if the font file came after your main/bootstrap files and it had

font-family: 'shift', sans-serif;

the browser would not be able to load shift and load sans-serif instead. So its probably best practice to put font files first.

3, probably just to differentiate between the types of css files, the font file is only a font file, whereas the other 2 are for styling. But it wouldnt have made any difference if they were all on 1 line (minified)

Thanks

862 points
559668bb9113cb80140006e5_658289431
Submitted by
Keith Light
over 1 year ago