Forum Discussion
How to prevent all upper-case in Tabs block headings
Thanks, Nedim! I've added some common ones people may want below.
I generated them with Copilot based on your original one:
Font size:
<div style="font-size: 16px;">YOUR TEXT GOES HERE</div>
Italics:
<div style="font-style: italic;">Your Text Goes Here</div>
Underline:
<div style="text-decoration: underline;">Your Text Goes Here</div>
Strikethrough:
<div style="text-decoration: line-through;">Your Text Goes Here</div>
That's exactly how it works. I would recommend using rem instead of px for font sizes. In most cases, the default text size is based on 1rem = 16px, and the default heading size in this context appears to be 1.2rem (approximately 19.2px).
Using rem units is generally preferable because they scale relative to the root font size, making your content more accessible and responsive. If the user changes their browser's default text size, elements sized with rem will adjust accordingly, whereas fixed px values will not.
You can also combine multiple styles into a single style attribute. For example, to capitalize the first letter of each word, increase the font size, make the text bold, italicize it, and underline it:
<div style="text-transform: capitalize; font-size: 1.2rem; font-weight: bold; font-style: italic; text-decoration: underline;"> Your Text Goes Here </div>
Just add or remove the individual CSS properties depending on the formatting you need.
Related Content
- 8 months ago
- 1 year ago