0% found this document useful (0 votes)
75 views

css class 7

Uploaded by

gaurav887721
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
75 views

css class 7

Uploaded by

gaurav887721
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

1.

In-Line Style:

This method applies styles directly to HTML elements using the style attribute.

Example:

<p style=”color: red;”>This is red text.</p>

Tip: It’s not efficient for large projects because styles must be repeated.

2. Text Properties:

Text Align: Aligns text (left, right, center, justify).

Text Decoration: Adds decorations like underline, overline, and line-through.

Color: Changes the text color.

Text Transform: Alters the text case (uppercase, lowercase, capitalize).

Text Shadow: Adds shadow effects to text.

3. Font Properties:

Controls the appearance of the text using various properties:

Font Family: Defines the typeface (e.g., Arial, Times New Roman).

Font Size: Adjusts the size of the text.

Font Style: Sets the style (normal, italic, oblique).

Font Weight: Changes the thickness (boldness) of the text.

4. Margin Properties:

Controls the space around HTML elements.

Syntax: margin-top, margin-right, margin-bottom, margin-left.

Can be set using length units (px, em) or percentages.

5. Border Properties:

Defines the border style, width, and color of elements.

Border Style: Can be solid, dotted, dashed, double, groove, ridge, inset, outset, etc.

Border Width: Specifies the thickness (thin, medium, thick).

Border Color: Sets the border color using color names, RGB, or hexadecimal values.

You might also like