Concept of Typography in Bootstrap 4 | bootstrap 4 text size
TypographyisanotherconceptwithinBootstrapthathelpsingivingstylesandformatstotextcontents.Bydefault,Bootstrap4uses1rem(16px)asfontsizeaswellastheline-heightremains1.5.Itkeepsitsdefaultfont-familyas"HelveticaNeue"whereHelvetica,sans-serif,Arialareused.Furthermore,all
(paragraph)elementshavemargin-topsetto0andmargin-bottomsetto1rem(16px).DefaultFontSizesinBootstrap4InBootstrap4,thesizeofthetypographyfontisbasedonaremunitofmeasurementwhichisrelativetotherootHTMLelement.Thefollowingtabled...
Typography is another concept within Bootstrap that helps in giving styles and formats to text contents. By default, Bootstrap 4 uses 1rem(16px) as font size as well as the line-height remains 1.5. It keeps its default font-family as "Helvetica Neue" where Helvetica, sans-serif, Arial are used. Furthermore, all <p> (paragraph) elements have margin-top set to 0 and margin-bottom set to 1rem(16px).
Default Font Sizes in Bootstrap 4In Bootstrap 4, the size of the typography font is based on a rem unit of measurement which is relative to the root HTML element. The following table describes the font size in pixels compared to the rem.
HTML Tag / CSS ClassFont Size in remFont Size in Pixelh1, .h12.5rem40pxh2, .h22rem32pxh3, .h31.75rem28pxh4, .h41.5rem24pxh5, .h51.25rem20pxh6, .h61rem16px.display-16rem90px.display-25.5rem82.5px.display-34.5rem67.5px.display-43.5rem52.5pxp1rem16pxIn the "rem" unit, if you are changing its size to Root, it will affect the siz...