Skip to content
Related Articles

Related Articles

Improve Article

How to change font size in HTML ?

  • Last Updated : 22 Mar, 2021

To change the font size of any text we can use the CSS font-size Property, or some HTML keyword have some fixed font size but we change them as well by using this CSS property.


font-size: medium|xx-small|x-small|small|large|x-large|



<!DOCTYPE html> 
            CSS font-size property 
        <!-- CSS style to set font-size property -->
            .xxsmall { 
            .xsmall { 
            .small { 
            .medium { 
            .large { 
            .xlarge { 
            .xxlarge { 
        <h1>Changing the Font Size</h1
        <div class = "xxsmall">font-size: xx-small;</div
        <div class = "xsmall">font-size: x-small;</div
        <div class = "small">font-size: small;</div
        <div class = "medium">font-size: medium;</div
        <div class = "large">font-size: large;</div
        <div class = "xlarge">font-size: x-large;</div
        <div class = "xxlarge">font-size: xx-large;</div


font size

Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.

My Personal Notes arrow_drop_up
Recommended Articles
Page :