Line-height logic for a website?

I have used


body{line-height: 200%;}
p{line-height: 150%;}

With this the problem use p tag for text is fine but if not like a testimonials section there looks so bad with <q></q> (so there apply 200% this way is fine but i not want put all inside a p)Any logic to set line-height where i want? or? I want to use 200% on all body but in some useful text only 150% but there not can write <p> tag always. Idea? I want control where I want use it any good logic for it? I mean i not want set on every custom class a line height like:

.pgoodlineheight{line-height: 150%;}

Thanks

I’m having a really hard time understanding what you’re asking.

I made a codepen that shows how you can apply line-height to different HTML Elements - https://codepen.io/metasean/pen/PgVgLG?editors=1100

I also included some other styling that will helpfully give you some code to explore.

If you can post a codepen with your example code, and a description of what you expect, we might be able to help you a bit more.

1 Like

Thanks for your time! Yes I figure out in a way use p tag and inside it the q tag so is not matter the logic. Just use q tag is very poor…

1 Like