1. Home
  2. Docs
  3. Web Technology I
  4. Style Sheet Language
  5. Text , Font, Links ,List and Tables

Text , Font, Links ,List and Tables

In CSS, you can style text in various ways using properties such as font-family, font-size, font-weight, font-style, color, text-align, and more. Here are some examples of how you can style text:

Color and Alignment:

  1. Text Color: Use the color property to set the color of the text.
Screenshot 2024 03 05 191244
  1. Text Alignment: Adjust the text-align property to control the alignment of text within an element.
Screenshot 2024 03 05 191312

Text Decoration:

  1. Underline and Overline: Use text-decoration to add or remove underlines and overlines.
Screenshot 2024 03 05 192339
  1. Line Through: Apply a line through the text using text-decoration.
Screenshot 2024 03 05 192352
Screenshot 2024 03 05 194542
Screenshot 2024 03 05 194605
Screenshot 2024 03 05 200034
Screenshot 2024 03 05 200118
This image has an empty alt attribute; its file name is Screenshot-2024-03-05-201053.png
Screenshot 2024 03 05 201120

In CSS, the font property is a shorthand property that allows you to set various font-related properties in a single declaration. The font property can include values for font-style, font-variant, font-weight, font-size, line-height, and font-family. Here’s how you can use the font property:

Basic Usage:

Screenshot 2024 03 05 202406

In this example:

  • normal is for font-style.
  • normal is for font-variant.
  • normal is for font-weight.
  • 16px is for font-size.
  • 1.5 is for line-height.
  • 'Arial', sans-serif is for font-family.

Individual Font Properties:

You can also set each font property individually:

Screenshot 2024 03 05 202809

In this example:

  • font-family sets the font family.
  • font-size sets the font size.
  • font-weight sets the font weight.
  • font-style sets the font style.
  • line-height sets the line height.

Using Google Fonts:

Screenshot 2024 03 05 202904

You can include Google Fonts or other web fonts by adding a link tag in the HTML file and then using the specified font in your CSS.

Screenshot 2024 03 05 202956
Screenshot 2024 03 05 204245
Screenshot 2024 03 05 204405

How can we help?

Leave a Reply

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