CSS Properties in Hindi
CSS Properties in Hindi
com
2VEQLUM5K4
CSS PROPERTIES
1 Types of CSS
2 Types of Selectors
ajayyadavmamidi@gmail.com
2VEQLUM5K4
3 CSS Color
4 CSS Background
● Priority order
○ Inline > Internal > External
< style>
h1{
color:red;
}
</style>
<h3> Have a great day </h3>
h1{
color:red; //.css file
}
This file is meant for personal use by ajayyadavmamidi@gmail.com only.
Proprietary
Sharingcontent. ©Great Learning.
or publishing All Rights
the contents inReserved. Unauthorized
part or full uselegal
is liable for or distribution
action. prohibited
ajayyadavmamidi@gmail.com
2VEQLUM5K4
Types of Selectors
ajayyadavmamidi@gmail.com
○ Id Selector
2VEQLUM5K4
○ Class Selector
○ Group Selector
○ Universal Selector
● Priority of Selectors
Id > Class > Element
h1
{
ajayyadavmamidi@gmail.com color: red;
2VEQLUM5K4
}
We selected the heading tag and then changed the color property i.e text color to red. Now whatever is
written in this tag (content) will have the text color as red
#unique
ajayyadavmamidi@gmail.com {
2VEQLUM5K4
Color: red;
}
<h1 id=”unique”> Hi </p>
We selected id and then changed the color property i.e text color to red. Now whatever is written in
this tag (content) will have the text color as red
.group
ajayyadavmamidi@gmail.com {
2VEQLUM5K4
Color: red;
}
<h1 class=”group”> Hi </p>
We selected class and then changed the color property i.e text color to red. Now whatever is written in
this tag (content) will have the text color as red
○ RGB
This starts with rgb and takes 3 parameter
ajayyadavmamidi@gmail.com
2VEQLUM5K4 3 parameter basically corresponds to red, green and blue
Value of each parameter may vary from 0 to 255.
Eg: rgb(255,0,0); means color red
○ HEX
Hex code starts with # and comprises of 6 numbers which is further divided into 3 sets
Sets basically corresponds to Red, Green and Blue
A single set value can vary from 00 to ff
Eg: #ff0000 ; means color red
● Background-image
The background-image property is used to set an image as a background of an element. By default the
image covers the entire element.
ajayyadavmamidi@gmail.com
2VEQLUM5K4 ● Background-repeat
By default, the background-image property repeats the background image horizontally and vertically.
Some images are repeated only horizontally or vertically.
● Background-position
The background-position property is used to define the initial position of the background image. By
default, the background image is placed on the top-left of the webpage.
}
</style>
</head>
<body>
<p>This is a fixed background-image. Add more lines and content. Scroll down the page.</p>
<p>This is a fixed background-image. Add more lines and content. Scroll down the page.</p>
<p>This is a fixed background-image. </p>
<p>This is a fixed background-image. <p>
<p>If you do not see any scrollbars, Resize the browser window.</p>
Text Color
The color property is used to set the color of the text.
Text Alignment
The text-align property is used to set the horizontal alignment of a text.
A text can be left or right aligned, centered, or justified.
ajayyadavmamidi@gmail.com
2VEQLUM5K4
Text Decoration
The text-decoration property is used to set or remove decorations from text.
The value text-decoration: none; is often used to remove underlines from links.
Text Transformation
The text-transform property is used to specify uppercase and lowercase letters in a text
CSS Font color: This property is used to change the color of the text. (standalone attribute)
CSS Font family: This property is used to change the face of the font.
CSS Font size: This property is used to increase or decrease the size of the font.
ajayyadavmamidi@gmail.com
2VEQLUM5K4
CSS Font style: This property is used to make the font bold, italic or oblique.
CSS Font variant: This property creates a small-caps effect.
CSS Font weight: This property is used to increase or decrease the boldness and lightness of the font
Font Family:
Serif: Serif fonts include small lines at the end of characters. Example of serif: Times new roman, Georgia etc.
Sans-serif: A sans-serif font doesn't include the small lines at the end of characters. Example of Sans-serif: Arial,
Verdana etc
Font Style:
ajayyadavmamidi@gmail.com
2VEQLUM5K4
The font-style property is mostly used to specify italic text.
This property has three values:
normal - The text is shown normally
italic - The text is shown in italics
oblique - The text is "leaning" (oblique is very similar to italic, but less supported)
Font Size:
The font-size property sets the size of the text. pixel/16 = 1 em.