Set Font Size with Pixels using CSS

CSSWeb DevelopmentFront End Technology

To set font size with pixels, use the px unit, with the font-size property. You can try to run the following code to set font size with pixels

Example

Live Demo

<!DOCTYPE html>
<html>
   <head>
      <style>
         h1 {
            font-size: 30px;
         }
      </style>
   </head>
   <body>
      <h1>This is demo heading</h1>
      <p>This is demo text.</p>
   </body>
</html>

Output

raja
Published on 08-May-2018 08:20:38
Advertisements