
- HTML Tutorial
- HTML - Home
- HTML - Overview
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Formatting
- HTML - Phrase Tags
- HTML - Meta Tags
- HTML - Comments
- HTML - Images
- HTML - Tables
- HTML - Lists
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML - Frames
- HTML - Iframes
- HTML - Blocks
- HTML - Backgrounds
- HTML - Colors
- HTML - Fonts
- HTML - Forms
- HTML - Embed Multimedia
- HTML - Marquees
- HTML - Header
- HTML - Style Sheet
- HTML - Javascript
- HTML - Layouts
- HTML References
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- HTML - Fonts Ref
- HTML - Events Ref
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
How to use small font in HTML?
To set the small font 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 the following code to add font smaller than the default font in an HTML page
<!DOCTYPE html> <html> <head> <title>HTML smaller font</title> </head> <body> <h1>Heading</h1> <p>This is demo content.</p> <p style="color:blue;font-size:11px;">This text will be smaller.</p> </body> </html>
Output
- Related Articles
- How to use small formatting in HTML?
- How to create a small font text using JavaScript?
- How to set font color in HTML?
- How to change font size in HTML?
- How to change text font in HTML?
- How to set text font family in HTML?
- How to use a custom font in Tkinter?
- How to set the font to be displayed in small capital letters with JavaScript?
- How to use Font Awesome in Native Android Application?
- How to use custom font in a android project?
- How to use font-optical-sizing property in CSS?
- How to add a base font in a HTML page?
- How do we set text font in HTML?
- How to use Font Awesome symbol as marker in matplotlib?
- Create small text in HTML

Advertisements