<?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>class attribute in html Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/class-attribute-in-html/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/class-attribute-in-html/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Fri, 13 Aug 2021 09:52:49 +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>HTML: Class Attribute</title>
		<link>https://www.scmgalaxy.com/tutorials/html-class-attribute/</link>
					<comments>https://www.scmgalaxy.com/tutorials/html-class-attribute/#respond</comments>
		
		<dc:creator><![CDATA[vikashdev k]]></dc:creator>
		<pubDate>Fri, 13 Aug 2021 09:52:47 +0000</pubDate>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[class attribute in html]]></category>
		<category><![CDATA[Guide]]></category>
		<category><![CDATA[How]]></category>
		<category><![CDATA[html tag]]></category>
		<category><![CDATA[multiple attribute in class in html]]></category>
		<category><![CDATA[Process]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=7908</guid>

					<description><![CDATA[<p>The HTML class attribute makes it possible to define equal styles for elements with the same class name. The class [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/html-class-attribute/">HTML: Class Attribute</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">The HTML class attribute makes it possible to define equal styles for elements with the same class name. The class attribute specifies one or more class names for an element.                                                                                            The class attribute is mostly used to point to a class in a style sheet. However, it can also be used by JavaScript (via the HTML DOM) to make changes to HTML elements with a specified class.</p>



<p class="wp-block-paragraph">In HTML5, the class attribute can be used on any HTML element. </p>



<h2 class="wp-block-heading">Rules</h2>



<ul class="wp-block-list"><li>Must begin with a letter A-Z or a-z.</li><li>A class name cannot start with a number.</li><li>Must not contain any space characters.</li><li>Can be followed by: letters (A-Za-z), digits (0-9), hyphens (&#8220;-&#8220;), and underscores (&#8220;_&#8221;).</li><li>In HTML, all values are case-insensitive.</li></ul>



<pre class="wp-block-code"><code>&lt;html>
	&lt;head>
		&lt;title>class tag&lt;/title>
		&lt;style>
			.red {color: #FF0000; font-size: 60px;}
		&lt;/style> 
	&lt;/head>
	&lt;body>
	&lt;h2 class=red> Heading line &lt;/h2>
	&lt;p class =red>1st paragraph line&lt;/p>
	&lt;p> paragraph tag &lt;/p>
	&lt;/body>
&lt;/html>
</code></pre>



<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="1024" height="576" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/class_use-1024x576.png" alt="" class="wp-image-7909" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/class_use-1024x576.png 1024w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/class_use-300x169.png 300w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/class_use-768x432.png 768w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/class_use-1536x864.png 1536w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/class_use.png 1920w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h2 class="wp-block-heading"><strong>More than one class name</strong></h2>



<p class="wp-block-paragraph">To specify multiple classes, separate the class names with a space. This allows you to combine several CSS classes for one HTML element.                                                                                                                                                    Syntax:-                                                                                                                                                                class=“class_name1 class_name2 class_nameN”                                                                                                                Ex:-                                                                                                                                                                                       &lt;p class =“red look”>I am first paragraph&lt;/p></p>



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



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="576" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/class-name-twice-1024x576.png" alt="" class="wp-image-7910" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/class-name-twice-1024x576.png 1024w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/class-name-twice-300x169.png 300w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/class-name-twice-768x432.png 768w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/class-name-twice-1536x864.png 1536w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/class-name-twice.png 1920w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/html-class-attribute/">HTML: Class Attribute</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/html-class-attribute/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
