How do we set text font in HTML?

HTMLWeb DevelopmentFront End Technology

The <font> tag was used to set the font in HTML, but it is now deprecated. Use CSS for the same purpose.


You can try to run the following code to change the font of text in HTML −

<!DOCTYPE html>
      <p>Learning videos</p>
      <p style = "font-family:'Courier New'">Learning content</p>
Updated on 24-Jun-2020 08:53:26