div {
background-color: lightblue;
}
CSS Properties in Hindi
CSS (Cascading Style Sheets) का उपयोग HTML elements को सुंदर, attractive और responsive बनाने के लिए किया जाता है। नीचे कुछ commonly used CSS properties को Hindi में explain किया गया है:
1. background-color
किसी element के background का रंग set करने के लिए इस property का use किया जाता है।
2. background-image
इससे किसी element के background में image apply की जाती है।
body {
background-image: url('bg.jpg');
}
3. border
Element के चारों ओर एक border create करता है। आप इसकी width, style और color define कर सकते हैं।
p {
border: 2px solid red;
}
4. height और width
Element की ऊँचाई और चौड़ाई set करने के लिए ये properties use होती हैं।
div {
width: 200px;
height: 100px;
}
5. color
Text का रंग बदलने के लिए use होती है।
h1 {
color: darkblue;
}
6. text-align
Text को left, center या right में align करने के लिए इसका उपयोग किया जाता है।
p {
text-align: center;
}
7. font-family
Text के लिए कौन सा font use करना है, यह set किया जाता है।
body {
font-family: Arial, sans-serif;
}
8. font-size
Text का size set करने के लिए use होती है। Units जैसे px, em, rem use होते हैं।
h2 {
font-size: 24px;
}
9. font-style
Text को italic, normal या oblique बनाने के लिए use होती है।
p {
font-style: italic;
}
10. font-weight
Text को bold या light बनाने के लिए use होती है।
strong {
font-weight: bold;
}
11. margin
Element के बाहर की खाली जगह (space) को control करने के लिए margin use होती है।
div {
margin: 20px;
}
12. padding
Element के अंदर की space set करने के लिए padding use की जाती है।
div {
padding: 10px;
}
Note: CSS properties आपके web content को visually appealing और user-friendly बनाती हैं। इनका सही उपयोग website की performance और design दोनों को बेहतर करता है।
Related Questions (FAQ in Hindi)
- CSS और Inline CSS में क्या अंतर है?
emऔरremunits में क्या difference होता है?- CSS में margin collapse क्या होता है?
box-sizingproperty क्या होती है?- Responsive design के लिए कौन-कौन सी CSS properties जरूरी होती हैं?
- क्या हम एक ही element पर multiple CSS properties use कर सकते हैं?