i am using tailwind as a frontend framework
and in my content Inside a Div there is <p> , <h1>, <h2>…… all text tags…
why all are same with font size? aren’t heading tags are supposed to be Greater. there is no typography things all are just cleared
h1 > h2 > h3 ….
neither font size is set for the div which is containing all these..
let me know what might be the reason.. and i am well awared about tailwind.. i can add font size class in element using taillwind classes but
those all content inside div are from Rich Text Editor or cms so it might not be efficient and good approach ..
Are you using any CDN or any script tag? If yes then it might be affecting it but in Normal CSS it should not happen.
Are you talking about Tailwind CSS? If yes, then it has the same size for both heading and paragraph tag default. If not, then It should be of different sizes until and unless you make a change through CSS (giving the same font size for both p and h tag).
oo ya i am using tailwind..
how to prevent that?
i want all heading element with their original size..
By default, Tailwind provides 10 font–size utilities. You change, add, or remove these by editing the theme.fontSize section of your Tailwind config. Or you can give text-size like this:
<h1 class = ‘text-xl ‘>Click here to see Classes for Text Size in Tailwind</h1>
in Tailwind css you need to set your font-size on the element class like if you add h1 tag you need to give class and set font size for your heading be like in class text-lg, text-xl, text-2xl. And also you can set custom css for these elements but don’t forgot to add !important in css code for values cause !important makes this compulsary to this element.
you can find complete guide about tailwind css font-size:
https://tailwindcss.com/docs/font-size
cannot add .. see question.. edited :/
Finally found the solution after a long time..
You need to use typography plugin to apply typography in tailwind
here you go to the docs for proper guide @tailwindcss/typography – Tailwind CSS