<?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>CSS rules Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/css-rules/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Wed, 17 Jan 2018 14:26:11 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>
	<item>
		<title>CSS an attractive approach to describing a web</title>
		<link>https://www.osradar.com/css-attractive-approach-describing-web/</link>
					<comments>https://www.osradar.com/css-attractive-approach-describing-web/#respond</comments>
		
		<dc:creator><![CDATA[Mel K]]></dc:creator>
		<pubDate>Wed, 03 Jan 2018 10:37:26 +0000</pubDate>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[CSS rules]]></category>
		<category><![CDATA[style sheet language' - web pages -the author specified.-Changes to the graphic design- describe the content]]></category>
		<guid isPermaLink="false">http://www.osradar.com/?p=739</guid>

					<description><![CDATA[<p>Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in a markup language. Although most often used to set the visual style of web pages and user interfaces written in HTML and X HTML , the language can be applied to any XML document, including Plain XML, AVG and XUL, [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/css-attractive-approach-describing-web/">CSS an attractive approach to describing a web</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><b>Cascading Style Sheets</b> (<b>CSS</b>) is a <strong>style sheet language</strong> used for describing the <strong>presentation </strong>of a document written in a markup language.<sup id="cite_ref-1" class="reference"></sup> Although most often used to set the visual style of <strong>web pages</strong> and user interfaces written in <strong>HTML</strong> and X HTML , the language can be applied to any XML document, including <strong>Plain XML</strong>, <b>AVG</b> and <strong>XUL</strong>, and is applicable to rendering in Speech, or on other media. Along with HTML and <b>JavaScript</b>, CSS is a cornerstone technology used by most websites to create visually engaging webpages, user interfaces for web applications, and user interfaces for many mobile applications.<sup id="cite_ref-2" class="reference"></sup></p>
<p>CSS is designed primarily to enable the separation of presentation and content, including aspects such as the <strong>layou</strong>t, <strong>colors</strong>, and <strong>fonts</strong>.<sup id="cite_ref-3" class="reference"></sup> This separation can improve content accessibility, provide more flexibility and control in the specification of presentation characteristics, enable multiple HTML pages to share formatting by specifying the relevant CSS in a separate .css file, and reduce complexity and repetition in the structural content.</p>
<p>Separation of formatting and content makes it possible to present the same markup page in different styles for different rendering methods, such as on-screen, in print, by voice (via speech-based browser or <strong>screen reader</strong>), and <strong>Braille-based</strong> tactile devices. It can also display the web page differently depending on the screen size or viewing device. Readers can also specify a different style sheet, such as a CSS file stored on their own computer, to override the one <strong>the author specified.</strong></p>
<p><strong>Changes to the graphic design</strong> of a document (or hundreds of documents) can be applied quickly and easily, by editing a few lines in the CSS file they use, rather than by changing markup in the documents.</p>
<p>The CSS specification describes a priority scheme to determine which style rules apply if more than one rule matches against a particular element. In this so-called <i>cascade</i>, priorities (or <i>weights</i>) are calculated and assigned to rules, so that the results are predictable.</p>
<p><img loading="lazy" class="aligncenter wp-image-913 size-large" src="http://www.osradar.com/wp-content/uploads/2017/12/CSS-interview-questions-1024x533.png" alt="" width="696" height="362" srcset="https://www.osradar.com/wp-content/uploads/2017/12/CSS-interview-questions-1024x533.png 1024w, https://www.osradar.com/wp-content/uploads/2017/12/CSS-interview-questions-300x156.png 300w, https://www.osradar.com/wp-content/uploads/2017/12/CSS-interview-questions-768x400.png 768w, https://www.osradar.com/wp-content/uploads/2017/12/CSS-interview-questions-696x363.png 696w, https://www.osradar.com/wp-content/uploads/2017/12/CSS-interview-questions-1068x556.png 1068w, https://www.osradar.com/wp-content/uploads/2017/12/CSS-interview-questions-806x420.png 806w, https://www.osradar.com/wp-content/uploads/2017/12/CSS-interview-questions.png 1200w" sizes="(max-width: 696px) 100vw, 696px" /></p>
<h2>Why Use CSS?</h2>
<p>CSS is used to define styles for your web pages, including the design, layout and variations in display for different devices and screen sizes.</p>
<h2>CSS Solved a Big Problem</h2>
<p>HTML was NEVER intended to contain tags for formatting a web page!</p>
<p>HTML was created to <strong>describe the content</strong> of a web page, like:</p>
<p>&lt;h1&gt;This is a heading&lt;/h1&gt;</p>
<p>&lt;p&gt;This is a paragraph.&lt;/p&gt;</p>
<p>When tags like &lt;font&gt;, and color attributes were added to the HTML 3.2 specification, it started a nightmare for web developers. Development of large websites, where fonts and color information were added to every single page, became a long and expensive process.</p>
<p>To solve this problem, the World Wide Web Consortium (W3C) created CSS.</p>
<p>CSS removed the style formatting from the HTML page!</p>
<p>&nbsp;</p>
<p><img loading="lazy" class="alignnone wp-image-915 size-full" src="http://www.osradar.com/wp-content/uploads/2017/12/slide_3.jpg" alt="" width="960" height="600" srcset="https://www.osradar.com/wp-content/uploads/2017/12/slide_3.jpg 960w, https://www.osradar.com/wp-content/uploads/2017/12/slide_3-300x188.jpg 300w, https://www.osradar.com/wp-content/uploads/2017/12/slide_3-768x480.jpg 768w, https://www.osradar.com/wp-content/uploads/2017/12/slide_3-696x435.jpg 696w, https://www.osradar.com/wp-content/uploads/2017/12/slide_3-672x420.jpg 672w" sizes="(max-width: 960px) 100vw, 960px" /></p>
<h2>CSS Saves a Lot of Work!</h2>
<p>The style definitions are normally saved in external .css files.</p>
<p>With an external style sheet file, you can change the look of an entire website by changing just one file!</p>
<p><strong>How CSS works!</strong></p>
<p>Web browsers apply <strong>CSS rules</strong> to a document to affect how they are displayed. A CSS rule is formed from:</p>
<ul>
<li>A set of <strong>properties</strong>, which have values set to update how the HTML content is displayed, for example <em>I want my element&#8217;s width to be 50% of its parent element, and its background to be red</em>.</li>
<li>A <strong>Selecto</strong>r, which <em>selects</em> the element(s) you want to apply the updated property values to. For example, <em>I want to apply my CSS rule to all the paragraphs in my HTML document</em>.</li>
</ul>
<p>A set of CSS rules contained within a <b>style sheet</b> determines how a webpage should look. You will learn a lot more about what CSS syntax looks like in the next article of the module — CSS Syntax</p>
<h3 id="A_quick_CSS_example" class="highlight-spanned"><em><strong><span class="highlight-span">A quick CSS example:</span></strong></em></h3>
<h3 id="A_quick_CSS_example" class="highlight-spanned">The above descriptions may or may not have made sense, so let&#8217;s make sure things are clear by presenting a quick example. First of all, let&#8217;s take a simple HTML document, containing an &lt;h1&gt; and a &lt;p&gt;(notice that a style sheet is applied to the HTML using a &lt;link&gt; element):</h3>
<pre class="brush: html line-numbers language-html"><code class=" language-html"><span class="token doctype">&lt;!DOCTYPE html&gt;</span>
<span class="token tag"><span class="token punctuation">&lt;</span>html<span class="token punctuation">&gt;</span></span>
  <span class="token tag"><span class="token punctuation">&lt;</span>head<span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token punctuation">&lt;</span>meta <span class="token attr-name">charset</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>utf-8<span class="token punctuation">"</span></span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token punctuation">&lt;</span>title<span class="token punctuation">&gt;</span></span>My CSS experiment<span class="token tag"><span class="token punctuation">&lt;/</span>title<span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token punctuation">&lt;</span>link <span class="token attr-name">rel</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>stylesheet<span class="token punctuation">"</span></span> <span class="token attr-name">href</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>style.css<span class="token punctuation">"</span></span><span class="token punctuation">&gt;</span></span>
  <span class="token tag"><span class="token punctuation">&lt;/</span>head<span class="token punctuation">&gt;</span></span>
  <span class="token tag"><span class="token punctuation">&lt;</span>body<span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token punctuation">&lt;</span>h1<span class="token punctuation">&gt;</span></span>Hello World!<span class="token tag"><span class="token punctuation">&lt;/</span>h1<span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token punctuation">&lt;</span>p<span class="token punctuation">&gt;</span></span>This is my first CSS example<span class="token tag"><span class="token punctuation">&lt;/</span>p<span class="token punctuation">&gt;</span></span>
  <span class="token tag"><span class="token punctuation">&lt;/</span>body<span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token punctuation">&lt;/</span>html<span class="token punctuation">&gt;</span></span></code></pre>
<p>Now let&#8217;s look at a very simple CSS example containing two rules:</p>
<pre class="brush: css line-numbers language-css"><code class=" language-css"><span class="token selector">h1 </span><span class="token punctuation">{</span>
  <span class="token property">color</span><span class="token punctuation">:</span> blue<span class="token punctuation">;</span>
  <span class="token property">background-color</span><span class="token punctuation">:</span> yellow<span class="token punctuation">;</span>
  <span class="token property">border</span><span class="token punctuation">:</span> <span class="token number">1</span>px solid black<span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token selector">p </span><span class="token punctuation">{</span>
  <span class="token property">color</span><span class="token punctuation">:</span> red<span class="token punctuation">;</span>
<span class="token punctuation">}</span></code></pre>
<p>The first rule starts with an h1 selector, which means that it will apply its property values to the &lt;h1&gt; element. It contains three properties and their values (each property/value pair is called a <strong>declaration</strong>):</p>
<ol>
<li>The first one sets the text color to blue.</li>
<li>The second sets the background color to yellow.</li>
<li>The third one puts a border around the header that is 1 pixel wide, solid (not dotted, or dashed, etc.), and colored black.</li>
</ol>
<p>The second rule starts with a p selector, which means that it will apply its property values to the &lt;p&gt; element. It contains one declaration, which sets the text color to red.</p>
<p>&nbsp;</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/css-attractive-approach-describing-web/">CSS an attractive approach to describing a web</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/css-attractive-approach-describing-web/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
