Brand Logo

Website Coding Portal
HTML CSS & Script

Sawami Vivekanand
code
external CSS File

✯ जैसा की हमने CSS के Introduction पेज में बताया की CSS को हम HTML फाइल में 3 तरीकों से शामिल कर सकते हैं । जिस HTML फाइल के अंदर external CSS का इस्तेमाल किया जाता हैं उससे HTML फ़ाइल के आकार क्षमता को घटाया जा सकता हैं ।

As we told in the Introduction page of CSS that we can include CSS in HTML file in 3 ways. The size of the HTML file can be reduced by using external CSS inside the HTML file.

✯ external css फाइल के इस्तेमाल के लिए एक CSS फाइल होना आवश्यक है जिसका extension नाम .css होना हैं । इस फाइल में केवल स्टाइल सम्बन्धी सीएसएस कोड का इस्तेमाल किया जाता हैं ।

For using external css file, it is necessary to have a css file whose extension name is .css. Only styling related CSS code is used in this file.

✯ HTML में इंटरनल CSS का इस्तेमाल करने के लिए स्टाइल टैग को स्टार्ट और क्लोज करना आवश्यक हैं लेकिन अलग से निर्मित इस CSS फ़ाइल के कोड को लिखने से पूर्व स्टाइल टैग का इस्तेमाल नहीं करना होता हैं । नियमानुसार External CSS फ़ाइल को HTML के head टैग के मध्य में लिंक किया जाता हैं ।

To use internal CSS in HTML, it is necessary to start and close the style tag, but the style tag does not have to be used before writing the code of this separately created CSS file. As a rule, the external CSS file is linked in the middle of the head tag of HTML.

✧ Link External CSS File ✧

✧ External CSS File (mystyle.css) ✧

✧ परिणाम ✧

<link> क्या है ?

✯ किसी भी बाहरी फ़ाइल को HTML फ़ाइल में शामिल करने के लिए लिंक टैग का इस्तेमाल किया जाता हैं । इन फ़ाइलों में सीएसएस या जावास्क्रिप्ट फाइल हो सकती हैं । लिंक टैग स्वतंत्र रूप से किसी फ़ाइल को लिंक नहीं कर सकता हैं इसके लिए इस टैग के साथ में कुछ एट्रीब्यूट का इस्तेमाल होता हैं ।

The link tag is used to include any external file in the HTML file. These files can contain CSS or JavaScript files. The link tag cannot independently link a file, for this some attributes are used along with this tag.

rel="stylesheet" क्या है ?

✯ Relationship लिंक टैग का एक एट्रीब्यूट हैं जो फ़ाइल के HTML फ़ाइल के साथ बनने वाले संबंध को निर्दिष्ट करता हैं । CSS फ़ाइल के लिए stylesheet वैल्यू का इस्तेमाल किया जाता हैं । इस एट्रीब्यूट को शार्ट रूप में लिंक टैग के अंदर rel के रूप में लिखा जाता हैं ।

Relationship is an attribute of the link tag that specifies the relationship of the file with the HTML file. The stylesheet value is used for the CSS file. This attribute is written in short form as rel inside the link tag.

type="text/css" क्या है ?

✯ यह एट्रीब्यूट फ़ाइल के प्रकार को निर्दिष्ट करता हैं की जो फाइल लिंक की जा रही हैं वो किस प्रकार की फ़ाइल हैं ।

href=" " क्या है ?

✯ लिंक टैग के href एट्रीब्यूट में उस फ़ाइल की लोकेशन को फाइल के नाम सहित दर्ज किया जाता हैं, जिस फ़ाइल को HTML फ़ाइल में लिंक करना चाहते हैं ।