Để thay đổi cỡ chữ trong HTML, dùng thuộc tính style. Thuộc tính này chỉ định style inline cho phần tử. Dùng với thẻ <p>, kết hợp thuộc tính CSS font-size. HTML5 không hỗ trợ thẻ <font>, nên dùng CSS.
Lưu ý: style inline sẽ ghi đè bất kỳ style toàn cục nào (trong thẻ <style> hoặc file CSS ngoài).

Ví dụ
<!DOCTYPE html>
<html>
<head>
<title>HTML Font size</title>
</head>
<body>
<h1 style="color:red; font-size:40px;">Heading</h1>
<p style="color:blue; font-size:18px;">This is demo text</p>
</body>
</html>