HTML for greens - HTML
Font size
How do I change the font size on a web page?
<span style="font-size: size">Enter text here</span>
- xx-small
- Smallest font size
- x-small
- Very small font size
- small
- Small font size
- medium
- Medium font size
- large
- Large font size
- x-large
- Very large font size
- xx-large
- Largest font size
Example {font-size}
Font size is xx-smallFont size is x-small
Font size is small (default)
Font size is medium
Font size is large
Font size is x-large
Font size is xx-large
Questions and Answers
How to change the font size in HTML?
To do this, you need to enclose the text within a tag with an attribute set to an appropriate value: <span style="font-size: xx-small">...</span>
(smallest font), <span style="font-size: x-small">...</span>
(very small font), <span style="font-size: small">...</span>
(small font), <span style="font-size: medium">...</span>
(medium font), <span style="font-size: large">...</span>
(large font), <span style="font-size: x-large">...</span>
(very large font), <span style="font-size: xx-large">...</span>
(largest font).
How to reduce the font size in HTML?
Regular text on a webpage is displayed in the default font size. To decrease it, you should enclose it within a tag with an attribute set to an appropriate value: <span style="font-size: x-small">...</span>
, or if you want to significantly reduce the text size: <span style="font-size: xx-small">...</span>
.