# 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>
<style>
h1 {
font-size: 30px;
}
</style>
</html>