True, if it is simple - that place above and below is intended for tricks :)
In the web there is the concept of line height ( line-height ). It is the leading, it is the line spacing. And the text fits into lines with such heights.
You can set line-height in styles. For example, in pixels ( 24px ), or in volumes ( 1.25em ), or in a dimensionless quantity ( 1.2 ). Set for all elements ( * {} ), or for some specific ( h1 {} ).
If nothing is specified, the default row heights will be applied. Different browsers have different defaults.
Specifically for line-height - the default value for browsers is normal . It means that the browser can decide on the size of the string itself. As a rule, it will be in the range of 1.1 - 1.25, but the standard does not guarantee this, it says only that it must be “reasonable” (literally - eng. Reasonable).
Quotation source: "font-size" and "line-height" properties .
Normally defaults are reset, for example using normalize.css , and set their own font sizes and line heights. In other words - the rules of typography.
You can play with these rules, for example, on gridlover.net - move the sliders, and check the GRID button to see the grid. In the same place you can take ready CSS for your site with necessary rules of typography.