In HTML, the <font> tag was historically used to define the font, color, and size of text. However, the <font> tag has been deprecated in HTML5, and it's no longer recommended for use. Instead, styling is generally achieved using CSS (Cascading Style Sheets).
Here's an example of how text styling is done using CSS:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>HTML Font Example</title>
    <style>
        body {
            font-family: Arial, sans-serif; /* Specify the font family */
            font-size: 16px; /* Specify the font size */
            color: #333; /* Specify the text color */
        }
    </style>
</head>
<body>

    <p>This is a paragraph with custom font, size, and color.</p>

</body>
</html>

In this example:

  • The <style> tag is used to define the CSS styles within the HTML document.
  • The font-family property sets the font family (in this case, Arial and sans-serif as a fallback).
  • The font-size property sets the font size.
  • The color property sets the text color.

Here's an example of inline styles:

<p style="font-family: Arial, sans-serif; font-size: 16px; color: #333;">This is another styled paragraph.</p>

And an example with a class:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>HTML Font Example</title>
    <style>
        .custom-text {
            font-family: Arial, sans-serif;
            font-size: 16px;
            color: #333;
        }
    </style>
</head>
<body>

    <p class="custom-text">This paragraph uses a custom class for styling.</p>

</body>
</html>

In modern web development, it's recommended to use CSS for styling to achieve a more maintainable and flexible code structure.