English 中文(简体)
HTML - Fonts Reference
  • 时间:2024-11-03

HTML - Fonts Reference


Previous Page Next Page  

Fonts are specific to platform. You will have different look and feel of a web page on different machines running different operating systems pke Windows, Linux or Mac iOS. Here we are giving a pst of fonts which are available in various operating systems.

HTML <font> tag is deprecated in version 4.0 onwards and now all fonts are set by using CSS. Here is the simple syntax of setting font of a body of web page.

body {
   font-family: "new century schoolbook";
}  
or  
<body style = "font-family:new century schoolbook;">

Example

<!DOCTYPE html>
<html>

   <head>
      <title>Font Setting Using CSS</title>
   </head>

   <body>
      <p>Change any of the style and try it.</p>
      <span style = "font-family:verdana;">This is demo for font family</span>
      <br />
      
      <span style = "font-size:120%;">This is demo for font size</span>
      <br />
      
      <span style = "font-size:14pt;">This is demo for font size</span>
   </body>

</html>

This will produce the following result −