Typography

Headings and Text


Heading and text are responsive according to various screen sizes.


Device xs sm md lg xl dxl
h1 36px 39px 44px 51px 60px 71px
h2 30px 32px 36px 42px 50px 60px
h3 25px 26px 29px 34px 41px 50px
h4 21px 24px 24px 26px 30px 35px
h5 18px 19px 20px 21px 24px 28px
h6 16px 17px 18px 19px 22px 26px
p (base font) 15px 16px 17px 18px 19px 20px
small 13px 14px 15px 16px 17px 18px

You do not need to define any class for heading and text.



Customizing Headings and Text


Class .fs-{font-size} can be used to customize your headings and text.

<h4 class="fs-36">This is a paragraph with customized heading.</h4>
<p class="fs-21">This is a paragraph with customized text size.</p>

This is a paragraph with customized heading.


This is a paragraph with customized text size.

Text Alignment

Change the alignment of your text as follow:


Left align a text
<p class="txt-left">Text of this paragraph is left-aligned. We use getcss's text-left class in this paragraph to make it aligned left. Just write 'class=txt-left' and the element text will be left aligned.</p>

Text of this paragraph is left-aligned. We use getcss's text-left class in this paragraph to make it aligned left. Just write 'class=txt-left' and the element text will be left aligned.


Center align a text
<p class="txt-center">Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta illo fugiat eligendi. Quisquam molestias, commodi hic quasi, quos sed porro ut ipsa accusantium saepe deserunt tenetur inventore? Dolorum nam, magni voluptas aliquam laborum, consectetur ipsa, eos accusantium neque nulla voluptatem.</p>

Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta illo fugiat eligendi. Quisquam molestias, commodi hic quasi, quos sed porro ut ipsa accusantium saepe deserunt tenetur inventore? Dolorum nam, magni voluptas aliquam laborum, consectetur ipsa, eos accusantium neque nulla voluptatem.


Right align a text
<p class="txt-right">Text of this paragraph is right-aligned. We use getcss's text-right class in this paragraph to make it aligned right. Just write 'class=txt-right' and the element text will be right aligned.</p>

Text of this paragraph is right-aligned. We use getcss's text-right class in this paragraph to make it aligned right. Just write 'class=txt-right' and the element text will be right aligned.


Justify a text
<p class="txt-justify">Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta illo fugiat eligendi. Quisquam molestias, commodi hic quasi, quos sed porro ut ipsa accusantium saepe deserunt tenetur inventore? Dolorum nam, magni voluptas aliquam laborum, consectetur ipsa, eos accusantium neque nulla voluptatem.</p>

Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta illo fugiat eligendi. Quisquam molestias, commodi hic quasi, quos sed porro ut ipsa accusantium saepe deserunt tenetur inventore? Dolorum nam, magni voluptas aliquam laborum, consectetur ipsa, eos accusantium neque nulla voluptatem.


Text Decoration


Underline a text
<p class="deco-underline">Lorem ipsum dolor sit amet consectetur adipisicing elit. Ea, nam.</p>

Lorem ipsum dolor sit amet consectetur adipisicing elit. Ea, nam.


Overline a text
<p class="deco-overline">Lorem ipsum dolor sit amet consectetur adipisicing elit. Ea, nam.</p>

Lorem ipsum dolor sit amet consectetur adipisicing elit. Ea, nam.


Dotted overline a text
<p class="deco-overline deco-dotted">Lorem ipsum dolor sit amet consectetur adipisicing elit. Ea, nam.</p>

Lorem ipsum dolor sit amet consectetur adipisicing elit. Ea, nam.


Overline a text with a custom size
<p class="deco-overline deco-3-px">Lorem ipsum dolor sit amet consectetur adipisicing elit. Ea, nam.</p>

Lorem ipsum dolor sit amet consectetur adipisicing elit. Ea, nam.


Line-through a text
<p class="deco-line-trough">line-through class is applied on the text of this paragraph.</p>

line-through class is applied on the text of this paragraph.


Text Transformation


Uppercase a text
<p class="txt-uppercase">Lorem ipsum dolor sit amet consectetur adipisicing elit. Ea, nam.</p>

Lorem ipsum dolor sit amet consectetur adipisicing elit. Ea, nam.


Lowercase a text
<p class="txt-lowercase">Lorem ipsum dolor sit amet consectetur adipisicing elit. Ea, nam.</p>

Lorem ipsum dolor sit amet consectetur adipisicing elit. Ea, nam.


Text Indentation

<p class="indent-40-px">Lorem ipsum dolor sit amet consectetur adipisicing elit. Esse, eligendi harum tenetur sed maiores odio nostrum mollitia perferendis maxime repudiandae molestias quis perspiciatis magni repellat cupiditate, adipisci vel, blanditiis officia.</p>
Indent 40px from left

Lorem ipsum dolor sit amet consectetur adipisicing elit. Esse, eligendi harum tenetur sed maiores odio nostrum mollitia perferendis maxime repudiandae molestias quis perspiciatis magni repellat cupiditate, adipisci vel, blanditiis officia.

Letter Spacing

<p class="ls-3">Lorem ipsum dolor sit amet consectetur adipisicing elit. Esse, eligendi harum tenetur.</p>

Lorem ipsum dolor sit amet consectetur adipisicing elit. Esse, eligendi harum tenetur.


Negative letter spacing
<p class="ls--2">Lorem ipsum dolor sit amet consectetur adipisicing elit. Esse, eligendi harum tenetur.</p>

Lorem ipsum dolor sit amet consectetur adipisicing elit. Esse, eligendi harum tenetur.

Line Height


Narrow Line Height
<p class="lh-narrow">Lorem ipsum dolor sit amet consectetur adipisicing elit. Esse, eligendi harum tenetur. Lorem ipsum dolor sit amet consectetur adipisicing elit. Vitae, quis.</p>

Lorem ipsum dolor sit amet consectetur adipisicing elit. Esse, eligendi harum tenetur. Lorem ipsum dolor sit amet consectetur adipisicing elit. Debitis, libero!

getcss logo


Designed and maintained with by Sunil

Source code licensed under MIT

Website content & documentation licensed under CC BY-NC-SA 4.0


Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.

getcss

Become a patron, sponsor, or backer!

Support getcss