Saturday, April 19, 2025

HTML Font Size

In HTML we will use font tag in combination with size attribute do define font size. Plain HTML allows seven font sizes, Level 1 is smallest one, and level 7 is biggest one.

Just note that font element must be inside p element, because in same p element you can have a lot of other text with different color and size.

When we learn CSS, you will have a lot of other options to style font in general.

<!DOCTYPE html>

<html>
<head>
	<title>Security Tutorials</title>
	<meta charset="utf-8">
	<meta name="description" content="Free Security Tutorials">
	<meta name="keywords" content="it security, pentesting, hacking">
</head>

<body>

	<p>This is default font size</p>
	
	<p><font size="1">Font Size Level - 1</font></p>
	<p><font size="2">Font Size Level - 2</font></p>
	<p><font size="3">Font Size Level - 3</font></p>
	<p><font size="4">Font Size Level - 4</font></p>
	<p><font size="5">Font Size Level - 5</font></p>
	<p><font size="6">Font Size Level - 6</font></p>
	<p><font size="7">Font Size Level - 7</font></p>

</body>
</html>

No comments:

Post a Comment

Tkinter Introduction - Top Widget, Method, Button

First, let's make shure that our tkinter module is working ok with simple  for loop that will spawn 5 instances of blank Tk window .  ...