What is CSS language
Set up your development environment: To start writing CSS, you need a text editor (e.g. Notepad++, Sublime Text) and a web browser (e.g. Google Chrome, Mozilla Firefox).
Create an HTML file: Create a new file and save it with an .html extension. Write some basic HTML code to create a structure for your web page.
Create a CSS file: Create a new file and save it with a .css extension. This file will contain your styles.
Link the HTML and CSS files: In your HTML file, add a link to your CSS file within the
<head>
tag using the following code:
<head>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
- Start writing CSS: In your CSS file, you can define styles for different HTML elements. For example, to change the background color of the
<body>
element to lightgray, you can write the following code:
body {
background-color: lightgray;
}
- Apply styles to HTML elements: To apply styles to specific HTML elements, you need to use selectors. You can use the tag name, class, or id attributes as selectors. For example, to change the color of all
<p>
elements to blue, you can write the following code:
p {
color: blue;
}
- Save and test your files: Save your HTML and CSS files, and then open the HTML file in your web browser to see the styles applied to your web page.
This is a basic overview to get started with CSS. As you continue to learn, you'll discover more advanced concepts such as positioning, layout, animations, and responsive design.
HINDI :
अपना विकास वातावरण सेट करें: CSS लिखना शुरू करने के लिए, आपको एक टेक्स्ट एडिटर (जैसे Notepad++, Sublime Text) और एक वेब ब्राउज़र (जैसे Google Chrome, Mozilla Firefox) की आवश्यकता होगी। एक HTML फाइल बनाएं: एक नई फाइल बनाएं और इसे .html एक्सटेंशन के साथ सेव करें। अपने वेब पेज की संरचना बनाने के लिए कुछ बुनियादी HTML कोड लिखें। CSS फ़ाइल बनाएँ: एक नई फ़ाइल बनाएँ और इसे .css एक्सटेंशन के साथ सहेजें। इस फ़ाइल में आपकी शैलियाँ होंगी। HTML और CSS फाइलों को लिंक करें: अपनी HTML फाइल में, निम्न कोड का उपयोग करके <head> टैग के भीतर अपनी CSS फाइल में एक लिंक जोड़ें: बैशकॉपी कोड <सिर> <लिंक rel="stylesheet" type="text/css" href="style.css"> </head> CSS लिखना शुरू करें: अपनी CSS फ़ाइल में, आप विभिन्न HTML तत्वों के लिए शैलियों को परिभाषित कर सकते हैं। उदाहरण के लिए, <body> तत्व की पृष्ठभूमि का रंग लाइटग्रे में बदलने के लिए, आप निम्न कोड लिख सकते हैं: सीएसएस कॉपी कोड बॉडी {बैकग्राउंड-कलर: लाइटग्रे; } HTML तत्वों पर शैलियाँ लागू करें: विशिष्ट HTML तत्वों पर शैलियाँ लागू करने के लिए, आपको चयनकर्ताओं का उपयोग करने की आवश्यकता है। आप चयनकर्ताओं के रूप में टैग नाम, वर्ग या आईडी विशेषताओं का उपयोग कर सकते हैं। उदाहरण के लिए, सभी <p> तत्वों का रंग नीला करने के लिए, आप निम्न कोड लिख सकते हैं: सीएसएस कॉपी कोड पी {रंग: नीला; } अपनी फ़ाइलों को सहेजें और उनका परीक्षण करें: अपनी HTML और CSS फ़ाइलों को सहेजें, और फिर अपने वेब पेज पर लागू शैलियों को देखने के लिए अपने वेब ब्राउज़र में HTML फ़ाइल खोलें। CSS के साथ आरंभ करने के लिए यह एक बुनियादी अवलोकन है। जैसा कि आप सीखना जारी रखते हैं, आप अधिक उन्नत अवधारणाओं जैसे स्थिति, लेआउट, एनिमेशन और उत्तरदायी डिज़ाइन की खोज करेंगे।
Comments
Post a Comment