
- 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 do we set text font in HTML?
The <font> tag was used to set the font in HTML, but it is now deprecated. Use CSS for the same purpose.
Example
You can try to run the following code to change the font of text in HTML −
<!DOCTYPE html> <html> <body> <h2>Tutorialspoint</h2> <p>Learning videos</p> <p style = "font-family:'Courier New'">Learning content</p> </body> </html>
- Related Articles
- How to set text font family in HTML?
- How do we include big text in HTML?
- How do we create underlined text in HTML?
- How do we create preformatted text in HTML?
- How do we add bold text in HTML?
- How do we display inserted text in HTML?
- How do we set the text direction for the content in an element in HTML?
- How do we set the visible number of lines in a text area in HTML?
- How to change text font in HTML?
- How do we include an emphasized text in HTML?
- How do we display a text area in HTML?
- How to set font for Text in Tkinter?
- How to set font color in HTML?
- How to set font to text node in JavaFX?
- How do we include the direction of text display in HTML?

Advertisements