HTML Font Family | Sakala Code
Sakala Code 1 year ago
sakalacode #html

HTML Font Family

HTML tag use can change the font family of text using the font-family property in CSS. HTML the font-family CSS property is used to specify the font of the text.

HTML Font Family with Example

<!DOCTYPE html>
<html lang="en">
<head>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Font Family with Example</title>
  <style>
    /* Font-family with multiple fallback fonts */
    body {
      font-family: Arial, Helvetica, sans-serif;
    }

    .serif-text {
      font-family: 'Times New Roman', Times, serif;
    }

    .monospace-text {
      font-family: 'Courier New', Courier, monospace;
    }

    .cursive-text {
      font-family: 'Comic Sans MS', cursive, sans-serif;
    }
  </style>
</head>
<body>

  <h1>Font Family with Example</h1>

  <p>This text uses the default <strong>Arial</strong> font (with fallbacks to Helvetica or sans-serif).</p>

  <p class="serif-text">This is serif text, using <strong>Times New Roman</strong>.</p>

  <p class="monospace-text">This is monospace text, using <strong>Courier New</strong>.</p>

  <p class="cursive-text">This is cursive text, using <strong>Comic Sans MS</strong>.</p>

</body>
</html>
0
378
Php Comparison Operators Examples

Php Comparison Operators Examples

1709870648.png
Sakala Code
1 year ago
HTML pre tag

HTML pre tag

1709870648.png
Sakala Code
1 year ago

HTML SVG Graphics element

Because SVG is text-based search engines can crawl the content and screen readers can inte...

1709870648.png
Sakala Code
1 year ago
Php Parameter Function Examples

Php Parameter Function Examples

1709870648.png
Sakala Code
1 year ago
HTML SVG

HTML SVG

1709870648.png
Sakala Code
1 year ago