<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>id Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/id/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/id/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Wed, 13 Apr 2022 16:34:31 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
	<item>
		<title>Types of Selector in CSS &#038; How to Use CSS Selector in HTML?</title>
		<link>https://www.scmgalaxy.com/tutorials/types-of-selector-in-css-how-to-use-css-selector-in-html/</link>
					<comments>https://www.scmgalaxy.com/tutorials/types-of-selector-in-css-how-to-use-css-selector-in-html/#respond</comments>
		
		<dc:creator><![CDATA[rajeshkumar]]></dc:creator>
		<pubDate>Mon, 02 Aug 2021 12:21:24 +0000</pubDate>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[attribute]]></category>
		<category><![CDATA[combinator]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[element]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[id]]></category>
		<category><![CDATA[pseudo-class]]></category>
		<category><![CDATA[pseudo-element]]></category>
		<category><![CDATA[selector]]></category>
		<category><![CDATA[Simple]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=7248</guid>

					<description><![CDATA[<p>There are five types of Selector in CSS. Simple selectors (select elements based on name, id, class) Combinator selectors (select [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/types-of-selector-in-css-how-to-use-css-selector-in-html/">Types of Selector in CSS &#038; How to Use CSS Selector in HTML?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">There are five types of Selector in CSS. </p>



<ul class="wp-block-list"><li><strong>Simple selectors</strong> (select elements based on name, id, class)</li><li><strong>Combinator selectors</strong> (select elements based on a specific relationship between them)</li><li><strong>Pseudo-class selectors</strong> (select elements based on a certain state)</li><li><strong>Pseudo-elements selectors</strong> (select and style a part of an element)</li><li><strong>Attribute selectors</strong> (select elements based on an attribute or attribute value)</li></ul>



<h3 class="wp-block-heading"><strong>The CSS element Selector</strong>&#8211;</h3>



<ul class="wp-block-list"><li><strong>ID</strong></li><li><strong>Class</strong></li><li><strong>Element</strong></li></ul>



<h3 class="wp-block-heading"><strong>Id Selector</strong>&#8211;</h3>



<pre class="wp-block-code"><code>&lt;html>
	&lt;head>
		&lt;style>
		          #id_selector {
			              color: red; font-size: 60px;
			         }
		&lt;/style>
	&lt;/head>
	&lt;body>
		&lt;p id="id_selector">Hello World!&lt;/p>
		&lt;p>This paragraph is not affected by the style.&lt;/p>
	&lt;/body>
&lt;/html></code></pre>



<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="475" height="243" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-1.png" alt="" class="wp-image-7257" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-1.png 475w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-1-300x153.png 300w" sizes="(max-width: 475px) 100vw, 475px" /></figure>



<h3 class="wp-block-heading"><strong>Class Selector</strong>&#8211;</h3>



<h4 class="wp-block-heading">Universal-</h4>



<pre class="wp-block-code"><code>&lt;html>
	&lt;head>
		&lt;style>
			.red {color: #FF0000; font-size: 60px;}
		&lt;/style> 
	&lt;/head>
	&lt;body>
	            &lt;h2 class="red">I am Heading&lt;/h2>
	            &lt;p class ="red">I am first paragraph&lt;/p>
	            &lt;p>I am second paragraph&lt;/p>
	&lt;/body>
&lt;/html></code></pre>



<figure class="wp-block-image size-large"><img decoding="async" width="648" height="379" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-2.png" alt="" class="wp-image-7262" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-2.png 648w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-2-300x175.png 300w" sizes="(max-width: 648px) 100vw, 648px" /></figure>



<h4 class="wp-block-heading">Element Specific-</h4>



<pre class="wp-block-code"><code>&lt;html>
	&lt;head>
		&lt;style>
			p.red {color: #FF0000; font-size: 60px;}
		&lt;/style> 
	&lt;/head>
	&lt;body>
	            &lt;h2 class="red">I am Heading&lt;/h2>
	            &lt;p class ="red">I am first paragraph&lt;/p>
	            &lt;p>I am second paragraph&lt;/p>
	&lt;/body>
&lt;/html></code></pre>



<figure class="wp-block-image size-large"><img decoding="async" width="661" height="346" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-3.png" alt="" class="wp-image-7263" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-3.png 661w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-3-300x157.png 300w" sizes="(max-width: 661px) 100vw, 661px" /></figure>



<h4 class="wp-block-heading"><strong>Use Two or more class</strong>&#8211;</h4>



<pre class="wp-block-code"><code>&lt;html>
	&lt;head>
		&lt;style>
			p.red {color: #FF0000;}
			p.look{font-size: 60px;}
			.algn{text-align: center;}
		&lt;/style> 
	&lt;/head>
	&lt;body>
	                    &lt;h2 class="algn">I am Heading&lt;/h2>
	                    &lt;p class ="red look">I am first paragraph&lt;/p>
	                    &lt;p class="red algn">I am second paragraph&lt;/p>
	&lt;/body>
&lt;/html></code></pre>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="172" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-4-1024x172.png" alt="" class="wp-image-7264" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-4-1024x172.png 1024w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-4-300x50.png 300w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-4-768x129.png 768w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-4-1536x258.png 1536w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-4.png 1917w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/types-of-selector-in-css-how-to-use-css-selector-in-html/">Types of Selector in CSS &#038; How to Use CSS Selector in HTML?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/types-of-selector-in-css-how-to-use-css-selector-in-html/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
