Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialramseydennis
4,530 PointsIn the previous video, Guil doesn't choose a font size for the html element -
Hey everyone,
So my understanding is that, if you want, you can make your base font size larger than 16px (1em), so that your other child elements can be relative to a larger default font size.
I also understand that there is this compounding problem with ems, and so you need to use rems to combat that, if you want to use this specific kind of relative unit.
Moreover, it's my understanding that, rem measurements are relative to the html element, which is 16px.
In the previous video, Guil does not choose a larger em for his html tag. Is this possible to do?
Or must the html element always be 16px? In other words, is this html font size an unalterable default?
If it is, then the idea of choosing your base font (that other child elements are relative to) to be larger than the default 16px, seems useless if you want to use ems and avoid compounding.
Is it as simple as - you can choose a larger em for your html element in the stylesheet, like Guil does with the body element in the previous video?
Can anyone clarify this for me?
Thanks -
1 Answer
Steven Parker
231,269 PointsYou can style HTML just like any other element. The difference is that changes to HTML will affect both em and rem units elsewhere in the document, where changing other elements will only affect em units.
ramseydennis
4,530 Pointsramseydennis
4,530 PointsGreat, thanks Steven -