How To Change Font Size In HTML? - Tutorialspoint
Có thể bạn quan tâm
- Home
- Whiteboard
- Online Compilers
- Practice
- Articles
- AI Assistant
- Jobs
- Tools
- Corporate Training
- Courses
- Certifications
- Switch theme
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
To change the font size in HTML, use the style attribute. The style attribute specifies an inline style for an element. The attribute is used with the HTML <p> tag, with the CSS property font-size. HTML5 do not support the <font> tag, so the CSS style is used to add font size.
Just keep in mind, the usage of style attribute overrides any style set globally. It will override any style set in the HTML <style> tag or external style sheet.

Example
You can try to run the following code to change the font size in an HTML page,
Live Demo
<!DOCTYPE html> <html> <head> <title>HTMLFont size</title> </head> <body> <h1style="color:red;font-size:40px;">Heading</h1> <pstyle="color:blue;font-size:18px;">This is demo text</p> </body></html>
Syed Javed Updated on: 2023-08-31T02:03:07+05:30 133K+ Views
Kickstart Your Career
Get certified by completing the course
Get StartedTừ khóa » Html Table Td Text Size
-
Font Size In Html Code - Stack Overflow
-
Solved: HEADING & ROW FONT SIZE IN HTML TABLE
-
HTML Table Font Size: Changing The Default Properties Is Easy
-
How Do I Change The Font Size Within Table Cells? - HTML FAQ
-
Tbody Td Font-size: 120%; : Table Size « Tags « HTML / CSS
-
How To Specify Font Styles For Text Inside Tables, The Easy Way
-
CSS Font-size Property - W3Schools
-
Change Table Font Size - Ultimate WordPress Plugins By Supsystic
-
HTML Fonts In Tables - Linuxtopia
-
Change Font Size For One Column/row - Supsystic
-
Having Trouble Viewing This Email? View The Online Version ... - IAASB
-
Specifying Font And Size In HTML Table - Newbedev
-
Three-Column Block - L-Soft
-
Text-size-adjust - CSS: Cascading Style Sheets - MDN Web Docs