CSS font-size property
CSS font-size property sets the size of text.
Set font-size for Paragraph <p> Element
index.html
</>
Copy
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<style>
p {
font-size: 30px;
}
</style>
</head>
<body>
<p>Hello World</p>
</body>
</html>
Set font-size for Anchor <a> Element
index.html
</>
Copy
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<style>
a {
font-size: 30px;
}
</style>
</head>
<body>
<a href="#">Hello World</a>
</body>
</html>
Conclusion
In this CSS Tutorial, we learned about font-size property, and how to use this property for various HTML elements, with examples.