HTML स्टाइल प्रॉपर्टी का इस्तेमाल किसी एलीमेंट पर स्टाइल लागू करने के लिए किया जाता है, जैसे कि रंग, फ़ॉन्ट, आकार, और बहुत कुछ।
HTML शैली विशेषता
HTML तत्व की शैली सेट करना, शैली विशेषता के साथ किया जा सकता है।
HTML शैली विशेषता में निम्नलिखित सिंटैक्स है:
<tagname style="property:valuexyz;">
The property in question is a CSS property. The value is a CSS property.
CSS will be covered in greater detail later in this session.
Color of the Background
The CSS background-color property specifies the colour of an HTML element's background.
Background color Example
Set a page's background colour to Red:
body background-color:red;" style="background-color:red;">
This is a heading.
</h1>
<p>
This is a sentence.
</p>
</body>
Text color Example
Set the background color for two different elements:
<body>
<h1 style="background-color:black;">This is a sentence</h1>
<p style="background-color:tomato;">This is a sentence</p>
</body>
Text Color
CSS रंग गुण HTML तत्व के लिए टेक्स्ट रंग को परिभाषित करता है:
उदाहरण
<h1 style="color:blue;">यह एक वाक्य है</h1>
<p style="color:red;">यह एक वाक्य है</p>
Font Type example
CSS फ़ॉन्ट-पारिवारिक गुण HTML तत्व के लिए उपयोग किए जाने वाले फ़ॉन्ट को परिभाषित करता है:
उदाहरण
<h1 style="font-family:Geogia;">यह एक वाक्य है</h1>
<p style="font-family:Times;">यह एक वाक्य है</p>
Text Size example
The CSS font-size attribute specifies the size of text for an HTML element:
Example
<h1 style="font-size:500%;">This is a main heading</h1>
<p style="font-size:200%;">This is a sentence.</p>
HTML Alignment Example
CSS टेक्स्ट-एलाइन प्रॉपर्टी HTML एलिमेंट के लिए हॉरिजॉन्टल टेक्स्ट अलाइनमेंट को परिभाषित करती है:
उदाहरण
<h1 style="text-align:center;">आई लव यू</h1>
<p style="text-align:center;">मुझे अपने परिवार से प्यार है</p>
Comments
Post a Comment