I am making a webpage in Google Sites, and am running into a seemingly common problem. How do I make the text size smaller when the window becomes smaller? I am very new to HTML, so I need a simple answer with some sample code. I am not sure, but I think Google Sites only allows HTML. Unfortunately, I am unable to attach more than the following code, which I hope is enough:
<font color="#000000" face="georgia, serif" size="4"><span style="line-height:40px">This is code</span></font>
Using the VW CSS property.
Example:
p {font-size: 4vw;}
Only works reliably on HTML5 compatible browsers.
Spec: https://developer.mozilla.org/en-US/docs/Web/CSS/length
1VW = 1/100th of viewport width. Adjust the value before the vw to adjust the amount of autoscale you want on your type.
Edit: As others have noted - you can also use media-queries, but the scaling is not smooth and will jump to each new font size at each break point. This is fine for body copy where you want exact control over font size - however, if you want proportional scaling at all viewport sizes, not just at predefined breakpoints, use VW.