<?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>selector Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/selector/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/selector/</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>How does Attribute Selector work in CSS?</title>
		<link>https://www.scmgalaxy.com/tutorials/how-does-attribute-selector-work-in-css/</link>
					<comments>https://www.scmgalaxy.com/tutorials/how-does-attribute-selector-work-in-css/#respond</comments>
		
		<dc:creator><![CDATA[rajeshkumar]]></dc:creator>
		<pubDate>Tue, 10 Aug 2021 13:05:17 +0000</pubDate>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[attribute]]></category>
		<category><![CDATA[element]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[selector]]></category>
		<category><![CDATA[style]]></category>
		<category><![CDATA[Work]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=7753</guid>

					<description><![CDATA[<p>We can set style using attribute or its value. Set Style using attribute : &#8211; Syntax: &#8211; Selector [attribute] { [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/how-does-attribute-selector-work-in-css/">How does Attribute Selector work in CSS?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">We can set style using attribute or its value.</p>



<h3 class="wp-block-heading"><strong>Set Style using attribute : &#8211;</strong></h3>



<p class="wp-block-paragraph"><strong>Syntax: &#8211;</strong></p>



<p class="wp-block-paragraph">Selector [attribute] { CSS ;}</p>



<p class="wp-block-paragraph"><strong>Ex: &#8211;</strong></p>



<p class="wp-block-paragraph">div [id] { color: red; }</p>



<h3 class="wp-block-heading">Set style using attribute and its value: &#8211;</h3>



<p class="wp-block-paragraph"><strong>Syntax: &#8211;</strong></p>



<p class="wp-block-paragraph">Selector [attribute = “value”] {  CSS  }</p>



<p class="wp-block-paragraph"><strong>Ex: &#8211;</strong></p>



<p class="wp-block-paragraph">div[id=“data”] { color: red; }</p>



<h3 class="wp-block-heading">Set Style using an attribute value containing a specified word.</h3>



<p class="wp-block-paragraph"><strong>Syntax: &#8211;</strong></p>



<p class="wp-block-paragraph">[attribute <strong>~=</strong> “value”] { CSS }</p>



<p class="wp-block-paragraph"><strong>Ex:-</strong></p>



<p class="wp-block-paragraph">[class <strong>~=</strong> “game”] { color: red; }</p>



<div class="game">game</div>
<div class="supergame">supergame</div>
<div class="game-super">game-super</div>
<div class="gamesuper">gamesuper</div>
<div class="super-game">super-game</div>
<div class="game super">game super</div>
<div class="super game">super game</div>



<h3 class="wp-block-heading">Set Style using with the specified attribute starting with the specified value.</h3>



<p class="wp-block-paragraph"><strong>Syntax: &#8211;</strong></p>



<p class="wp-block-paragraph">[attribute <strong>|=</strong> “value”] { CSS }</p>



<p class="wp-block-paragraph"><strong>Ex:-</strong></p>



<p class="wp-block-paragraph">[class <strong>|=</strong> “game”] {color: red;}</p>



<p class="wp-block-paragraph">The value must be a whole word.</p>



<p class="wp-block-paragraph"><strong>Ex: &#8211;</strong></p>



<p class="wp-block-paragraph">“game” or “game-super”</p>



<div class="game">game</div>
<div class="supergame">supergame</div>
<div class="game-super">game-super</div>
<div class="gamesuper">gamesuper</div>
<div class="super-game">super-game</div>
<div class="game super">game super</div>
<div class="super game">super game</div>



<h3 class="wp-block-heading">Set Style whose attribute value begins with a specified value.</h3>



<p class="wp-block-paragraph"><strong>Syntax: &#8211;</strong></p>



<p class="wp-block-paragraph">[attribute <strong>^=</strong> “value”] { CSS }</p>



<p class="wp-block-paragraph"><strong>Ex:-</strong></p>



<p class="wp-block-paragraph">[class <strong>^=</strong> “game”] {color: red;}</p>



<div class="game">game</div>
<div class="supergame">supergame</div>
<div class="game-super">game-super</div>
<div class="gamesuper">gamesuper</div>
<div class="super-game">super-game</div>
<div class="game super">game super</div>
<div class="super game">super game</div>



<p class="wp-block-paragraph">It is not necessary that the value should be a whole word.</p>



<h3 class="wp-block-heading">Set Style whose attribute value ends with a specified value.</h3>



<p class="wp-block-paragraph"><strong>Syntax: &#8211;</strong></p>



<p class="wp-block-paragraph">[attribute <strong>$=</strong> “value”] { CSS }</p>



<p class="wp-block-paragraph"><strong>Ex:-</strong></p>



<p class="wp-block-paragraph">[class <strong>$=</strong> “game”] {color: red;}</p>



<div class="game">game</div>
<div class="supergame">supergame</div>
<div class="game-super">game-super</div>
<div class="gamesuper">gamesuper</div>
<div class="super-game">super-game</div>
<div class="game super">game super</div>
<div class="super game">super game</div>



<p class="wp-block-paragraph">It is not necessary that the value should be a whole word.</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/how-does-attribute-selector-work-in-css/">How does Attribute Selector work in CSS?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/how-does-attribute-selector-work-in-css/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Use child-selector in CSS?</title>
		<link>https://www.scmgalaxy.com/tutorials/how-to-use-child-selector-in-css/</link>
					<comments>https://www.scmgalaxy.com/tutorials/how-to-use-child-selector-in-css/#respond</comments>
		
		<dc:creator><![CDATA[rajeshkumar]]></dc:creator>
		<pubDate>Mon, 02 Aug 2021 12:44:20 +0000</pubDate>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[:first-child]]></category>
		<category><![CDATA[:last-child]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[selector]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=7282</guid>

					<description><![CDATA[<p>first-child- This will set CSS rule to every first element of selector which is someone’s child.  last-child- This will set [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/how-to-use-child-selector-in-css/">How to Use child-selector in CSS?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">first-child-</h2>



<p class="wp-block-paragraph">This will set CSS rule to every first element of selector which is someone’s child. </p>



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



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



<h2 class="wp-block-heading">last-child-</h2>



<p class="wp-block-paragraph">This will set CSS rule to every last element of selector which is someone’s child. </p>



<figure class="wp-block-image"><img decoding="async" src="https://i.stack.imgur.com/WmWgT.png" alt=""/></figure>



<h2 class="wp-block-heading">first-of-type-</h2>



<p class="wp-block-paragraph">This will set CSS rule to every first selector type of element.</p>



<h2 class="wp-block-heading">last-of-type-</h2>



<p class="wp-block-paragraph">This will set CSS rule to every last selector type of element.</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/how-to-use-child-selector-in-css/">How to Use child-selector in CSS?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/how-to-use-child-selector-in-css/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<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 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 loading="lazy" 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="auto, (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 loading="lazy" 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="auto, (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>
