Fonts and Text Styling

<!DOCTYPE html>
<html>
<head>
  <style>
p {
  font-family: Arial, sans-serif; /* Sets font type */
  font-size: 18px; /* Controls text size */
  font-weight: bold; /* Makes text bold */
  text-align: center; /* Aligns text in the middle */
}
</style> </head> <body> <p>Styled Text Example</p> </body> </html>

Explanation:

  • font-family: changes font style.
  • font-size: controls text size.
  • font-weight: bold, normal, light.
  • text-align: left, right, center, justify.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *