Properties of CSS ✍🏻

Css properties

 Setting fonts using CSS

 1. Font-family:-  The font-family property is used to change the face of a font.

Syntax:-

<p style="font family:elephant;">India is best.</p>

2. Font-style:-  The font-style property is used to make a font italic or oblique.

Syntax:-

<p style="font-style:italic;">honesty is the best policy</p>

Coding:-



Output is :-


3. Font-variant:-The font-variant property is used to create a small-caps effect.

Syntax:-

<p style="font-variant:small-caps;">

Science Education </p>

Coding:-



Output is :-



4. Font-weight:- The font-weight property is used to increase or decrease how to bold or light a font appears.

Syntax:-

<p style="font-weight:bold;">IICS education</p>

Coding:-



Output is:-



5. Font-size:-The font-size property is used to increase or decrease the size of a font.

Syntax:-

<p style="font-size:35px;">Science Education</p>

Coding :-



Output is :-

Note:- The font property is used as shorthand  to specify a number of other font properties.

Manipulating Text using CSS:-

 1.Text-align property:- The text-align property is used to align the text of a document.

Possible values are: left,right, center, justify.

Syntax:-

<p style="text-align:right;">

This will be right aligned.

</p>

<p style="text-align:center;">

This will be center aligned.

</p>

<p style="text-align:left;">

</p>

Coding :-



Output is:-



2.Text-decoration property:- The text-decoration property is used to underline,overline,and strike through text.

1. The value text-decoration:none; is often used to remove underlined from links;

Syntax:-

<p style="text-decoration: underline;"> This is underline text 

</p>

Coding is:-

<html>

<head>

</head>

<body>

<p style="text-decoration:underline;">

 This is underline text

</p>

<p style="text-decoration:overline;">

 This is underline text </p>

<p style="text-decoration:line-through;">

 This is underline text

 </p>

<p style="text-decoration:none;">

 This is underline text

</p> 

</body>

</html>


Output is:-



3. Text-transform property:-

The text-transform property is used to capitalize text or convert text to uppercase or lowercase letters.

Syntax:-

<p style="text-transform: uppercase;">India is best 

</p>

<p style="text-transform: lowercase;">Science Education 

</p>

<p style="text-transform: capitalize;">IICS INDIA 

</p>

Coding :-



Output is :-



 4.Direction property:- The direction property is used to set the text direction.

Syntax:-

<p style="direction:rtl;"> This text will be rendered from right to left.

</p>

Coding :-



Output is :-



5. Letter-spacing:- The letter-spacing property is used to add or subtract space between the letters that make up a word.

Syntax:-

<p style="letter-spacing:3px;">

Education is best </p>

<p style="letter-spacing:-2px;">

Education is best </p>


Coding :-



Output is:-




6.word-spacing:- The word-spacing property is used to add or subtract space between the words of a sentence.

Syntax:-

<p style="word-spacing:10px;">Hello world </p>

<p style="word-spacing:-5px;">Hello world </p>

Coding:-



Output is:-



7.Text-shadow:- The text-shadow property is used to set the text shadow around a text.

Syntax:-

<p style="text-shadow:5px 5px 6px green;">India is best country.

</p>

Coding:-

<html>

 <head>

<title>

</title>

</head>

<body>

<p style="text-shadow:5px 5px 6px green;">India is best country.</p>  

<p style="text-shadow:0px 0px 6px skyblue;">India is best country.</p>

<p style="text-shadow:-5px -5px 6px yellow;"> India is best country.</p> 

</body>

</html>


Output is:-



8.line-height:- The line-height property is used to specify the space between lines.

Syntax:-

<p style="line-height:0.8;">Hello India </p>

<p style="line-height:10.8;">Hello India </p>

Coding:-



Output is:-




Comments

Popular posts from this blog

Css basic Properties ✍🏻

Basic Html Notes

Advanced Html Notes