 
    
<?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>how to Archives - Complete, Concrete, Concise</title>
	<atom:link href="https://complete-concrete-concise.com/tag/how-to/feed/" rel="self" type="application/rss+xml" />
	<link>https://complete-concrete-concise.com/tag/how-to/</link>
	<description>Practical Information Without The Bloat</description>
	<lastBuildDate>Sat, 18 Mar 2023 19:55:18 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>
	<item>
		<title>CSS &#8211; Understanding Inheritance and Default Values</title>
		<link>https://complete-concrete-concise.com/tutorials/webdev/front-end-basics/css-understanding-inheritance-and-default-values/</link>
		
		<dc:creator><![CDATA[richardsplanet]]></dc:creator>
		<pubDate>Fri, 22 Mar 2019 19:59:11 +0000</pubDate>
				<category><![CDATA[Front-End Basics]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[css default values]]></category>
		<category><![CDATA[css inheritance]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[understanding]]></category>
		<guid isPermaLink="false">https://complete-concrete-concise.com/?p=3801</guid>

					<description><![CDATA[<p>Learn which CSS properties child elements inherit from their parents and what their default values are.</p>
<p>The post <a href="https://complete-concrete-concise.com/tutorials/webdev/front-end-basics/css-understanding-inheritance-and-default-values/">CSS &#8211; Understanding Inheritance and Default Values</a> appeared first on <a href="https://complete-concrete-concise.com">Complete, Concrete, Concise</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="preamble">
<p>You’ve implicitly encountered inheritance and default values while working with CSS.</p>
</div>
<h2 id="contents">Contents</h2>
<ol class="incremental" type="1">
<li><a href="#inheritance">Inheritance</a></li>
<li><a href="#default-values">Default Values</a></li>
<li><a href="#table-of-inheritance-and-default-values">Table of Inheritance and Default Values</a></li>
<li><a href="#the-inherit-value">The ‘inherit’ Value</a></li>
<li><a href="#the-default-value">The ‘default’ Value</a></li>
<li><a href="#final-words">Final Words</a></li>
<li><a href="#references">References</a></li>
</ol>
<h2 id="inheritance">Inheritance</h2>
<p>When working with CSS, you probably noticed that styling like this:</p>
<div id="cb1" class="sourceCode">
<pre class="sourceCode css"><code class="sourceCode css"><a id="cb1-1" class="sourceLine" title="1"></a><span class="fu">.important</span> {
<a id="cb1-2" class="sourceLine" title="2"></a>  <span class="kw">font-size</span>: <span class="dv">32</span><span class="dt">px</span><span class="op">;</span>
<a id="cb1-3" class="sourceLine" title="3"></a>}</code></pre>
</div>
<p>When applied to HTML like this:</p>
<div id="cb2" class="sourceCode">
<pre class="sourceCode html"><code class="sourceCode html"><a id="cb2-1" class="sourceLine" title="1"></a><span class="kw">&lt;div</span><span class="ot"> class=</span><span class="st">"important"</span><span class="kw">&gt;</span>
<a id="cb2-2" class="sourceLine" title="2"></a>  <span class="kw">&lt;p&gt;</span>This is important!<span class="kw">&lt;/p&gt;</span>
<a id="cb2-3" class="sourceLine" title="3"></a><span class="kw">&lt;/div&gt;</span></code></pre>
</div>
<p>Results in output that looks like this:</p>
<div class="html-output">
<style>
  .x1-css-inheritance-important {
    font-size:32px;
  }
</style>
<div class="x1-css-inheritance-important">
<p>This is important!</p>
</div>
</div>
<p>This is because the <span class="html-tag">p</span> element <strong>inherits</strong> the <span class="css-property">font-size</span> property applied to its parent <span class="html-tag">div</span>.</p>
<p>Not all properties are inherited by child elements.</p>
<p>Consider the following CSS:</p>
<div id="cb3" class="sourceCode">
<pre class="sourceCode css"><code class="sourceCode css"><a id="cb3-1" class="sourceLine" title="1"></a><span class="fu">.important</span> {
<a id="cb3-2" class="sourceLine" title="2"></a>  <span class="kw">border</span>: <span class="dv">1</span><span class="dt">px</span> <span class="cn">red</span> <span class="dv">solid</span><span class="op">;</span>
<a id="cb3-3" class="sourceLine" title="3"></a>}</code></pre>
</div>
<p>When applied to the following HTML:</p>
<div id="cb4" class="sourceCode">
<pre class="sourceCode html"><code class="sourceCode html"><a id="cb4-1" class="sourceLine" title="1"></a><span class="kw">&lt;div</span><span class="ot"> class=</span><span class="st">"important"</span><span class="kw">&gt;</span>
<a id="cb4-2" class="sourceLine" title="2"></a>  <span class="kw">&lt;p&gt;</span>This is important!<span class="kw">&lt;/p&gt;</span>
<a id="cb4-3" class="sourceLine" title="3"></a><span class="kw">&lt;/div&gt;</span></code></pre>
</div>
<p>Results in the <span class="css-property">border</span> only applied to the <span class="html-tag">div</span> element and not the <span class="html-tag">p</span> element:</p>
<div class="html-output">
<style>
  .x2-css-inheritance-important {
    border:1px solid red;
  }
</style>
<div class="x2-css-inheritance-important">
<p>This is important!</p>
</div>
</div>
<p>If the <span class="html-tag">p</span> tag inherited the border property from the parent <span class="html-tag">div</span> tag, it would have looked like this:</p>
<div class="html-output">
<style>
  .x2-css-inheritance-important {
    border:1px solid red;
  }
</style>
<div class="x2-css-inheritance-important">
<p class="x2-css-inheritance-important">This is important!</p>
</div>
</div>
<p>Which is, probably, not what you want.</p>
<h2 id="default-values">Default Values</h2>
<p>When you write some HTML like:</p>
<div id="cb5" class="sourceCode">
<pre class="sourceCode html"><code class="sourceCode html"><a id="cb5-1" class="sourceLine" title="1"></a><span class="dt">&lt;!DOCTYPE </span>HTML<span class="dt">&gt;</span>
<a id="cb5-2" class="sourceLine" title="2"></a><span class="kw">&lt;html&gt;</span>
<a id="cb5-3" class="sourceLine" title="3"></a>  <span class="kw">&lt;head&gt;</span>
<a id="cb5-4" class="sourceLine" title="4"></a>    <span class="kw">&lt;title&gt;</span>Hello World<span class="kw">&lt;/title&gt;</span>
<a id="cb5-5" class="sourceLine" title="5"></a>    <span class="kw">&lt;meta</span><span class="ot"> charset=</span><span class="st">"utf-8"</span>  <span class="kw">/&gt;</span>
<a id="cb5-6" class="sourceLine" title="6"></a>  <span class="kw">&lt;/head&gt;</span>
<a id="cb5-7" class="sourceLine" title="7"></a>  <span class="kw">&lt;body&gt;</span>
<a id="cb5-8" class="sourceLine" title="8"></a>    <span class="kw">&lt;p&gt;</span>Hello World!<span class="kw">&lt;/p&gt;</span>
<a id="cb5-9" class="sourceLine" title="9"></a>  <span class="kw">&lt;/body&gt;</span>
<a id="cb5-10" class="sourceLine" title="10"></a><span class="kw">&lt;/html&gt;</span></code></pre>
</div>
<p>You see <strong>Hello World!</strong> displayed in the browser.</p>
<p>It is very likely that the font will be <strong>serif</strong> or <strong>sans serif</strong>, it will be 16px in size, the text will be <span class="css-value">black</span> on a <span class="css-value">white</span> background, and there is no border &#8211; and you didn’t have to style anything.</p>
<p>This is because every CSS property has a default value. The default value may be changed through inheritance or when you explicitly set the value.</p>
<h2 id="table-of-inheritance-and-default-values">Table of Inheritance and Default Values</h2>
<p>The following table shows which CSS properties (that we’ve seen) are inherited by child elements from their parents.</p>
<p>It also shows the default values for those CSS properties.</p>
<div class="p-note">
<p>Browser implementations sometimes set values other than what is defined in the CSS specification. Footnotes are given for many of the values and any alternate values given should be regarded as informative rather than absolute.</p>
</div>
<table style="margin-right: auto;">
<thead>
<tr class="header">
<th style="text-align: left;">CSS Property</th>
<th>Inherited</th>
<th>Default Value</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;"><span class="css-property">color</span></td>
<td><span class="green-text">Yes</span></td>
<td>Depends on the browser (usually <span class="css-value">black</span>)<a id="fnref1" class="footnote-ref" href="#fn1"><sup>1</sup></a></td>
</tr>
<tr class="even">
<td style="text-align: left;"><span class="css-property" style="white-space: nowrap;">background-color</span></td>
<td><span class="red-text">No</span></td>
<td><span class="css-value">transparent</span><a id="fnref2" class="footnote-ref" href="#fn2"><sup>2</sup></a></td>
</tr>
<tr class="odd">
<td style="text-align: left;"><span class="css-property">padding</span></td>
<td><span class="red-text">No</span></td>
<td>See the individual properties</td>
</tr>
<tr class="even">
<td style="text-align: left;"><span class="css-property">padding-left</span></td>
<td><span class="red-text">No</span></td>
<td><span class="css-value">0</span><a id="fnref3" class="footnote-ref" href="#fn3"><sup>3</sup></a></td>
</tr>
<tr class="odd">
<td style="text-align: left;"><span class="css-property">padding-right</span></td>
<td><span class="red-text">No</span></td>
<td><span class="css-value">0</span><a id="fnref4" class="footnote-ref" href="#fn4"><sup>4</sup></a></td>
</tr>
<tr class="even">
<td style="text-align: left;"><span class="css-property">padding-top</span></td>
<td><span class="red-text">No</span></td>
<td><span class="css-value">0</span><a id="fnref5" class="footnote-ref" href="#fn5"><sup>5</sup></a></td>
</tr>
<tr class="odd">
<td style="text-align: left;"><span class="css-property">padding-bottom</span></td>
<td><span class="red-text">No</span></td>
<td><span class="css-value">0</span><a id="fnref6" class="footnote-ref" href="#fn6"><sup>6</sup></a></td>
</tr>
<tr class="even">
<td style="text-align: left;"><span class="css-property">margin</span></td>
<td><span class="red-text">No</span></td>
<td>See the individual properties</td>
</tr>
<tr class="odd">
<td style="text-align: left;"><span class="css-property">margin-left</span></td>
<td><span class="red-text">No</span></td>
<td><span class="css-value">0</span><a id="fnref7" class="footnote-ref" href="#fn7"><sup>7</sup></a></td>
</tr>
<tr class="even">
<td style="text-align: left;"><span class="css-property">margin-right</span></td>
<td><span class="red-text">No</span></td>
<td><span class="css-value">0</span><a id="fnref8" class="footnote-ref" href="#fn8"><sup>8</sup></a></td>
</tr>
<tr class="odd">
<td style="text-align: left;"><span class="css-property">margin-top</span></td>
<td><span class="red-text">No</span></td>
<td><span class="css-value">0</span><a id="fnref9" class="footnote-ref" href="#fn9"><sup>9</sup></a></td>
</tr>
<tr class="even">
<td style="text-align: left;"><span class="css-property">margin-bottom</span></td>
<td><span class="red-text">No</span></td>
<td><span class="css-value">0</span><a id="fnref10" class="footnote-ref" href="#fn10"><sup>10</sup></a></td>
</tr>
<tr class="odd">
<td style="text-align: left;"><span class="css-property">border</span></td>
<td><span class="red-text">No</span></td>
<td>The border is <span class="css-value">transparent</span> and has a style of <span class="css-value">none</span></td>
</tr>
<tr class="even">
<td style="text-align: left;"><span class="css-property">display</span></td>
<td><span class="red-text">No</span></td>
<td>Depends on the HTML element, but the most common are <span class="css-value">inline</span> and <span class="css-value">block</span><a id="fnref11" class="footnote-ref" href="#fn11"><sup>11</sup></a>.</td>
</tr>
<tr class="odd">
<td style="text-align: left;"><span class="css-property">width</span></td>
<td><span class="red-text">No</span></td>
<td><span class="css-value">auto</span></td>
</tr>
<tr class="even">
<td style="text-align: left;"><span class="css-property">height</span></td>
<td><span class="red-text">No</span></td>
<td><span class="css-value">auto</span></td>
</tr>
<tr class="odd">
<td style="text-align: left;"><span class="css-property">box-sizing</span></td>
<td><span class="red-text">No</span></td>
<td><span class="css-value">content-box</span></td>
</tr>
<tr class="even">
<td style="text-align: left;"><span class="css-property">font-size</span></td>
<td><span class="green-text">Yes</span></td>
<td><span class="css-value">medium</span> (<em>usually</em> 16px)<a id="fnref12" class="footnote-ref" href="#fn12"><sup>12</sup></a></td>
</tr>
<tr class="odd">
<td style="text-align: left;"><span class="css-property">font-family</span></td>
<td><span class="green-text">Yes</span></td>
<td>Depends on the browser</td>
</tr>
<tr class="even">
<td style="text-align: left;"><span class="css-property">font-weight</span></td>
<td><span class="green-text">Yes</span></td>
<td><span class="css-value">normal</span><a id="fnref13" class="footnote-ref" href="#fn13"><sup>13</sup></a></td>
</tr>
<tr class="odd">
<td style="text-align: left;"><span class="css-property">font-style</span></td>
<td><span class="green-text">Yes</span></td>
<td><span class="css-value">normal</span><a id="fnref14" class="footnote-ref" href="#fn14"><sup>14</sup></a></td>
</tr>
<tr class="even">
<td style="text-align: left;"><span class="css-property">line-height</span></td>
<td><span class="red-text">No</span></td>
<td><span class="css-value">normal</span></td>
</tr>
<tr class="odd">
<td style="text-align: left;"><span class="css-property">text-align</span></td>
<td><span class="red-text">No</span></td>
<td>A <strong>nameless value</strong> that acts as ‘left’ if the text direction is left-to-right and ‘right’ if ‘direction’ is right-to-left.</td>
</tr>
<tr class="even">
<td style="text-align: left;"><span class="css-property">float</span></td>
<td><span class="red-text">No</span></td>
<td><span class="css-value">none</span></td>
</tr>
<tr class="odd">
<td style="text-align: left;"><span class="css-property">clear</span></td>
<td><span class="red-text">No</span></td>
<td><span class="css-value">none</span></td>
</tr>
<tr class="even">
<td style="text-align: left;"><span class="css-property">content</span></td>
<td><span class="red-text">No</span></td>
<td><span class="css-value">normal</span></td>
</tr>
</tbody>
</table>
<h2 id="the-inherit-value">The ‘inherit’ Value</h2>
<p>You can force a child element to inherit its parent’s property by using the CSS value <span class="css-value">inherit</span>:</p>
<div id="cb6" class="sourceCode">
<pre class="sourceCode css"><code class="sourceCode css"><a id="cb6-1" class="sourceLine" title="1"></a><span class="fu">.important</span> {
<a id="cb6-2" class="sourceLine" title="2"></a>  <span class="kw">border</span>: <span class="dv">1</span><span class="dt">px</span> <span class="cn">red</span> <span class="dv">solid</span><span class="op">;</span>
<a id="cb6-3" class="sourceLine" title="3"></a>}
<a id="cb6-4" class="sourceLine" title="4"></a>
<a id="cb6-5" class="sourceLine" title="5"></a><span class="fu">.what-will-this-do</span> {
<a id="cb6-6" class="sourceLine" title="6"></a>  <span class="kw">border</span>: <span class="bu">inherit</span><span class="op">;</span>
<a id="cb6-7" class="sourceLine" title="7"></a>}</code></pre>
</div>
<p>When applied to the following HTML:</p>
<div id="cb7" class="sourceCode">
<pre class="sourceCode html"><code class="sourceCode html"><a id="cb7-1" class="sourceLine" title="1"></a><span class="kw">&lt;div</span><span class="ot"> class=</span><span class="st">"important"</span><span class="kw">&gt;</span>
<a id="cb7-2" class="sourceLine" title="2"></a>  <span class="kw">&lt;p</span><span class="ot"> class=</span><span class="st">"what-will-this-do"</span><span class="kw">&gt;</span>This is important!<span class="kw">&lt;/p&gt;</span>
<a id="cb7-3" class="sourceLine" title="3"></a><span class="kw">&lt;/div&gt;</span></code></pre>
</div>
<p>Will cause the child element to inherit the parent’s <span class="css-property">border</span> property:</p>
<div class="html-output">
<style>
  .x3-css-inheritance-important {
    border:1px solid red;
  }
  .x3-what-will-this-do {
    border: inherit;
  }
</style>
<div class="x3-css-inheritance-important">
<p class="x3-what-will-this-do">This is important!</p>
</div>
</div>
<h2 id="the-default-value">The ‘default’ Value</h2>
<p>If you want to reset an element’s property to its default value, you can use the CSS value <span class="css-value">initial</span><a id="fnref15" class="footnote-ref" href="#fn15"><sup>15</sup></a>.</p>
<p>Consider the following styling:</p>
<div id="cb8" class="sourceCode">
<pre class="sourceCode css"><code class="sourceCode css"><a id="cb8-1" class="sourceLine" title="1"></a>p {
<a id="cb8-2" class="sourceLine" title="2"></a>  <span class="kw">color</span>: <span class="cn">red</span><span class="op">;</span>  
<a id="cb8-3" class="sourceLine" title="3"></a>}
<a id="cb8-4" class="sourceLine" title="4"></a><span class="fu">.default</span> {
<a id="cb8-5" class="sourceLine" title="5"></a>  <span class="kw">color</span>: initial<span class="op">;</span>
<a id="cb8-6" class="sourceLine" title="6"></a>}</code></pre>
</div>
<p>When applied to the following code:</p>
<div id="cb9" class="sourceCode">
<pre class="sourceCode html"><code class="sourceCode html"><a id="cb9-1" class="sourceLine" title="1"></a><span class="kw">&lt;p</span> <span class="kw">&gt;</span>This is some styled text!<span class="kw">&lt;/p&gt;</span>
<a id="cb9-2" class="sourceLine" title="2"></a><span class="kw">&lt;p</span><span class="ot"> class=</span><span class="st">"default"</span><span class="kw">&gt;</span>This is some default styled text<span class="kw">&lt;/p&gt;</span></code></pre>
</div>
<p>Results in the following:<a id="fnref16" class="footnote-ref" href="#fn16"><sup>16</sup></a></p>
<div class="html-output x4">
<style>
  .x4 p {
    color: red;
  }
  .x4 .x4-default {
    color: initial;
  }
</style>
<div>
<p>This is some styled text!</p>
<p class="x4-default">This is some default styled text</p>
</div>
</div>
<h2 id="final-words">Final Words</h2>
<p>Child elements may inherit CSS values from their parents &#8211; it depends on the specific CSS property.</p>
<p>All HTML elements have default styles applied to them. Some of these styles are determined by browser settings, others from the CSS specification.</p>
<h2 id="references">References</h2>
<ol class="incremental" type="1">
<li><a href="https://www.w3.org/TR/html5/rendering.html">CSS Default Properties</a></li>
<li><a href="https://www.w3.org/TR/2011/REC-CSS2-20110607/propidx.html#q24.0">CSS Inheritance</a></li>
<li><a href="https://dxr.mozilla.org/mozilla-central/source/layout/style/res/html.css">Firefox’s Default Style Settings</a></li>
<li><a href="https://gist.github.com/ambidexterich/34828a904dd97dd2a345">Chrome’s Default Style Settings</a></li>
</ol>
<div class="prev">
<p><a href="https://complete-concrete-concise.com/tutorials/webdev/front-end-basics/comments-in-html-and-css/">Prev</a></p>
</div>
<div class="next">
<p><a href="https://complete-concrete-concise.com/tutorials/webdev/front-end-basics/advanced-css-selectors-part-1/">Next</a></p>
</div>
<div class="clear"></div>
<section class="footnotes">
<hr />
<ol>
<li id="fn1">The &lt;mark&gt; tag has a default <span class="css-property">color</span> of <span class="css-value">black</span>. The &lt;a&gt; tag default color is defined by the browser &#8211; it is usually <span class="css-value">#0000EE</span> for an unvisited link, <span class="css-value">#551A8B</span> for a visited link, and <span class="css-value">#EE0000</span> for a link you are hovering over.<a class="footnote-back" href="#fnref1">↩</a></li>
<li id="fn2">The &lt;mark&gt; tag has a default <span class="css-property">background-color</span> of <span class="css-value">yellow</span>.<a class="footnote-back" href="#fnref2">↩</a></li>
<li id="fn3">This is true for all the HTML elements we have seen so far. Some HTML elements we haven’t seen may have a non-zero default value.<a class="footnote-back" href="#fnref3">↩</a></li>
<li id="fn4">This is true for all the HTML elements we have seen so far. Some HTML elements we haven’t seen may have a non-zero default value.<a class="footnote-back" href="#fnref4">↩</a></li>
<li id="fn5">This is true for all the HTML elements we have seen so far. Some HTML elements we haven’t seen may have a non-zero default value.<a class="footnote-back" href="#fnref5">↩</a></li>
<li id="fn6">This is true for all the HTML elements we have seen so far. Some HTML elements we haven’t seen may have a non-zero default value.<a class="footnote-back" href="#fnref6">↩</a></li>
<li id="fn7">This is true for all the HTML elements we have seen so far. Some HTML elements we haven’t seen may have a non-zero default value.<a class="footnote-back" href="#fnref7">↩</a></li>
<li id="fn8">This is true for all the HTML elements we have seen so far. Some HTML elements we haven’t seen may have a non-zero default value.<a class="footnote-back" href="#fnref8">↩</a></li>
<li id="fn9">This is true for most HTML elements we have seen so far. For &lt;p&gt; tags it is equal to the font-size. The &lt;h1&gt; &lt;through &lt;h6&gt; also have default values for top and bottom margin that are non-zero &#8211; the specific value depends on the tag.<a class="footnote-back" href="#fnref9">↩</a></li>
<li id="fn10">This is true for most HTML elements we have seen so far. For &lt;p&gt; tags it is equal to the font-size. The &lt;h1&gt; &lt;through &lt;h6&gt; also have default values for top and bottom margin that are non-zero &#8211; the specific value depends on the tag.<a class="footnote-back" href="#fnref10">↩</a></li>
<li id="fn11">The following tags have a default <span class="css-property">display</span> of <span class="css-value">none</span>: &lt;head&gt;, &lt;title&gt;, and &lt;meta&gt;. The following tags have a a default <span class="css-property">display</span> of <span class="css-value">block</span>: &lt;html&gt;, &lt;body&gt;, &lt;h1&gt; through &lt;h6&gt;, &lt;img&gt;, &lt;ol&gt;, &lt;ul&gt;, &lt;li&gt;, and &lt;p&gt;. The following tags have a a default <span class="css-property">display</span> of <span class="css-value">inline</span>: &lt;strong&gt;, &lt;em&gt;, &lt;i&gt;, &lt;mark&gt;, and &lt;a&gt;.<a class="footnote-back" href="#fnref11">↩</a></li>
<li id="fn12">The &lt;h1&gt; through &lt;h6&gt; tags have varying default font sizes. Assuming 16px as the default font size: H1 = 32px, H2 = 24px, H3 = 19px, H4 = 16px, H5 = 13px, and H6 = 11px.<a class="footnote-back" href="#fnref12">↩</a></li>
<li id="fn13">The &lt;h1&gt; through &lt;h6&gt; and the &lt;b&gt; and &lt;strong&gt; tags have a default <span class="css-property">font-weight</span> of <span class="css-value">bold</span>.<a class="footnote-back" href="#fnref13">↩</a></li>
<li id="fn14">The &lt;i&gt; and &lt;em&gt; tags have a default <span class="css-property">font-style</span> of <span class="css-value">italic</span>.<a class="footnote-back" href="#fnref14">↩</a></li>
<li id="fn15">Yes, it would make more sense if it was called <span class="css-value">default</span>, but the CSS specification calls it <span class="css-value">initial</span>.<a class="footnote-back" href="#fnref15">↩</a></li>
<li id="fn16">If your default <span class="css-property">color</span> (set in the browser) is <span class="css-value">red</span>, then both outputs will be red.<a class="footnote-back" href="#fnref16">↩</a></li>
</ol>
</section>
<p>The post <a href="https://complete-concrete-concise.com/tutorials/webdev/front-end-basics/css-understanding-inheritance-and-default-values/">CSS &#8211; Understanding Inheritance and Default Values</a> appeared first on <a href="https://complete-concrete-concise.com">Complete, Concrete, Concise</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Comments in HTML and CSS</title>
		<link>https://complete-concrete-concise.com/tutorials/webdev/front-end-basics/comments-in-html-and-css/</link>
		
		<dc:creator><![CDATA[richardsplanet]]></dc:creator>
		<pubDate>Mon, 11 Feb 2019 15:36:32 +0000</pubDate>
				<category><![CDATA[Front-End Basics]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[comments]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[html5]]></category>
		<guid isPermaLink="false">https://complete-concrete-concise.com/?p=3789</guid>

					<description><![CDATA[<p>Comments help to document and explain your code to others and your future self.</p>
<p>The post <a href="https://complete-concrete-concise.com/tutorials/webdev/front-end-basics/comments-in-html-and-css/">Comments in HTML and CSS</a> appeared first on <a href="https://complete-concrete-concise.com">Complete, Concrete, Concise</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="preamble">
<p>An important part of coding is documenting your code with comments</p>
</div>
<h2 id="contents">Contents</h2>
<ol class="incremental" type="1">
<li><a href="#introduction-to-comments">Introduction to Comments</a></li>
<li><a href="#html-comments">HTML Comments</a></li>
<li><a href="#css-comments">CSS Comments</a></li>
<li><a href="#guidelines-for-writing-good-comments">Guidelines for Writing Good Comments</a></li>
<li><a href="#final-words">Final Words</a></li>
<li><a href="#references">References</a></li>
</ol>
<h2 id="introduction-to-comments">Introduction to Comments</h2>
<p>In a perfect world, code would be self documenting and as you read it from top to bottom you would perfectly understand its structure and behaviour.</p>
<p>In the real world &#8211; except for trivial code examples (the kind you fit in a dozen lines or less and can keep in your head) &#8211; understanding any significant piece of code takes considerable effort.</p>
<p>Comments are textual information that are added to the code to help document the code. Comments do not affect the behaviour of the code in any way and are ignored when the code is processed. Comments are there to help humans understand the code easier &#8211; but only if they are useful and accurate.</p>
<h2 id="html-comments">HTML Comments</h2>
<p>HTML comments begin with <code>&lt;!--</code> and end with <code>--&gt;</code>. In between those characters, you can have almost any type of text string you like and it can span multiple lines.</p>
<div class="sourceCode" id="cb1">
<pre class="sourceCode html"><code class="sourceCode html"><a class="sourceLine" id="cb1-1" title="1"><span class="co">&lt;!--This is an HTML comment--&gt;</span></a>
<a class="sourceLine" id="cb1-2" title="2"></a>
<a class="sourceLine" id="cb1-3" title="3"><span class="co">&lt;!-- While a space is not necessary after</span></a>
<a class="sourceLine" id="cb1-4" title="4"><span class="co">     the opening characters, it does make it</span></a>
<a class="sourceLine" id="cb1-5" title="5"><span class="co">     easier to read and avoid certain problems --&gt;</span></a>
<a class="sourceLine" id="cb1-6" title="6"></a>
<a class="sourceLine" id="cb1-7" title="7"><span class="co">&lt;!--</span></a>
<a class="sourceLine" id="cb1-8" title="8"><span class="co">  You can also put the comment markers on</span></a>
<a class="sourceLine" id="cb1-9" title="9"><span class="co">  separate lines to make it a little neater.</span></a>
<a class="sourceLine" id="cb1-10" title="10"><span class="co">--&gt;</span></a>
<a class="sourceLine" id="cb1-11" title="11"></a>
<a class="sourceLine" id="cb1-12" title="12"><span class="co">&lt;!--</span></a>
<a class="sourceLine" id="cb1-13" title="13"><span class="co">  The HTML code inside this comment</span></a>
<a class="sourceLine" id="cb1-14" title="14"><span class="co">  will never be processed.</span></a>
<a class="sourceLine" id="cb1-15" title="15"></a>
<a class="sourceLine" id="cb1-16" title="16"><span class="co">  &lt;div&gt;</span></a>
<a class="sourceLine" id="cb1-17" title="17"><span class="co">    &lt;div&gt;</span></a>
<a class="sourceLine" id="cb1-18" title="18"><span class="co">      &lt;p&gt;A paragraph inside divs&lt;/p&gt;</span></a>
<a class="sourceLine" id="cb1-19" title="19"><span class="co">    &lt;/div&gt;</span></a>
<a class="sourceLine" id="cb1-20" title="20"><span class="co">  &lt;/div&gt;</span></a>
<a class="sourceLine" id="cb1-21" title="21"></a>
<a class="sourceLine" id="cb1-22" title="22"><span class="co">--&gt;</span></a></code></pre>
</div>
<p>The specification has a few rules regarding HTML comments:</p>
<ol class="incremental" type="1">
<li>the text must not start with the string <code>&gt;</code>,</li>
<li>nor start with the string <code>-&gt;</code>,</li>
<li>nor contain the strings <code>&lt;!--</code>, <code>--&gt;</code>, or <code>--!&gt;</code>, +</li>
<li>nor end with the string <code>&lt;!-</code></li>
</ol>
<p>Basically, as long as you don’t try to nest HTML comments inside HTML comments, you will be fine.</p>
<div class="sourceCode" id="cb2">
<pre class="sourceCode html"><code class="sourceCode html"><a class="sourceLine" id="cb2-1" title="1"><span class="co">&lt;!--</span></a>
<a class="sourceLine" id="cb2-2" title="2"><span class="co">  &lt;!</span><span class="er">--</span><span class="co"> Nested comments are bad --&gt;</span></a>
<a class="sourceLine" id="cb2-3" title="3">--&gt;</a></code></pre>
</div>
<h2 id="css-comments">CSS Comments</h2>
<p>CSS comments begin with <code>/*</code> and end with <code>*/</code>. In between those characters you can have almost any types of text string you like and it can span multiple lines.</p>
<div class="sourceCode" id="cb3">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb3-1" title="1"><span class="co">/*This is a CSS comment*/</span></a>
<a class="sourceLine" id="cb3-2" title="2"></a>
<a class="sourceLine" id="cb3-3" title="3"><span class="co">/* A leading space makes the comment</span></a>
<a class="sourceLine" id="cb3-4" title="4"><span class="co">   easier to read */</span></a>
<a class="sourceLine" id="cb3-5" title="5"></a>
<a class="sourceLine" id="cb3-6" title="6"><span class="co">/*</span></a>
<a class="sourceLine" id="cb3-7" title="7"><span class="co">   You can also put the comment markers on</span></a>
<a class="sourceLine" id="cb3-8" title="8"><span class="co">   separate lines to make it a little neater.</span></a>
<a class="sourceLine" id="cb3-9" title="9"><span class="co">*/</span></a>
<a class="sourceLine" id="cb3-10" title="10"></a>
<a class="sourceLine" id="cb3-11" title="11"><span class="co">/*</span></a>
<a class="sourceLine" id="cb3-12" title="12"><span class="co">   The CSS code inside this comment</span></a>
<a class="sourceLine" id="cb3-13" title="13"><span class="co">   will never be processed.</span></a>
<a class="sourceLine" id="cb3-14" title="14"></a>
<a class="sourceLine" id="cb3-15" title="15"><span class="co">   .my-style {</span></a>
<a class="sourceLine" id="cb3-16" title="16"><span class="co">     font-size: 24px;</span></a>
<a class="sourceLine" id="cb3-17" title="17"><span class="co">     color: green;</span></a>
<a class="sourceLine" id="cb3-18" title="18"><span class="co">     padding: 5px;</span></a>
<a class="sourceLine" id="cb3-19" title="19"><span class="co">     background: orange;</span></a>
<a class="sourceLine" id="cb3-20" title="20"><span class="co"> }</span></a>
<a class="sourceLine" id="cb3-21" title="21"></a>
<a class="sourceLine" id="cb3-22" title="22"><span class="co">*/</span>   </a></code></pre>
</div>
<p>As with HTML comments, you cannot nest CSS comments, so the first <code>*/</code> will always end the comment:</p>
<div class="sourceCode" id="cb4">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb4-1" title="1"><span class="co">/*</span></a>
<a class="sourceLine" id="cb4-2" title="2"><span class="co">  /* Nested comments are bad */</span></a>
<a class="sourceLine" id="cb4-3" title="3"><span class="op">*</span>/</a></code></pre>
</div>
<h2 id="guidelines-for-writing-good-comments">Guidelines for Writing Good Comments</h2>
<p>Comments are written for two types of audience:</p>
<ol class="incremental" type="1">
<li>Your future self</li>
<li>Others</li>
</ol>
<p>Your future self (technically speaking) is somebody else because, 6 months or a year or 10 years in the future, you are unlikely to still be in the same frame of mind as when you wrote the code. So everything that was “obvious” when you were writing your code is no longer <em>obvious</em>.</p>
<p>Comments are written for two different purposes:</p>
<ol class="incremental" type="1">
<li>Documenting (<strong>what</strong> you are doing)</li>
<li>Clarifying (<strong>why</strong> you are doing it)</li>
</ol>
<p>Comments should answer the questions: <strong>what</strong> and <strong>why</strong>. The <strong>how</strong> is answered by the code itself because that is the implementation.</p>
<p>Let’s comment the <a href="https://complete-concrete-concise.com/tutorials/webdev/front-end-basics/your-first-webpage-hello-world/">first HTML program we encountered</a> in this tutorial series:</p>
<div class="sourceCode" id="cb5">
<pre class="sourceCode html"><code class="sourceCode html"><a class="sourceLine" id="cb5-1" title="1"><span class="co">&lt;!--</span></a>
<a class="sourceLine" id="cb5-2" title="2"><span class="co">  The following is not HTML, it is a document declaration.</span></a>
<a class="sourceLine" id="cb5-3" title="3"><span class="co">  It tells the browser what type of document it is.</span></a>
<a class="sourceLine" id="cb5-4" title="4"><span class="co">  It is case-insensitive. This declaration tells the</span></a>
<a class="sourceLine" id="cb5-5" title="5"><span class="co">  browser that all the code that follows is HTML5 code.</span></a>
<a class="sourceLine" id="cb5-6" title="6"><span class="co">--&gt;</span></a>
<a class="sourceLine" id="cb5-7" title="7"><span class="dt">&lt;!DOCTYPE </span>HTML<span class="dt">&gt;</span></a>
<a class="sourceLine" id="cb5-8" title="8"></a>
<a class="sourceLine" id="cb5-9" title="9"><span class="co">&lt;!--</span></a>
<a class="sourceLine" id="cb5-10" title="10"><span class="co">  This is an HTML tag and marks the start of the HTML</span></a>
<a class="sourceLine" id="cb5-11" title="11"><span class="co">  document.</span></a>
<a class="sourceLine" id="cb5-12" title="12"></a>
<a class="sourceLine" id="cb5-13" title="13"><span class="co">  There is a corresponding closing tag &lt;/html&gt;. Most</span></a>
<a class="sourceLine" id="cb5-14" title="14"><span class="co">  HTML tags come in pairs.</span></a>
<a class="sourceLine" id="cb5-15" title="15"><span class="co">--&gt;</span></a>
<a class="sourceLine" id="cb5-16" title="16"><span class="kw">&lt;html&gt;</span></a>
<a class="sourceLine" id="cb5-17" title="17"></a>
<a class="sourceLine" id="cb5-18" title="18">  <span class="co">&lt;!--</span></a>
<a class="sourceLine" id="cb5-19" title="19"><span class="co">     The head section contains metadata (a fancy way of</span></a>
<a class="sourceLine" id="cb5-20" title="20"><span class="co">     saying information) about the document. Things which</span></a>
<a class="sourceLine" id="cb5-21" title="21"><span class="co">     are not part of the content of the document tend to</span></a>
<a class="sourceLine" id="cb5-22" title="22"><span class="co">     go in this section.</span></a>
<a class="sourceLine" id="cb5-23" title="23"></a>
<a class="sourceLine" id="cb5-24" title="24"><span class="co">     There is a corresponding closing tag &lt;/head&gt; which</span></a>
<a class="sourceLine" id="cb5-25" title="25"><span class="co">     marks the end of the head section</span></a>
<a class="sourceLine" id="cb5-26" title="26"><span class="co">  --&gt;</span></a>
<a class="sourceLine" id="cb5-27" title="27">  <span class="kw">&lt;head&gt;</span></a>
<a class="sourceLine" id="cb5-28" title="28"></a>
<a class="sourceLine" id="cb5-29" title="29">    <span class="co">&lt;!--</span></a>
<a class="sourceLine" id="cb5-30" title="30"><span class="co">      The title of the document. Typically appears in</span></a>
<a class="sourceLine" id="cb5-31" title="31"><span class="co">      the browser tab.</span></a>
<a class="sourceLine" id="cb5-32" title="32"><span class="co">    --&gt;</span></a>
<a class="sourceLine" id="cb5-33" title="33">    <span class="kw">&lt;title&gt;</span>Hello World<span class="kw">&lt;/title&gt;</span></a>
<a class="sourceLine" id="cb5-34" title="34"></a>
<a class="sourceLine" id="cb5-35" title="35">    <span class="co">&lt;!--</span></a>
<a class="sourceLine" id="cb5-36" title="36"><span class="co">      Use UTF-8 character encoding for this page. In</span></a>
<a class="sourceLine" id="cb5-37" title="37"><span class="co">      general, it should always be UTF-8.</span></a>
<a class="sourceLine" id="cb5-38" title="38"><span class="co">    --&gt;</span></a>
<a class="sourceLine" id="cb5-39" title="39">    <span class="kw">&lt;meta</span><span class="ot"> charset=</span><span class="st">&quot;utf-8&quot;</span>  <span class="kw">/&gt;</span></a>
<a class="sourceLine" id="cb5-40" title="40"></a>
<a class="sourceLine" id="cb5-41" title="41">  <span class="kw">&lt;/head&gt;</span> <span class="co">&lt;!-- The end of the head section --&gt;</span></a>
<a class="sourceLine" id="cb5-42" title="42"></a>
<a class="sourceLine" id="cb5-43" title="43">  <span class="co">&lt;!--</span></a>
<a class="sourceLine" id="cb5-44" title="44"><span class="co">    The body section contains the content that is</span></a>
<a class="sourceLine" id="cb5-45" title="45"><span class="co">    displayed in the web browser.</span></a>
<a class="sourceLine" id="cb5-46" title="46"></a>
<a class="sourceLine" id="cb5-47" title="47"><span class="co">    There is a corresponding closing tag &lt;/body&gt; which</span></a>
<a class="sourceLine" id="cb5-48" title="48"><span class="co">    marks the end of the body section.</span></a>
<a class="sourceLine" id="cb5-49" title="49"><span class="co">  --&gt;</span></a>
<a class="sourceLine" id="cb5-50" title="50">  <span class="kw">&lt;body&gt;</span></a>
<a class="sourceLine" id="cb5-51" title="51"></a>
<a class="sourceLine" id="cb5-52" title="52">    <span class="co">&lt;!--</span></a>
<a class="sourceLine" id="cb5-53" title="53"><span class="co">      Content is, generally, contained between paragraph</span></a>
<a class="sourceLine" id="cb5-54" title="54"><span class="co">      tags.</span></a>
<a class="sourceLine" id="cb5-55" title="55"><span class="co">    --&gt;</span></a>
<a class="sourceLine" id="cb5-56" title="56">    <span class="kw">&lt;p&gt;</span>Hello World!<span class="kw">&lt;/p&gt;</span></a>
<a class="sourceLine" id="cb5-57" title="57"></a>
<a class="sourceLine" id="cb5-58" title="58">  <span class="kw">&lt;/body&gt;</span> <span class="co">&lt;!-- The end of the body section --&gt;</span></a>
<a class="sourceLine" id="cb5-59" title="59"><span class="kw">&lt;/html&gt;</span> <span class="co">&lt;!-- The end of the HTML document --&gt;</span></a></code></pre>
</div>
<p>In general, you shouldn’t comment as extensively as I did in the example above &#8211; but for a tutorial it is fine.</p>
<p>When you are learning, it is a good idea to comment freely &#8211; explain what you are doing and why you are doing it. As your knowledge develops, you will find yourself documenting less and less.</p>
<p>Your comments should document why you are doing something. For example, you might have a requirement for a particular type of webpage, you could embed the webpage description as a comment:</p>
<div class="sourceCode" id="cb6">
<pre class="sourceCode html"><code class="sourceCode html"><a class="sourceLine" id="cb6-1" title="1"><span class="co">&lt;!-- This is a page with a single column layout that has</span></a>
<a class="sourceLine" id="cb6-2" title="2"><span class="co">     the following general structure:</span></a>
<a class="sourceLine" id="cb6-3" title="3"></a>
<a class="sourceLine" id="cb6-4" title="4"><span class="co">     Header</span></a>
<a class="sourceLine" id="cb6-5" title="5"><span class="co">     Navbar</span></a>
<a class="sourceLine" id="cb6-6" title="6"><span class="co">     body of articles</span></a>
<a class="sourceLine" id="cb6-7" title="7"><span class="co">     Footer</span></a>
<a class="sourceLine" id="cb6-8" title="8"></a>
<a class="sourceLine" id="cb6-9" title="9"><span class="co">     The body has a width of 960px and is centered on the</span></a>
<a class="sourceLine" id="cb6-10" title="10"><span class="co">     page.</span></a>
<a class="sourceLine" id="cb6-11" title="11"></a>
<a class="sourceLine" id="cb6-12" title="12"><span class="co">     Each article in the body is a card which fits the full</span></a>
<a class="sourceLine" id="cb6-13" title="13"><span class="co">     width of the body less 35px padding on the left and</span></a>
<a class="sourceLine" id="cb6-14" title="14"><span class="co">     right side.</span></a>
<a class="sourceLine" id="cb6-15" title="15"></a>
<a class="sourceLine" id="cb6-16" title="16"><span class="co">     Each card consists of an image with a 16:9 aspect</span></a>
<a class="sourceLine" id="cb6-17" title="17"><span class="co">     ratio, a title with a font-size of 24px, followed</span></a>
<a class="sourceLine" id="cb6-18" title="18"><span class="co">     by a byline at 12px and a published date (also 12px)</span></a>
<a class="sourceLine" id="cb6-19" title="19"><span class="co">     The text content of the card has a font size of 16px.</span></a>
<a class="sourceLine" id="cb6-20" title="20"><span class="co">--&gt;</span></a></code></pre>
</div>
<p>Of course, this information could be in an external design document instead of the webpage.</p>
<p>The big problem is maintaining the code comments up to date. You have to be diligent to ensure that you update the comments when making changes to the code that don’t do what the comments say.</p>
<p>I recommend you comment freely as you learn to develop. Comment what you have learned:</p>
<div class="sourceCode" id="cb7">
<pre class="sourceCode html"><code class="sourceCode html"><a class="sourceLine" id="cb7-1" title="1"><span class="co">&lt;!--</span></a>
<a class="sourceLine" id="cb7-2" title="2"><span class="co">  There are two kinds of HTML lists:</span></a>
<a class="sourceLine" id="cb7-3" title="3"><span class="co">  - ordered &lt;ol&gt; and</span></a>
<a class="sourceLine" id="cb7-4" title="4"><span class="co">  - unordered &lt;ul&gt;.</span></a>
<a class="sourceLine" id="cb7-5" title="5"></a>
<a class="sourceLine" id="cb7-6" title="6"><span class="co">  List can take and attribute called &#39;reversed&#39; todo</span></a>
<a class="sourceLine" id="cb7-7" title="7"><span class="co">  display the list in reverse order.</span></a>
<a class="sourceLine" id="cb7-8" title="8"><span class="co">--&gt;</span></a>
<a class="sourceLine" id="cb7-9" title="9"></a>
<a class="sourceLine" id="cb7-10" title="10"><span class="kw">&lt;p&gt;</span>Normal list ordering:<span class="kw">&lt;/p&gt;</span></a>
<a class="sourceLine" id="cb7-11" title="11"><span class="kw">&lt;ol&gt;</span></a>
<a class="sourceLine" id="cb7-12" title="12">  <span class="kw">&lt;li&gt;</span>Item one<span class="kw">&lt;/li&gt;</span></a>
<a class="sourceLine" id="cb7-13" title="13">  <span class="kw">&lt;li&gt;</span>Item two<span class="kw">&lt;/li&gt;</span></a>
<a class="sourceLine" id="cb7-14" title="14">  <span class="kw">&lt;li&gt;</span>Item three<span class="kw">&lt;/li&gt;</span></a>
<a class="sourceLine" id="cb7-15" title="15"><span class="kw">&lt;/ol&gt;</span></a>
<a class="sourceLine" id="cb7-16" title="16"></a>
<a class="sourceLine" id="cb7-17" title="17"><span class="kw">&lt;p&gt;</span>Reversed list ordering:<span class="kw">&lt;/p&gt;</span></a>
<a class="sourceLine" id="cb7-18" title="18"><span class="kw">&lt;ol</span><span class="ot"> reversed</span><span class="kw">&gt;</span></a>
<a class="sourceLine" id="cb7-19" title="19">  <span class="kw">&lt;li&gt;</span>Item one<span class="kw">&lt;/li&gt;</span></a>
<a class="sourceLine" id="cb7-20" title="20">  <span class="kw">&lt;li&gt;</span>Item two<span class="kw">&lt;/li&gt;</span></a>
<a class="sourceLine" id="cb7-21" title="21">  <span class="kw">&lt;li&gt;</span>Item three<span class="kw">&lt;/li&gt;</span></a>
<a class="sourceLine" id="cb7-22" title="22"><span class="kw">&lt;/ol&gt;</span></a></code></pre>
</div>
<p>Eventually, you will stop writing mundane comments.</p>
<p>You should avoid commenting what is obvious from reading the code because it adds nothing to the information:</p>
<div class="sourceCode" id="cb8">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb8-1" title="1"><span class="fu">.header</span> {</a>
<a class="sourceLine" id="cb8-2" title="2">  <span class="co">/* set the background color to blue */</span></a>
<a class="sourceLine" id="cb8-3" title="3">  <span class="kw">background-color</span>: <span class="cn">blue</span><span class="op">;</span></a>
<a class="sourceLine" id="cb8-4" title="4">}</a></code></pre>
</div>
<p>But you can document specific requirements:<a href="#fn1" class="footnote-ref" id="fnref1"><sup>1</sup></a></p>
<div class="sourceCode" id="cb9">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb9-1" title="1"><span class="fu">.header</span> {</a>
<a class="sourceLine" id="cb9-2" title="2">  <span class="kw">background-color</span>: <span class="cn">#1DA1F2</span><span class="op">;</span> <span class="co">/* Twitter blue */</span></a>
<a class="sourceLine" id="cb9-3" title="3">}</a></code></pre>
</div>
<p>One use of comments is to structure your code:</p>
<div class="sourceCode" id="cb10">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb10-1" title="1"><span class="co">/* Global */</span></a>
<a class="sourceLine" id="cb10-2" title="2"></a>
<a class="sourceLine" id="cb10-3" title="3"></a>
<a class="sourceLine" id="cb10-4" title="4"><span class="co">/* Header */</span></a>
<a class="sourceLine" id="cb10-5" title="5"></a>
<a class="sourceLine" id="cb10-6" title="6"></a>
<a class="sourceLine" id="cb10-7" title="7"><span class="co">/* Content */</span></a>
<a class="sourceLine" id="cb10-8" title="8"></a>
<a class="sourceLine" id="cb10-9" title="9"></a>
<a class="sourceLine" id="cb10-10" title="10"><span class="co">/* Footer */</span></a></code></pre>
</div>
<p>Unfortunately, your code won’t always cooperate to break down into such nice clear categories.</p>
<h2 id="final-words">Final Words</h2>
<ol class="incremental" type="1">
<li>Comment your code freely.</li>
<li>Don’t comment anything that is obvious.</li>
<li>You can explain <strong>what</strong> you are doing.</li>
<li>You can explain <strong>why</strong> you are doing something.</li>
<li>Don’t explain <strong>how</strong> how you are doing something because that is the code itself.</li>
<li>Keep your comments up to date (in general, you should avoid comments that could be rendered obsolete)</li>
</ol>
<h2 id="references">References</h2>
<ol class="incremental" type="1">
<li><a href="https://html.spec.whatwg.org/multipage/syntax.html#comments">HTML comments</a></li>
<li><a href="https://www.w3.org/TR/CSS21/syndata.html#comments">CSS comments</a></li>
</ol>
<div class="prev">
<p><a href="https://complete-concrete-concise.com/tutorials/webdev/front-end-basics/a-quick-introduction-to-two-development-tools-built-into-your-browser/">Prev</a></p>
</div>
<div class="next">
<p><a href="https://complete-concrete-concise.com/tutorials/webdev/front-end-basics/css-understanding-inheritance-and-default-values/">Next</a></p>
</div>
<div class="clear">
</div>
<section class="footnotes">
<hr />
<ol>
<li id="fn1">
<p><a href="https://about.twitter.com/content/dam/about-twitter/company/brand-resources/en_us/Twitter_Brand_Guidelines_V2_0.pdf">Read more about Twitter’s brand requirements</a>. Many organizations and companies have very specific rules regarding the use of colours or fonts or any other aspects that are associated with their brand.<a href="#fnref1" class="footnote-back">↩</a></p>
</li>
</ol>
</section>
<p>The post <a href="https://complete-concrete-concise.com/tutorials/webdev/front-end-basics/comments-in-html-and-css/">Comments in HTML and CSS</a> appeared first on <a href="https://complete-concrete-concise.com">Complete, Concrete, Concise</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>CSS &#8211; How and When to Use Float</title>
		<link>https://complete-concrete-concise.com/tutorials/webdev/front-end-basics/css-how-and-when-to-use-float/</link>
		
		<dc:creator><![CDATA[richardsplanet]]></dc:creator>
		<pubDate>Mon, 25 Jun 2018 12:54:41 +0000</pubDate>
				<category><![CDATA[Front-End Basics]]></category>
		<category><![CDATA[box-sizing]]></category>
		<category><![CDATA[calc()]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[float]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[learn]]></category>
		<category><![CDATA[tutorial]]></category>
		<guid isPermaLink="false">https://complete-concrete-concise.com/?p=3743</guid>

					<description><![CDATA[<p>Floats are easier to use when you know when and how you should be using them.</p>
<p>The post <a href="https://complete-concrete-concise.com/tutorials/webdev/front-end-basics/css-how-and-when-to-use-float/">CSS &#8211; How and When to Use Float</a> appeared first on <a href="https://complete-concrete-concise.com">Complete, Concrete, Concise</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="preamble">While <span class="css-property">float</span> is not ideal for every column organizing idea, it is a tried and true method and works well with older web browsers.<br />
In this tutorial we are going to look at some best practices for the use of floating HTML elements.</div>
<h2>Contents</h2>
<ol type="1">
<li><a href="#divide-the-page-so-floats-are-in-their-own-block">Divide the Page so Floats are in their own Block</a></li>
<li><a href="#float-everything-in-the-same-direction">Float Everything in the Same Direction</a>
<ol type="1">
<li><a href="#everything-floating-left">Everything Floating Left</a></li>
<li><a href="#everything-floating-right">Everything Floating Right</a></li>
<li><a href="#mixed-left-and-right-floats">Mixed Left and Right Floats</a></li>
</ol>
</li>
<li><a href="#when-you-want-floats-to-overlap-other-blocks">When You Want Floats to Overlap other Blocks</a></li>
<li><a href="#float-and-box-sizing"><span class="css-property">float</span> and <span class="css-property">box-sizing</span></a></li>
<li><a href="#calc"><span class="css-function">calc()</span></a></li>
<li><a href="#summary">Summary</a></li>
<li><a href="#playing-around">Playing Around</a></li>
<li><a href="#references">References</a></li>
</ol>
<h2 id="divide-the-page-so-floats-are-in-their-own-block">Divide the Page so Floats are in their own Block</h2>
<p>When you <span class="html-tag">div</span>ide up a page, you want to ensure that floating elements are contained inside their own stacking block and <span class="css-class">.clearfix</span> is applied to that block.<br />
Notice how the 3 small floating images are in their own block, with other elements stacking above and below:</p>
<div style="width: 70%; background: yellow; text-align: center; height: 50px; margin: auto; padding-top: 16px;">Header section</div>
<div style="width: 70%; background: green; margin: auto;">
<div style="width: 80%; background: cyan; margin: auto; padding: 2em 0 2em 0; text-align: center;">Large image goes here.</div>
<div style="border: 0.5em solid black;">
<div style="width: 80%; margin: auto;">
<div style="width: 30%; height: 50px; margin: 1.66%; background: lime; text-align: center; float: left;">Smaller image</div>
<div style="width: 30%; height: 50px; margin: 1.66%; background: lime; text-align: center; float: left;">Smaller image</div>
<div style="width: 30%; height: 50px; margin: 1.66%; background: lime; text-align: center; float: left;">Smaller image</div>
<div style="clear: both;"></div>
</div>
</div>
</div>
<div style="width: 70%; background: fuchsia; text-align: center; margin: auto;">Footer section</div>
<p>In general, you want to use floats to make elements flow horizontally inside a vertically stacking block.<br />
As much as possible, avoid having floating elements actually floating on top of other elements &#8211; but there are exceptions.</p>
<h2 id="float-everything-in-the-same-direction">Float Everything in the Same Direction</h2>
<p>As a general rule, you should float all your elements in the same direction. For English language websites (or any other language that is written from left-to-right), you want to use <span class="css-property">float: left</span>.</p>
<h3 id="everything-floating-left">Everything Floating Left</h3>
<p>Consider the following <span class="css-value">left</span> floating elements which overflow and wrap:</p>
<div style="text-align: center; line-height: 4em;">
<div style="width: 40%; background: yellow; float: left;">float:left</div>
<div style="width: 40%; background: lime; float: left;">float:left</div>
<div style="width: 40%; background: orange; float: left;">float:left</div>
<div style="clear: both; margin: 1em;"></div>
</div>
<p>While there is too much white space on the right side, the overall flow and alignment look fine.</p>
<h3 id="everything-floating-right">Everything Floating Right</h3>
<p>Consider the following <span class="css-value">right</span> floating elements which overflow and wrap:</p>
<div style="text-align: center; line-height: 4em;">
<div style="width: 40%; background: yellow; float: right;">float:right</div>
<div style="width: 40%; background: lime; float: right;">float:right</div>
<div style="width: 40%; background: orange; float: right;">float:right</div>
<div style="clear: both; margin: 1em;"></div>
</div>
<p>There is too much white space on the left side and the right alignment looks somewhat “unnatural” or out of place.<br />
Floating to the right is a good choice for webpages written in languages written from right to left.<a id="fnref1" class="footnote-ref" href="#fn1"><sup>1</sup></a></p>
<h3 id="mixed-left-and-right-floats">Mixed Left and Right Floats</h3>
<p>Consider the following floating elements which overflow and wrap. The left-most elements are floated <span class="css-value">left</span> and the right-most element is floated to the <span class="css-value">right</span>:</p>
<div style="text-align: center; line-height: 4em;">
<div style="width: 40%; background: yellow; float: left;">float:left</div>
<div style="width: 40%; background: lime; float: left;">float:left</div>
<div style="width: 40%; background: orange; float: right;">float:right</div>
<div style="clear: both; margin: 1em;"></div>
</div>
<p>The way the content overflows doesn’t look quite right.</p>
<h2 id="when-you-want-floats-to-overlap-other-blocks">When You Want Floats to Overlap other Blocks</h2>
<p>There are times when you want a floating element to overlap other blocks. The most common is getting text to flow around an image:</p>
<div class="html-output"><img decoding="async" style="float: left; margin-right: 1em; width: 125px;" src="https://complete-concrete-concise.com/wp-content/uploads/2018/05/26-dog-compressor.jpg">Having text flow around an embedded image looks natural and is what most people would expect because this is a common layout style we find in books and magazines.<br />
So this is one case where it makes sense to allow a floating image block to overlap with paragraph blocks.</div>
<p>Another common case is when you want to insert a side note or comment as a visible part of your content.<br />
Consider the following (although you might want to justify the text to make it less ragged):</p>
<div class="html-output">Another common use for a float that overlaps HTML blocks in your content is when you want to insert some sort of side note for the reader.</p>
<div style="float: right; background: cornsilk; border: 1px solid black; margin-left: 1em; width: 35%; padding: 0.5em;">According to legend, Galileo Galilei dropped two canon balls of different mass from the top of the tower to show they fell at the same speed.</div>
<p>For example, you might be writing a document on the Tower of Pisa &#8211; which is more commonly known as the “Leaning Tower of Pisa”.<br />
In the course of the article you will likely mention a number of facts about the tower. You might also want to mention something that doesn’t really belong in the main text, but is still a fun fact.<br />
One way to do this would be to use a footnote or endnote. Another way, would be to insert it into the main text, but set it apart.</p>
</div>
<p>When you choose to deliberately overlap HTML blocks, you need to be careful about ensuring the floating element does not overlap blocks it shouldn’t.</p>
<h2 id="float-and-box-sizing"><span class="css-property">float</span> and <span class="css-property">box-sizing</span></h2>
<p>Earlier, we saw <a href="https://complete-concrete-concise.com/tutorials/webdev/front-end-basics/nine-more-css-properties-to-play-with#box-sizing">the <span class="css-property">box-sizing</span> property</a> which instructs the User Agent (browser) to size HTML elements by either content area (default) or border. Recall the CSS box model:<br />
<img decoding="async" src="https://complete-concrete-concise.com/wp-content/uploads/2018/04/15-css-box-model.png"><br />
Sizing using the <span class="css-value">content-box</span> does not include the padding, border, or margin when setting the size of the HTML element.<br />
Sizing using the <span class="css-value">border-box</span> includes the padding and border when setting the size of an HTML element. It does not include the margin in the size of the element.<br />
For <strong>normal flow</strong> objects, this doesn’t make much difference to the layout since objects just flow downwards.<br />
When we apply <span class="css-property">float</span> to objects, they flow horizontally and will overflow and wrap around when they reach the edge of the browser &#8211; so we have to be more careful when specifying dimensions for floating objects. It is usually best to use <span class="css-property">box-sizing: border-box</span> for floating HTML elements. Consider the following styling and code:</p>
<div id="cb1" class="sourceCode">
<pre class="sourceCode css"><code class="sourceCode css"><a id="cb1-1" class="sourceLine" data-line-number="1"></a><span class="fu">.parent</span> {
<a id="cb1-2" class="sourceLine" data-line-number="2"></a>  <span class="kw">margin</span>: <span class="dv">auto</span>;
<a id="cb1-3" class="sourceLine" data-line-number="3"></a>  <span class="kw">width</span>: <span class="dv">300px</span>;
<a id="cb1-4" class="sourceLine" data-line-number="4"></a>  <span class="kw">background-color</span>: <span class="dv">yellow</span>;
<a id="cb1-5" class="sourceLine" data-line-number="5"></a>}
<a id="cb1-6" class="sourceLine" data-line-number="6"></a>
<a id="cb1-7" class="sourceLine" data-line-number="7"></a><span class="fu">.clearfix</span><span class="in">::after</span> {
<a id="cb1-8" class="sourceLine" data-line-number="8"></a>  <span class="kw">clear</span>: <span class="dv">both</span>;
<a id="cb1-9" class="sourceLine" data-line-number="9"></a>  <span class="kw">display</span>: <span class="dv">block</span>;
<a id="cb1-10" class="sourceLine" data-line-number="10"></a>  <span class="kw">content</span>: <span class="st">""</span>;
<a id="cb1-11" class="sourceLine" data-line-number="11"></a>}
<a id="cb1-12" class="sourceLine" data-line-number="12"></a>
<a id="cb1-13" class="sourceLine" data-line-number="13"></a><span class="fu">.block</span> {
<a id="cb1-14" class="sourceLine" data-line-number="14"></a>  <span class="kw">width</span>: <span class="dv">100px</span>;
<a id="cb1-15" class="sourceLine" data-line-number="15"></a>  <span class="kw">height</span>: <span class="dv">50px</span>;
<a id="cb1-16" class="sourceLine" data-line-number="16"></a>  <span class="kw">background-color</span>: <span class="dv">red</span>;
<a id="cb1-17" class="sourceLine" data-line-number="17"></a>  <span class="kw">float</span>:<span class="dv">left</span>;
<a id="cb1-18" class="sourceLine" data-line-number="18"></a>}</code></pre>
</div>
<div id="cb2" class="sourceCode">
<pre class="sourceCode html"><code class="sourceCode html"><a id="cb2-1" class="sourceLine" data-line-number="1"></a><span class="kw">&lt;div</span><span class="ot"> class=</span><span class="st">"parent clearfix"</span><span class="kw">&gt;</span>
<a id="cb2-2" class="sourceLine" data-line-number="2"></a>  <span class="kw">&lt;div</span><span class="ot"> class=</span><span class="st">"block"</span><span class="kw">&gt;&lt;/div&gt;</span>
<a id="cb2-3" class="sourceLine" data-line-number="3"></a>  <span class="kw">&lt;div</span><span class="ot"> class=</span><span class="st">"block"</span><span class="kw">&gt;&lt;/div&gt;</span>
<a id="cb2-4" class="sourceLine" data-line-number="4"></a>  <span class="kw">&lt;div</span><span class="ot"> class=</span><span class="st">"block"</span><span class="kw">&gt;&lt;/div&gt;</span>
<a id="cb2-5" class="sourceLine" data-line-number="5"></a><span class="kw">&lt;/div&gt;</span></code></pre>
</div>
<p>Which results in:</p>
<div class="html-output">
<div style="margin: auto; width: 300px; background-color: yellow;">
<div style="width: 100px; height: 50px; background-color: red; float: left;"></div>
<div style="width: 100px; height: 50px; background-color: red; float: left;"></div>
<div style="width: 100px; height: 50px; background-color: red; float: left;"></div>
<div style="clear: both;"></div>
</div>
</div>
<p>There is no obvious separation between one child block and another, since they all run together. The obvious solution is to insert a bit of space between them. We can do this by giving each child block a small margin (let’s say 10px all around):</p>
<div class="html-output">
<div style="margin: auto; width: 300px; background-color: yellow;">
<div style="width: 100px; height: 50px; background-color: red; float: left; margin: 10px;"></div>
<div style="width: 100px; height: 50px; background-color: red; float: left; margin: 10px;"></div>
<div style="width: 100px; height: 50px; background-color: red; float: left; margin: 10px;"></div>
<div style="clear: both;"></div>
</div>
</div>
<p>Unfortunately, this causes the child blocks to overflow and wrap around. Remember:</p>
<ol type="1">
<li>the parent container is 300px wide,</li>
<li>each child is 100px wide,</li>
<li>each child has a 10px margin,</li>
<li>this makes each child block 100px + 10px + 10 px = 120px wide (there are 10px for the left margin and 10px for the right margin) and</li>
<li>50px + 10px + 10px = 70px high (there are 10px for the top margin and 10px for the bottom margin)</li>
</ol>
<p>The height of the child blocks is not the problem for us, it is the width, so we can adjust our CSS to account for the 10px margin on the left and right of the child block:</p>
<div id="cb3" class="sourceCode">
<pre class="sourceCode css"><code class="sourceCode css"><a id="cb3-1" class="sourceLine" data-line-number="1"></a><span class="fu">.block</span> {
<a id="cb3-2" class="sourceLine" data-line-number="2"></a>  <span class="kw">margin</span>: <span class="dv">10px</span>;
<a id="cb3-3" class="sourceLine" data-line-number="3"></a>  <span class="kw">width</span>: <span class="dv">80px</span>;
<a id="cb3-4" class="sourceLine" data-line-number="4"></a>  <span class="kw">height</span>: <span class="dv">50px</span>;
<a id="cb3-5" class="sourceLine" data-line-number="5"></a>  <span class="kw">background-color</span>: <span class="dv">red</span>;
<a id="cb3-6" class="sourceLine" data-line-number="6"></a>  <span class="kw">float</span>:<span class="dv">left</span>;
<a id="cb3-7" class="sourceLine" data-line-number="7"></a>}</code></pre>
</div>
<p>Which gives us the result we would expect:</p>
<div class="html-output">
<div style="margin: auto; width: 300px; background-color: yellow;">
<div style="width: 80px; height: 50px; background-color: red; float: left; margin: 10px;"></div>
<div style="width: 80px; height: 50px; background-color: red; float: left; margin: 10px;"></div>
<div style="width: 80px; height: 50px; background-color: red; float: left; margin: 10px;"></div>
<div style="clear: both;"></div>
</div>
</div>
<p>If we decide to add a border (even just a 1px border) or padding (even just 1px of padding), it will cause the elements to wrap (again).<br />
We can compensate by subtracting the added widths of our border and padding, or we can set the <span class="css-property">box-sizing</span> property to <span class="css-value">border-box</span>:</p>
<div id="cb4" class="sourceCode">
<pre class="sourceCode css"><code class="sourceCode css"><a id="cb4-1" class="sourceLine" data-line-number="1"></a>* {
<a id="cb4-2" class="sourceLine" data-line-number="2"></a>  <span class="kw">box-sizing</span>: <span class="dv">border-box</span>;
<a id="cb4-3" class="sourceLine" data-line-number="3"></a>}</code></pre>
</div>
<p>Using the <strong>universal</strong> selector will cause all HTML elements to be sized according to their borders and not their content area. Personally, I think it is easier and more intuitive to work this way. When you layout the content on a page you imagine each block of content as being completely self contained &#8211; i.e., it includes the content, the padding around the content, and the border around the content. However, you do have to compensate for any margins you might use.</p>
<h2 id="calc"><span class="css-function">calc()</span></h2>
<p>We’ve seen that <strong>%</strong> is a more convenient way of dimensioning floating elements than using pixels. If you want 3 equally sized columns you can make them each <span class="css-value">33.33%</span> of the width of the parent container. You could also make 2 of them <span class="css-value">25%</span> and one <span class="css-value">50%</span>. Unfortunately, this makes compensating for margins a bit trickier.<br />
CSS has a function called <span class="css-function">calc()</span> that makes this a lot easier. You simply enter the dimensions &#8211; even if they are different units &#8211; and <span class="css-function">calc()</span> will perform the necessary calculation for you.<br />
Taking the example above, we can write the CSS code for the blocks as follows:</p>
<div id="cb5" class="sourceCode">
<pre class="sourceCode css"><code class="sourceCode css"><a id="cb5-1" class="sourceLine" data-line-number="1"></a><span class="fu">.block</span> {
<a id="cb5-2" class="sourceLine" data-line-number="2"></a>  <span class="kw">margin</span>: <span class="dv">10px</span>;
<a id="cb5-3" class="sourceLine" data-line-number="3"></a>  <span class="kw">width</span>: calc(<span class="dv">33.33%</span> - <span class="dv">10px</span> - <span class="dv">10px</span>);
<a id="cb5-4" class="sourceLine" data-line-number="4"></a>  <span class="kw">height</span>: <span class="dv">50px</span>;
<a id="cb5-5" class="sourceLine" data-line-number="5"></a>  <span class="kw">background-color</span>: <span class="dv">red</span>;
<a id="cb5-6" class="sourceLine" data-line-number="6"></a>  <span class="kw">float</span>:<span class="dv">left</span>;
<a id="cb5-7" class="sourceLine" data-line-number="7"></a>}</code></pre>
</div>
<p>The <span class="css-property">width</span> is set to <span class="css-value">33.33%</span> less <span class="css-value">10px</span> for the left margin and <span class="css-value">10px</span> for the right margin. It could have also been written as <span class="css-function">calc(33.33% &#8211; 20px)</span>, but I chose to <strong>explicitly</strong> subtract each margin independently for clarity.</p>
<h2 id="summary">Summary</h2>
<ol type="1">
<li>Divide the vertically stacking blocks</li>
<li>Try to contain horizontally stacking blocks (floating elements) in their own vertically stacking block.</li>
<li>As a general rules, you want all your floats to go in the same direction. In most cases this will be <span class="cwss-property">float: left</span>. If you are developing webpages for a language that is written right-to-left, you will prefer [float: right]{css-property}</li>
<li>Mixing <span class="cwss-property">float: left</span> and <span class="cwss-property">float: right</span> in the same containing block is, usually, a bad idea.</li>
<li>Sometimes, you do want floating elements to overlap other blocks (like images, or side notes). In this case, you need to ensure appropriate overlapping.</li>
<li>Setting your HTML elements to have <span class="css-property">box-sizing: border-box</span> makes it easier to layout horizontally flowing elements, since it takes into account any border and padding values you set.</li>
<li>Regardless of which <span class="css-property">box-sizing</span> model you choose, you must always compensate for any margin values you apply.</li>
<li>The CSS function <span class="css-function">calc()</span> makes it easier to compute box sizes. It even allows mixing units (like pixels and % together).</li>
</ol>
<h2 id="playing-around">Playing Around</h2>
<h3 id="dividing-up-a-page">Dividing Up a Page</h3>
<p>Learning how to divide up a page layout into HTML block elements is crucial to being able to code that page.</p>
<ol type="1">
<li>Explore a number of websites (news websites tend to be very good for this<a id="fnref2" class="footnote-ref" href="#fn2"><sup>2</sup></a>) and pay attention to how the pages are laid out.</li>
<li>How would you arrange the various HTML elements to create a similar layout?
<ol type="1">
<li>Which are the vertically flowing blocks?</li>
<li>How are vertical elements nested inside of blocks?</li>
</ol>
</li>
<li>Can you code a page with a similar layout?</li>
</ol>
<p>Many of these sites have very long pages. It is not necessary to replicate the entire page from top to bottom &#8211; just focus on the portion of the page you see in your browser window.<br />
Don’t try to mimic all the functionality or behaviour. You haven’t learned to embed videos yet (just substitute a picture). There are effects (like shadows, animations, or dropdowns) that you haven’t learned either. Just focus on getting the general layout and look, more or less, right.</p>
<h3 id="box-sizing-and-calc"><span class="css-property">box-sizing</span> and <span class="css-function">calc()</span></h3>
<ol type="1">
<li>Experiment with using <span class="css-property">box-sizing: border-box</span>. You can do this by setting all HTML elements to have this property.</li>
<li>Experiment using the <span class="css-function">calc()</span> function.</li>
</ol>
<p>You can use these with the page layouts you try out above.</p>
<h2 id="references">References</h2>
<ol type="1">
<li><a href="https://www.w3.org/TR/CSS21/visuren.html#propdef-float"><span class="css-property">float</span> property</a></li>
<li><a href="https://www.w3.org/TR/CSS21/visuren.html#propdef-clear"><span class="css-property">clear</span> property</a></li>
<li><a href="https://drafts.csswg.org/css-ui-3/#box-sizing"><span class="css-property">box-sizing</span> property</a></li>
<li><a href="https://drafts.csswg.org/css-values-3/#calc-notation"><span class="css-function">calc()</span> function</a></li>
</ol>
<div class="prev"><a href="https://complete-concrete-concise.com/tutorials/webdev/front-end-basics/css-a-simple-page-using-float">Prev</a></div>
<div class="next"><a href="https://complete-concrete-concise.com/tutorials/webdev/front-end-basics/css-a-more-advanced-float-example-part-1/">Next</a></div>
<div class="clear"></div>
<section class="footnotes">
<hr>
<ol>
<li id="fn1">The most commonly used RTL languages are Arabic, Hebrew, Persian, and Urdu.<a class="footnote-back" href="#fnref1">↩</a></li>
<li id="fn2">Some sites that I find interesting for their layout include: <a href="https://www.cbc.ca/">CBC</a>, <a href="https://bbc.co.uk">BBC</a>, <a href="https://www.engadget.com/">Engadget</a>. Of course, you are free to try and copy the look and layout of other sites as well.<a class="footnote-back" href="#fnref2">↩</a></li>
</ol>
</section>
<p>The post <a href="https://complete-concrete-concise.com/tutorials/webdev/front-end-basics/css-how-and-when-to-use-float/">CSS &#8211; How and When to Use Float</a> appeared first on <a href="https://complete-concrete-concise.com">Complete, Concrete, Concise</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Exit Vim</title>
		<link>https://complete-concrete-concise.com/vim/how-to-exit-vim/</link>
		
		<dc:creator><![CDATA[richardsplanet]]></dc:creator>
		<pubDate>Mon, 22 Jan 2018 11:59:27 +0000</pubDate>
				<category><![CDATA[Vim]]></category>
		<category><![CDATA[exit]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[quit]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[understanding]]></category>
		<category><![CDATA[vim]]></category>
		<guid isPermaLink="false">http://www.complete-concrete-concise.com/?p=3362</guid>

					<description><![CDATA[<p>Simple help on exiting Vim.</p>
<p>The post <a href="https://complete-concrete-concise.com/vim/how-to-exit-vim/">How to Exit Vim</a> appeared first on <a href="https://complete-concrete-concise.com">Complete, Concrete, Concise</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="preamble">
<p>While Vim has a steep learning curve, you can <a href="//complete-concrete-concise.com/writing/5-minute-vim-tutorial">learn enough Vim in 5 minutes</a> to not be completely lost when you use it.</p>
</div>
<p>To exit Vim you need to be in <span class="mark">Normal Mode</span>.</p>
<p>To get to <span class="mark">Normal Mode</span> press the <span class="kbd">Escape</span> key twice. Your computer may beep at you, but that is OK.</p>
<p>Type <span class="kbd">:q!</span> followed by the <span class="kbd">Enter</span> key to <strong>quit without saving</strong>.</p>
<p>Type <span class="kbd">:x!</span> followed by the <span class="kbd">Enter</span> key to <strong>save changes and exit</strong>.</p>
<div class="hint">
<p>If you see <strong>recording</strong> in the lower left corner of the screen, press <span class="kbd">q</span> to exit recording mode, then proceed as described above.</p>
<pre class="vim"><code>
  &lt;body&gt;
    &lt;!-- page content goes here --&gt;
    &lt;p&gt;This is some dummy content.&lt;/p&gt;
  &lt;/body&gt;
&lt;/html&gt;
~
~
~
recording @q                            1,1           All</code></pre>
<p>&nbsp;
</p></div>
<p>The post <a href="https://complete-concrete-concise.com/vim/how-to-exit-vim/">How to Exit Vim</a> appeared first on <a href="https://complete-concrete-concise.com">Complete, Concrete, Concise</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>5 Minute Vim Tutorial</title>
		<link>https://complete-concrete-concise.com/blog/5-minute-vim-tutorial/</link>
		
		<dc:creator><![CDATA[richardsplanet]]></dc:creator>
		<pubDate>Wed, 26 Oct 2016 18:11:54 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Vim]]></category>
		<category><![CDATA[Web Tools]]></category>
		<category><![CDATA[Writing]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[understanding]]></category>
		<category><![CDATA[vim]]></category>
		<guid isPermaLink="false">http://www.complete-concrete-concise.com/?p=3186</guid>

					<description><![CDATA[<p>This tutorial won't turn you into a Vim wizard, but at least you will be able to open, navigate, edit, and save files using Vim.</p>
<p>The post <a href="https://complete-concrete-concise.com/blog/5-minute-vim-tutorial/">5 Minute Vim Tutorial</a> appeared first on <a href="https://complete-concrete-concise.com">Complete, Concrete, Concise</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="preamble">
Vim works differently from other editors you are used to, but it only takes about 5 minutes to learn the basics you need to edit with Vim. You won’t be a Vim wizard, but you will be able to:</p>
<ul>
<li>Open a file</li>
<li>Move around in a file</li>
<li>Edit text in a file</li>
<li>Save a File</li>
</ul>
<p>The slightly longer <a href="#Extended">Extended 5 Minute Tutorial</a> you will show you how to <strong>search</strong> in a file, get <strong>help</strong>, and <strong>access</strong> Vim’s own built-in tutorial.
</div>
<h2 id="contents">Contents</h2>
<ol type="1">
<li><a href="#Vim-in-5">Vim in 5 Minutes (or less)</a></li>
<li><a href="#Extended">The Extended 5+ Minute Tutorial</a>
<ol type="1">
<li><a href="#Normal">Normal Mode</a></li>
<li><a href="#Opening">Opening a File</a></li>
<li><a href="#Saving">Saving a File</a></li>
<li><a href="#Exiting">Exiting Vim</a></li>
<li><a href="#Navigating">Navigating a File</a></li>
<li><a href="#Inserting">Inserting and Deleting Text</a></li>
<li><a href="#Searching">Searching</a></li>
<li><a href="#Help">Getting Help</a></li>
</ol>
</li>
<li><a href="#Final">Final Words</a></li>
</ol>
<h2 id="Vim-in-5">Vim in 5 Minutes (or less)</h2>
<ul>
<li>Vim operates in <span class="mark">Modes</span>. Vim always starts in <span class="mark">Normal Mode</span>.</li>
<li><span class="mark">Normal Mode</span> is your base mode and you should always return to it.</li>
<li>All command / control keys are <strong>case sensitive</strong>.</li>
<li>If you are not in <span class="mark">Normal Mode</span>, you (usually) get back to <span class="mark">Normal Mode</span> by pressing the <span class="kbd">Escape</span> key twice.</li>
<li>If you see <span class="mark">recording</span> in the lower left corner of the screen, press the <span class="kbd">q</span> key to return to <span class="mark">Normal Mode</span>.</li>
<li>If you’ve messed stuff up, return to <span class="mark">Normal Mode</span> and type <span class="kbd">:q!</span> followed by the <span class="kbd">Enter</span> key to exit Vim <strong>without</strong> saving the file.</li>
<li>In <span class="mark">Normal Mode</span> you can navigate the file using the <span class="kbd">h</span>, <span class="kbd">j</span>, <span class="kbd">k</span>, <span class="kbd">l</span> keys (left, down, up, right). You might also be able to use the arrow keys on the keyboard<a id="fnref1" class="footnote-ref" href="#fn1"><sup>1</sup></a>.</li>
<li>When you have navigated to where you want to edit the file (inserting or deleting text), press the <span class="kbd">i</span> key to enter <span class="mark">Insert Mode</span>.</li>
<li>In <span class="mark">Insert Mode</span> you can <strong>only</strong> enter or delete text from the current cursor position &#8211; you <strong>cannot</strong> navigate. To navigate, press the <span class="kbd">Escape</span> key to return to <span class="mark">Normal Mode</span>.</li>
<li>To save (write) the file, return to <span class="mark">Normal Mode</span> and type <span class="kbd">:w</span> followed by the <span class="kbd">Enter</span> key.</li>
<li>To exit (quit) Vim, return to <span class="mark">Normal Mode</span> and type <span class="kbd">:q</span> followed by the <span class="kbd">Enter</span> key.</li>
</ul>
<h2 id="Extended">The Extended 5 Minute Tutorial</h2>
<p>This adds <span class="mark">searching</span> and <span class="mark">help</span> to the 5 Minute Tutorial, but, otherwise, keeps the information to the bare minimum so you can quickly be functional in Vim instead of frustrated.<br />
All command / control keys are <strong>case sensitive</strong>: <span class="kbd">h</span> is not the same as <span class="kbd">H</span>!</p>
<h3 id="Normal">Normal Mode</h3>
<p><span class="mark">Normal Mode</span> is the default mode and it should be the mode you always go back to.<br />
Most times, you press the <span class="kbd">Escape</span> key once or twice<a id="fnref2" class="footnote-ref" href="#fn2"><sup>2</sup></a> to return to <span class="mark">Normal Mode</span>.<br />
If you see <span class="mark">recording</span> in the lower left corner of the screen, press the lowercase <span class="kbd">q</span> key to return to <span class="mark">Normal Mode</span>.</p>
<h3 id="Opening">Opening a File</h3>
<p>The simplest way to open a file is to type <span class="kbd">vim</span> at the command line followed by the name of the file:</p>
<div id="cb1" class="sourceCode">
<pre class="sourceCode bash"><code><a id="cb1-1" class="sourceLine" data-line-number="1"></a><span class="ex">user@COMPUTER</span>:~$ vim file.txt</code></pre>
</div>
<p>If it is a <strong>new</strong> file you should see something like this:</p>
<pre class="vim"><code>
~
~
~
~
~
"file.txt" [New File]                       0,0-1          All</code></pre>
<p>If it is an <strong>existing</strong> file, you should see something like <span class="note" data-note="The actual contents will depend on the file you opened.">this</span>:</p>
<pre class="vim"><code>&lt;!doctype html&gt;
&lt;html lang="en"&gt;
  &lt;head&gt;
    &lt;meta charset="utf-8"&gt;
    &lt;title&gt;Basic HTML5 Template&lt;/title&gt;
    &lt;link rel="stylesheet" href="style.css"&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;!-- page content goes here --&gt;
    &lt;p&gt;This is some dummy content that is not lorem ipsum.&lt;/p&gt;
  &lt;/body&gt;
&lt;/html&gt;
~
~
~
"basic.html" 12L, 290C                      1,1           All</code></pre>
<p>The status line<a id="fnref3" class="footnote-ref" href="#fn3"><sup>3</sup></a> (at the bottom of the screen) displays the following information:</p>
<ul>
<li>file name</li>
<li>total number of lines in the file</li>
<li>total number of characters in the file</li>
<li>current line the cursor is on</li>
<li>current column the cursor is in</li>
<li>percentage showing the position in the file (if <span class="mark">All</span> : the entire file is visible, <span class="mark">Bot</span> : at the bottom (end) of the file, <span class="mark">Top</span> : at the top of the file)</li>
</ul>
<p>In <span class="mark">Normal Mode</span> load a file by typing <span class="kbd">:edit</span> followed by the filename and then pressing the <span class="kbd">Enter</span> key.:</p>
<pre class="vim"><code>:edit basic.html</code></pre>
<p>This discards the current file (if any) and loads the specified file.<br />
If the file to be discarded has been modified, but not saved, you will see the following warning in the status line:</p>
<pre class="vim"><code>E37: No write since last change (add ! to override)</code></pre>
<p>If you don’t care about saving the file, simply append <span class="kbd">!</span> to the <span class="kbd">:edit</span> command:</p>
<pre class="vim"><code>:edit! basic.html</code></pre>
<p>The <span class="kbd">!</span> tells Vim to “just do it!” and ignore any warnings.</p>
<h3 id="Saving">Saving a File</h3>
<p>You need to be in <span class="mark">Normal Mode</span> to save a file.<br />
Save a file by typing <span class="kbd">:w</span> followed by the <span class="kbd">Enter</span> key.<br />
If you want to save the file with a different name, type <span class="kbd">:w</span> followed by the new file name and then press the <span class="kbd">Enter</span> key:</p>
<pre class="vim"><code>:w new-filename.txt</code></pre>
<h3 id="Exiting">Exiting Vim</h3>
<p>You need to be in <span class="mark">Normal Mode</span> to exit Vim.<br />
Type <span class="kbd">:q</span> followed by the <span class="kbd">Enter</span> key to exit Vim.<br />
If Vim warns you that the file has been modified, you can choose to <a href="#Saving">save it</a> or you can force Vim to exit without saving the file by typing <span class="kbd">:q!</span> followed by the <span class="kbd">Enter</span> key. The <span class="kbd">!</span> tells Vim to “just do it” and exit without saving the file.</p>
<h3 id="navigating-a-file-navigating">Navigating a File {Navigating}</h3>
<p>You need to be in <span class="mark">Normal Mode</span> to navigate a file.<br />
The letters <span class="kbd">h</span>, <span class="kbd">j</span>, <span class="kbd">k</span>, <span class="kbd">l</span> navigate the cursor through the file. (You may also be able to use the arrow keys present on most keyboards.)<br />
They act like arrow keys and are conceptually laid out like this:</p>
<table style="font-size: 2em; text-align: centered; font-family: inconsolata,monospace; border-collapse: collapse;">
<tbody>
<tr>
<td style="padding: 0.2em 1em 0 1em; border: 1px solid black;">h<br />
←</td>
<td style="padding: 0.2em 1em 0 1em; border: 1px solid black;">j<br />
↓</td>
<td style="padding: 0.2em 1em 0 1em; border: 1px solid black;">k<br />
↑</td>
<td style="padding: 0.2em 1em 0 1em; border: 1px solid black;">l<br />
→</td>
</tr>
</tbody>
</table>
<p>When you navigate left (<span class="kbd">h</span>) to the beginning of a line, the cursor will stop. It will <strong>not</strong> wrap around and up to the previous line.<br />
When you navigate right (<span class="kbd">l</span>) to the end of a line, the cursor will stop. It will <strong>not</strong> wrap around and down to the next line.<br />
If you type a <strong>positive</strong> integer (which will not be displayed), followed by one of the navigation keys, the cursor will move that many characters / lines.<br />
For example, in <span class="mark">Normal Mode</span>, if you type <span class="kbd">10j</span>, the cursor will move down 10 lines.</p>
<h3 id="Inserting">Inserting and Deleting Text</h3>
<p>In <span class="mark">Insert Mode</span> the only thing you can do is insert or delete text. (You <strong>may</strong> be able to use the arrow keys on your keyboard to navigate the text while in this mode, but there is no guarantee, navigating is supposed to be done in <span class="mark">Normal Mode</span>)<br />
Enter <span class="mark">Insert Mode</span> by pressing the <span class="kbd">i</span>, <span class="kbd">a</span>, <span class="kbd">I</span>, or <span class="kbd">A</span> key.</p>
<ul>
<li><span class="kbd">i</span> insert / delete before the cursor (what you would intuitively expect when entering or deleting text).</li>
<li><span class="kbd">a</span> append / delete after the current cursor position.</li>
<li><span class="kbd">I</span> insert / delete at the beginning of the line.</li>
<li><span class="kbd">A</span> append / delete at the end of the line.</li>
</ul>
<p>You will (probably) be using <span class="kbd">i</span> most frequently.<br />
When you enter <span class="mark">Insert Mode</span> you will see <span class="mark">– INSERT –</span> displayed in the lower left corner:</p>
<pre class="vim"><code>The navigation keys are h, j, k, l.
h moves the̲ cursor one character left
l moves the cursor one character right
j moves the cursor one line down
k moves the cursor one line up
~
~
~
~
-- INSERT --                       3,11      All</code></pre>
<p>Press the <span class="kbd">Escape</span> key to return to <span class="mark">Normal Mode</span>.</p>
<h3 id="Searching">Searching</h3>
<p>You must be in <span class="mark">Normal Mode</span> to search.<br />
In a large file, it is useful to locate items of interest by searching for them.<br />
To search, type <span class="kbd">/</span> followed by the text you want to find, followed by the <span class="kbd">Enter</span> key.<br />
Vim treats the search string as a regular expression &#8211; which means some characters have a special meaning. If you need to search for the following characters, you will need to type them as follows:</p>
<table style="border-collapse: collapse;">
<tbody>
<tr style="font-weight: bold;">
<td style="padding: 0.2em 1em 0 1em; border: 1px solid black;">Name</td>
<td style="padding: 0.2em 1em 0 1em; border: 1px solid black;">Character</td>
<td style="padding: 0.2em 1em 0 1em; border: 1px solid black;">Need to Type</td>
</tr>
<tr>
<td style="padding: 0.2em 1em 0 1em; border: 1px solid black;">Period</td>
<td style="padding: 0.2em 1em 0 1em; border: 1px solid black; text-align: center;">.</td>
<td style="padding: 0.2em 1em 0 1em; border: 1px solid black; text-align: center;">.</td>
</tr>
<tr>
<td style="padding: 0.2em 1em 0 1em; border: 1px solid black;">Asterisk</td>
<td style="padding: 0.2em 1em 0 1em; border: 1px solid black; text-align: center;">*</td>
<td style="padding: 0.2em 1em 0 1em; border: 1px solid black; text-align: center;">\*</td>
</tr>
<tr>
<td style="padding: 0.2em 1em 0 1em; border: 1px solid black;">Backslash</td>
<td style="padding: 0.2em 1em 0 1em; border: 1px solid black; text-align: center;">&lt;/td&gt;</td>
<td style="padding: 0.2em 1em 0 1em; border: 1px solid black; text-align: center;">\</td>
</tr>
<tr>
<td style="padding: 0.2em 1em 0 1em; border: 1px solid black;">Dollar Sign</td>
<td style="padding: 0.2em 1em 0 1em; border: 1px solid black; text-align: center;">$</td>
<td style="padding: 0.2em 1em 0 1em; border: 1px solid black; text-align: center;">$</td>
</tr>
<tr>
<td style="padding: 0.2em 1em 0 1em; border: 1px solid black;">Forward Slash</td>
<td style="padding: 0.2em 1em 0 1em; border: 1px solid black; text-align: center;">/</td>
<td style="padding: 0.2em 1em 0 1em; border: 1px solid black; text-align: center;">/</td>
</tr>
</tbody>
</table>
<p>Searches are case sensitive.<br />
You can navigate between search results by pressing <span class="kbd">n</span> (next) or <span class="kbd">N</span> (previous).</p>
<h3 id="Help">Getting Help</h3>
<p>You need to be in <span class="mark">Normal Mode</span> to use help.<br />
To get help on something in Vim, simply type <span class="kbd">:help</span> followed by the thing you want help on.<br />
For example, to get help on the navigation key <span class="kbd">h</span>, type <span class="kbd">:help h</span> followed by the <span class="kbd">Enter</span> key.<br />
You should see something similar to the following:</p>
<pre class="vim"><code>h         or          *h*
&lt;Left&gt;    or          *&lt;Left&gt;*
CTRL-H    or          *CTRL-H* *&lt;BS&gt;*
&lt;BS&gt;      [count] characters to the left.  |exclusive| motion.
          Note: If you prefer &lt;BS&gt; to delete a character, use
          the mapping:
             :map CTRL-V&lt;BS&gt;    X
          (to enter "CTRL-V&lt;BS&gt;" type the CTRL-V key, followed
          by the &lt;BS&gt; key)
          See |:fixdel| if the &lt;BS&gt; key does not do what you
          want.
m̲o̲t̲i̲o̲n̲.̲t̲x̲t̲ ̲[̲H̲e̲l̲p̲]̲[̲R̲O̲]̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲1̲7̲2̲,̲1̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲1̲2̲%̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
Vim will split the display into two panes. In the upper pane
you will see the help text. In the lower pane you will see your
current editing buffer.
Now you know that Vim supports multiple editing buffers - but
that is not the point of this tutorial.
~
~
~
~
a-file.txt                     4,5              All
</code></pre>
<p>The help can be pretty dense and not user friendly, but it <em>may</em> be helpful.<br />
To close the help window, type <span class="kbd">:q</span> followed by the <span class="kbd">Enter</span> key.<br />
If you type <span class="kbd">:help</span>, it will bring up the general help file. You can navigate through it for topics of interest.<br />
You might also try <span class="kbd">:help tutor</span> for instructions on accessing the Vim tutor which is included with every Vim installation.</p>
<h3 id="Final">Final Words</h3>
<p>Vim may not be the easiest or most intuitive editor you will come across. However, it (or its ancestor Vi) is quite ubiquitous and this tutorial gives you the basics you need so you are minimally functional with it.<br />
The basics are simple:</p>
<ol type="1">
<li>Vim operates in <span class="mark">Modes</span>.</li>
<li>All command / control keys are <strong>case sensitive</strong> : <span class="kbd">k</span> is not the same as <span class="kbd">K</span>.</li>
<li>The base mode is <span class="mark">Normal Mode</span>. You (usually) get back to it by pressing the <span class="kbd">Escape</span> key once or twice.</li>
<li>Navigating a file is done in <span class="mark">Normal Mode</span> using the <span class="kbd">h</span>, <span class="kbd">j</span>, <span class="kbd">k</span>, <span class="kbd">l</span> keys.</li>
<li>When the cursor is where you want to insert or delete text, you press the <span class="kbd">i</span> key to enter <span class="mark">Insert Mode</span>.</li>
<li>Search in <span class="mark">Normal Mode</span> by typing <span class="kbd">/</span> followed by the string you want to find and then the <span class="kbd">Enter</span> key. Navigate the search results using the <span class="kbd">n</span> and <span class="kbd">N</span> keys.</li>
<li>Save a file by typing <span class="kbd">:w</span> in <span class="mark">Normal Mode</span>.</li>
<li>Exit Vim by typing <span class="kbd">:q</span> in <span class="mark">Normal Mode</span>.</li>
<li>In <span class="mark">Normal Mode</span> you can get help by typing <span class="kbd">:help</span></li>
</ol>
<section class="footnotes">
<hr />
<ol>
<li id="fn1">Vi (the precursor to Vim) was developed in 1976. Arrow keys were not commonly found on keyboards, so <span class="kbd">h</span>, <span class="kbd">j</span>, <span class="kbd">k</span>, <span class="kbd">l</span> were used.<a class="footnote-back" href="#fnref1">↩</a></li>
<li id="fn2">Some modes require one key press, others require two. If you press it too many times, the computer will just beep at you. Vim newbies often repeatedly press the <span class="kbd">Escape</span> key in the hopes of returning to <span class="mark">Normal Mode</span><a class="footnote-back" href="#fnref2">↩</a></li>
<li id="fn3">This is true for the default Status Line. It is always possible that someone has modified the Status Line to display different information, or in a different arrangement.<a class="footnote-back" href="#fnref3">↩</a></li>
</ol>
</section>
<p>The post <a href="https://complete-concrete-concise.com/blog/5-minute-vim-tutorial/">5 Minute Vim Tutorial</a> appeared first on <a href="https://complete-concrete-concise.com">Complete, Concrete, Concise</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Replacing the Toner Cartridge in a Brother HL-3140CW Printer</title>
		<link>https://complete-concrete-concise.com/blog/replacing-the-toner-cartridge-in-a-brother-hl-3140cw-printer/</link>
		
		<dc:creator><![CDATA[richardsplanet]]></dc:creator>
		<pubDate>Tue, 03 Dec 2013 15:14:42 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[hl-3140cw]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[replace]]></category>
		<category><![CDATA[toner]]></category>
		<guid isPermaLink="false">http://complete-concrete-concise.com/?p=3050</guid>

					<description><![CDATA[<p>It's not difficult, but not entirely obvious either.</p>
<p>The post <a href="https://complete-concrete-concise.com/blog/replacing-the-toner-cartridge-in-a-brother-hl-3140cw-printer/">Replacing the Toner Cartridge in a Brother HL-3140CW Printer</a> appeared first on <a href="https://complete-concrete-concise.com">Complete, Concrete, Concise</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="c1">
<p>Replacing the toner cartridge in the Brother HL-3140CW laser printer is not difficult, but it is not immediately obvious because the toner and drum assembly are joined together.</p>
</div>
<p><strong>1) Open</strong> the laser printer by lifting the the top part. There are no catches to unlock, so it is easy enough to open:</p>
<p><img fetchpriority="high" decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2013/12/3140-replace-toner-1.jpg" width="480" height="320" alt="" border="0" class="centered"/></p>
<p><strong>2) Remove</strong> the toner cartridge to replace. It will be one of the four cartridges shaded in green. The entire cartridge assembly lifts right out, there are no latches to unlock:</p>
<p><img decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2013/12/3140-replace-toner-2.jpg" width="480" height="320" alt="" border="0" class="centered"/></p>
<div class="c1">
<p>What you have in your hands is two pieces &#8211; the toner and the drum &#8211; even if it looks like just one part:</p>
<p><img decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2013/12/3140-replace-toner-3.jpg" width="480" height="193" alt="" border="0" class="centered"/></p>
<p>Disassembled, the two parts look like this:</p>
<p><img loading="lazy" decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2013/12/3140-replace-toner-4.jpg" width="480" height="418" alt="" border="0" class="centered"/></p>
<p>The part in blue is the drum. Be careful not to get fingerprints on the drum itself (the round cylinder at the end).</p>
<p>The part in green is the toner.</p>
</div>
<p><strong>3) Lay</strong> the toner and drum assembly on a clean, flat surface (preferably with a sheet of paper underneath in case some toner spills out) with the green tabs facing up:</p>
<p><img decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2013/12/3140-replace-toner-3.jpg" width="480" height="193" alt="" border="0" class="centered"/></p>
<p><strong>4) Press</strong> down on the green latch (bottom left, if you have oriented your assembly like the image above) to unlatch the toner from the drum and remove the toner:</p>
<p><img loading="lazy" decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2013/12/3140-replace-toner-5.jpg" width="480" height="454" alt="" border="0" class="centered"/></p>
<p><strong>5) Insert</strong> the new toner into the drum assembly. It should fit and latch easily.</p>
<div class="c2">
<p>Before inserting the new toner, remember to gently tilt it from side to side to evenly distribute the toner inside.</p>
</div>
<p><strong>6) Slide</strong> the green slider on the drum assembly back and forth a few times. <strong>Remember</strong> to return it to its latched position.</p>
<p><strong>7) Reinsert</strong> the toner and drum assembly back into the printer. It should drop in easily.</p>
<p><strong>8) Close</strong> the printer an wait for it to go through its cycle.</p>

<p>The post <a href="https://complete-concrete-concise.com/blog/replacing-the-toner-cartridge-in-a-brother-hl-3140cw-printer/">Replacing the Toner Cartridge in a Brother HL-3140CW Printer</a> appeared first on <a href="https://complete-concrete-concise.com">Complete, Concrete, Concise</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Ubuntu 13.04 &#8211; Basic Unity Interface / Desktop Tutorial</title>
		<link>https://complete-concrete-concise.com/ubuntu-2/ubuntu-13-04/ubuntu-13-04-basic-unity-interface-desktop-tutorial/</link>
		
		<dc:creator><![CDATA[richardsplanet]]></dc:creator>
		<pubDate>Tue, 30 Apr 2013 07:26:35 +0000</pubDate>
				<category><![CDATA[Ubuntu 13.04]]></category>
		<category><![CDATA[basic]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[introduction]]></category>
		<category><![CDATA[introductory]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[ubuntu 13.04]]></category>
		<category><![CDATA[unity]]></category>
		<guid isPermaLink="false">http://complete-concrete-concise.com/?p=2917</guid>

					<description><![CDATA[<p>The basics of Unity are easy to pick up.</p>
<p>The post <a href="https://complete-concrete-concise.com/ubuntu-2/ubuntu-13-04/ubuntu-13-04-basic-unity-interface-desktop-tutorial/">Ubuntu 13.04 &#8211; Basic Unity Interface / Desktop Tutorial</a> appeared first on <a href="https://complete-concrete-concise.com">Complete, Concrete, Concise</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="c1">
<p>This is a basic tutorial for the Unity Interface / Desktop which comes with Ubuntu 13.04 &#8211; it should help get you up and running.</p>
<p>Each new version of Unity (introduced in 11.04) improves on the functionality of the desktop.</p>
<div class="c2">
<p>This tutorial reflects the way I understand and use the Unity interface.</p>
</div>
</div>
<p>The Unity interface consists of four main parts:</p>
<ol>
<li>Panel</li>
<li>Launcher</li>
<li>Dash</li>
<li>HUD</li>
</ol>
<h2>The Panel</h2>
<p>The Panel is the strip at the top of the interface:</p>
<p><a href="//complete-concrete-concise.com/wp-content/uploads/2013/04/1304-unity-tutorial-1-big.png" target="_blank"><img decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2013/04/1304-unity-tutorial-1-thumb.png" alt="" border="0" class="centered"/></a></p>
<p>The menu bar that you are used to seeing near the top of an application&#8217;s window is now displayed in the panel:</p>
<p><a href="//complete-concrete-concise.com/wp-content/uploads/2013/04/1304-unity-tutorial-2-big.png" target="_blank"><img decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2013/04/1304-unity-tutorial-2-thumb.png" alt="" border="0" class="centered"/></a></a></p>
<p>There is a catch:</p>
<ol>
<li>The menus displayed in the Panel are <u>only</u> for the active (topmost) application window.</li>
<li>The menus are <u>only</u> displayed when you <u>hover</u> your mouse over the Panel, otherwise, the Panel is empty.</li>
<li>If a window is maximized (full screen), the buttons (icons) for minimize, maximize, and close are hidden unless you hover your mouse over the panel.</li>
</ol>
<p>This might seem like a step backward. Why hide the menu bar? Why make the user have to move the mouse all the way to the panel to access it? While it gives a little extra window space to the application, it is also inefficient – and this was the problem with Unity in Ubuntu 11.04 and 11.10.</p>
<p>Since Ubuntu 12.04, Unity has the HUD. The HUD makes mousing / navigating through menus obsolete (mostly).</p>
<p>Additional things displayed in the Panel include:</p>
<ul>
<li>the name of the active (topmost) application (green)</li>
<li>various indicators (blue)</li>
<li>the time (yellow)</li>
<li>the system menu (red)</li>
</ul>
<p><a href="//complete-concrete-concise.com/wp-content/uploads/2013/04/1304-unity-tutorial-3-big.png" target="_blank"><img decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2013/04/1304-unity-tutorial-3-thumb.png" alt="" border="0" class="centered"/></a></p>
<h2>The Launcher</h2>
<div class="c1">
<p>Despite being the most prominent feature of the Unity interface, it is the one I use the least.</p>
</div>
<p>This is the panel of buttons on the left hand side of the screen:</p>
<p><a href="//complete-concrete-concise.com/wp-content/uploads/2013/04/1304-unity-tutorial-4-big.jpg" target="_blank"><img loading="lazy" decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2013/04/1304-unity-tutorial-4-thumb.jpg" width="480" height="360" alt="" border="0" class="centered"/></a></p>
<p>It serves 3 functions:</p>
<ol>
<li><strong>Application Launcher:</strong> clicking on an icon will launch the application associated with that icon. e.g. Clicking on the FireFox icon launches the FireFox browser.</p>
</li>
<li><strong>Visual indicator of running applications:</strong> any running application has its icon placed in the Launcher and an indicator showing its status.
<ol>
<li><strong>Two solid triangles:</strong> this is the active application (the one on top).</li>
<li><strong>Single solid triangle:</strong> the application is running, but does not have focus (is not on top).</li>
<li><strong>Single open triangle:</strong> the application is running in a different workspace (by default, Ubuntu 13.04 sets up only a single workspace. You can read how to enable workspaces <a href="//complete-concrete-concise.com/ubuntu-2/ubuntu-13-04/ubuntu-13-04-how-to-enable-multiple-workspaces">here</a>.).</li>
</ol>
<p><img decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2012/04/ubuntu-12.04-basic-unity-tutorial-launcher-2.jpg" alt="" border="0" class="centered" /></p>
<li><strong>Application Switcher:</strong> you can switch to an application (bring it to the front) by clicking on its icon in the Launcher.</li>
</ol>
<h3>Removing an Application from the Launcher</h3>
<div class="c1">
<p><strong>Note:</strong> removing an application from the Launcher does <u><strong>not</strong></u> uninstall the application.</p>
</div>
<p>The Launcher can become cluttered with applications (when you install an application using the Ubuntu Software Center, it is usually automatically placed in the Launcher).</p>
<p><strong>1) Right-click</strong> on the application you want to remove from the launcher. This will display a popup menu.</p>
<p><strong>2) Click</strong> on <u>Unlock from Launcher</u> in the popup menu:</p>
<p><img loading="lazy" decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2013/04/1304-unity-tutorial-5.jpg" width="480" height="203" alt="" border="0" class="centered"/></p>
<h3>Adding an Application to the Launcher</h3>
<p>Sometimes, an application is not added to the Launcher, or you had previously removed it.</p>
<p><strong>1) Start</strong> the application / program you want to add to the Launcher.</p>
<p><strong>2) Find</strong> the application&#8217;s icon in the Launcher.</p>
<p><strong>3) Right-click</strong> on the icon. This will display a popup menu.</p>
<p><strong>4) Click</strong> on <u>Lock to Launcher</u> to add the program to the Launcher:</p>
<p><img decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2013/04/1304-unity-tutorial-6.png" alt="" border="0" class="centered"/></p>
<div class="c2">
<p>In general, only the most commonly used applications should be in the launcher.</p>
</div>
<h2>Dash</h2>
<div class="c1">
<p>The Dash replaces searching through menu hierarchies for applications.</p>
<p>Like anything new, it feels all wrong, but, I found it very easy to pick up and now prefer it over the traditional menu navigating paradigm.</p>
</div>
<p>Instead or navigating a hierarchy of menus, Dash provides a query field in which you type the name of the application or document you want to open.</p>
<p>Using the Dash interface is very much like searching with Google &#8211; as you type in what you are looking for, Dash displays possible results.</p>
<div class="c2">
<p>I think the greatest strength of Dash is that you can navigate it completely via the keyboard, so you never alternate between typing and reaching for the mouse.</p>
</div>
<p>Dash is activated by either:</p>
<p><strong>1) Clicking</strong> on the Dash icon in the Launcher:</p>
<p><img loading="lazy" decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2013/04/1304-unity-tutorial-7.jpg" width="480" height="149" alt="" border="0" class="centered"/></p>
<p><strong>2) Tapping</strong> the <u>Windows</u> key on your keyboard</p>
<div class="c2">
<p><strong>Note:</strong> tapping the <u>Windows</u> keys means pressing it as though you intend to type it. It does not mean holding down the key (holding down the key does something else).</p>
<p>Ubuntu calls this the <u>Super</u> key</p>
</div>
<p><img decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2012/04/ubuntu-12.04-basic-unity-tutorial-dash-2.jpg" alt="" border="0" class="centered" /></p>
<p>The Dash panel looks something like this (click for a larger image):</p>
<p><a href="//complete-concrete-concise.com/wp-content/uploads/2013/04/1304-unity-tutorial-8-big.jpg" target="_blank"><img loading="lazy" decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2013/04/1304-unity-tutorial-8-thumb.jpg" width="480" height="327" alt="" border="0" class="centered"/></a></p>
<p>It is divided into upto 5 sections:</p>
<ol>
<li>
<p>The query field (<span class="i1">outlined in green</span>) is where the keyboard focus goes when you activate the Dash.</p>
<p>Type the name of the application you want to run, or document you want to open. As you type, Dash will update the list of applications and documents.</p>
<p>It has improved greatly since 11.04, if you type in <code>game</code> you will get <u>Mahjong</u>, <u>AisleRiot Solitaire</u> and <u>Freecell Solitaire</u>, and <u>Sudoku</u>.</p>
<p>I suspect it may still miss certain applications because they are not listed in the &#8220;obvious&#8221; way. For example, previous versions of Unity would not display <u>Sudoku</u> if you typed in <code>game</code> &#8211; you needed to type in <code>puzzle</code>.</p>
<p>If you type in <code>games</code> it will only display <u>AisleRiot Solitaire</u>, but none of the other games.</p>
</li>
<li>
<p>A list of the most recently used applications (<span class="i3">outlined in red</span>) is displayed. If you type in the query field, the list of applications is modified to match your search.
</p>
<p>You can use your mouse to select an application, or you can use the arrow keys to navigate to the desired application (and then press <code>Enter</code>. I like using the arrow keys because my hands don&#8217;t have to leave the keyboard.</p>
</li>
<li>
<p>A list of the most recent viewed documents (<span class="i2">outlined in blue</span>) is displayed. If you type in the query field, the list of documents is modified to match your search.</p>
<p>You can use your mouse or the arrow keys to navigate and select the desired document. I like using the arrow keys because my hands don&#8217;t have to leave the keyboard.</p>
</li>
<li>
<p>Relevant search results from Amazon (<span class="i4">outlined in yellow</span>) . As you type your query, it is sent to Amazon (anonymously via Ubuntu) and relevant results are displayed.</p>
<p>Many people find this intrusive and disable this feature. Instructions to disable Amazon search results are here.</p>
<p>I don&#8217;t have a problem with it, but wish it was more customizable. For instance, I don&#8217;t want Amazon search results in my main Dash panel. I don&#8217;t mind them if I am using the music lens or movie lens (explained in more detail below). Unfortunately, there is no way to selectively enable Amazon search results.</p>
</li>
<li>
<p>At the very bottom of the Dash (<span class="i2">shaded in green</span>) are a number of icons. These are &#8220;lenses&#8221;.  A lens is a specifically focussed (or themed) query. The five lenses at the bottom are:</p>
<ol>
<li>Dash lens: this is the default lens &#8211; it searches everything you are possibly connected to which includes your computer as well as any cloud services you use.</li>
<li>Applications lens: this focuses searches only within applications.</li>
<li>Folders and Documents lens: this focuses searches only on folders and documents.</li>
<li>Music lens: focuses search on music.</li>
<li>Photos Lens: focuses search on photos.</li>
<li>Video lens: focuses search on videos.</li>
</ol>
<p>You can navigate to the lenses using either the mouse or keyboard.</p>
<p>Typing <code>Ctrl + Tab</code> will navigate through the lenses.</p>
<div class="c2">
<p><strong>Note:</strong> typing <code>Ctrl + Tab</code> means, &#8220;While holding down the <code>Ctrl</code> key, press the <code>Tab</code> key as though you intend to type it.&#8221;</p>
</div>
<p>If you hold the <u>Windows</u> (Super) key down for a few seconds, a cheat sheet of commands will be displayed (click for larger image):</p>
<p><a href="//complete-concrete-concise.com/wp-content/uploads/2012/04/ubuntu-12.04-basic-unity-tutorial-dash-4-big.jpg" target="_blank"><img decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2012/04/ubuntu-12.04-basic-unity-tutorial-dash-4-thumb.jpg" alt="" border="0" class="centered" /></a></p>
<div class="c2">
<p><strong>Note:</strong> the cheat sheet only appears if your screen resolution is 1024&#215;768 or greater.</p>
</div>
<h2>HUD</h2>
<div class="c1">
<p>The HUD was introduced in Ubuntu 12.04 and combined with Dash it provides a powerful way of interacting with your applications.</p>
<p>Just as Dash replaces navigating a hierarchy of menus to find applications and documents, HUD replaces navigating a hierarchy of menus in an application.</p>
<p>Like anything new, it feels all wrong, but, I found it very easy to pick up and now prefer it over the traditional menu navigating paradigm.</p>
</div>
<p>Instead or navigating a hierarchy of menus, HUD provides a query field in which you type the name of the action you want to perform with your applications.</p>
<p>Normally, to do something in a program you either use a keyboard shortcut (like <code>Ctrl+B</code> to bold text in a word processor), or you use the mouse to select an option from a menu or toolbar.</p>
<p>With HUD, you type in what you want to do. The HUD interface will then locate appropriate / matching menu entries and display them to you to select. Again, you can use the mouse to perform the selection or the arrow keys and the <u>Enter</u> key.</p>
<div class="c2">
<p>I think the greatest strength of HUD is that you can navigate it completely via the keyboard, so you never alternate between typing and reaching for the mouse.</p>
</div>
<p>The HUD is activated when you tap on the <u>Alt</u> key:</p>
<div class="c2">
<p><strong>Note:</strong> tapping the <u>Alt</u> keys means pressing it as though you intend to type it. It does not mean holding down the key.</p>
<p>If you hold the <code>Alt</code> key down for about 2 seconds, the application menu bar will display in the Panel. As soon as yo let go of the <code>Alt</code> key, it will disappear &#8211; thus encouraging use of the keyboard to select a menu option (e.g. <code>Alt + F</code> to open the <u>F</u>ile menu).</p>
</div>
<p><img decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2012/04/ubuntu-12.04-basic-unity-tutorial-hud-1.jpg" alt="" border="0" class="centered" /></p>
<p>The HUD panel looks something like this:</p>
<p><img decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2012/04/ubuntu-12.04-basic-unity-tutorial-hud-2.jpg" alt="" border="0" class="centered" /></p>
<ol>
<li>
<p>The query field (<span class="i3">outlined in red</span>) is where you type the operation you want to perform in the application, e.g. <code>open</code>, <code>new</code>, <code>auto white balance</code>, etc.</p>
<p>This is where the focus goes when you activate the HUD.</p>
<p>As you type, a list of possible commands will be displayed below it. You can navigate those commands using the mouse and clicking to select or the keyboard (arrow keys) and pressing <u>Enter</u> to select. By default, the top command is always selected and will be executed if you press <u>Enter</u>. A nice thing is that you do not have to type the whole command.</p>
<div class="c1">
<p><strong>Note:</strong> if a command is not available (for example, it is greyed out), then it will not appear in the list of commands.</p>
<p>For example, if you have just opened GIMP without any image, it is not possible to perform image operations on it (like unsharp mask, or auto color enhance, etc). So if you type <code>unsharp</code> into the query field, you will not receive any options.</p>
<p>I think it would be better if the HUD somehow indicated that the operation is unavailable rather than just not showing it at all.</p>
</div>
</li>
<li>
<p>On the left, the icon (<span class="i1">outlined in green</span>) shows which application the command is for.</p>
<p>The HUD may display commands for other programs (not just the active one). This can be confusing if you are not paying attention.</p>
</li>
<li>
<p>Below the query field is a list of matching commands (<span class="i2">outlined in blue</span>.</p>
</li>
</ol>
<div class="c4">
<p><strong>Note:</strong> HUD may not work with all applications &#8211; it depends on how the menus in an application were coded. Prior to Ubuntu 13.04, LibreOffice was an application that did not work with the HUD (there was a patch available to make it work, though).</p>
</div>
<h2>Final Words</h2>
<p>Unity is a new way of interacting with the computer: instead of navigating a hierarchy of menus, you type what you want to do.</p>
<p>As an old timer (my first interactions with a computer were via a teletype), I never really liked the mouse / GUI way of doing things because it required me to take one hand off the keyboard. As a consequence, I have always configured shortcut keys to perform common tasks.</p>
<p>With Unity, I am able to keep my hands on the keyboard and easily perform the tasks I need. I still program my shortcut keys, but I know longer have to navigate through menus to find some lesser used operation.</p>
<p>Play with it. I think you will find it easy to learn. I have found it easier to adapt to than the Ribbon interface Microsoft introduced a few years ago.</p>
<p>I find the Dash and HUD work well when I am very familiar with the programs / applications I am working with and I know the command set.</p>
<p>I find the HUD awkward to work with when I am not familiar with an application. For example, perhaps I install Blender to try out some 3D graphics development. Not being familiar with Blender, it is very awkward to try typing commands into the HUD in the hope of finding the right one. This is definitely a case where being able to browse through a bunch of menus can be helpful.</p>
<p>Of course, I can always type <code>help</code> and hope a help file comes up.</p>
<p>It is with new or unfamiliar applications that I miss the menu bar at the top, but even if a menu bar was visible, there have been times when I could not find what I wanted and had to google to discover how it was named or where it was located.</p>

<h2>Additional Resources</h2>
<p>While these aren&#8217;t tutorials, they offer some insight into Canonical&#8217;s focus and direction (they are written by Mark Shuttleworth  – Canonical&#8217;s CEO):</p>
<p><a href="http://www.markshuttleworth.com/archives/939">Introducing the HUD. Say hello to the future of the menu.</a></p>
<p><a href="http://www.markshuttleworth.com/archives/717">Dash takes shape for 11.10 Unity</a> (note: the Dash panel has changed somewhat from the screen capture he presents)</p>
<p>This shows a side by side comparison between using the tradition menu driven way to perform a task and using HUD. While a number of commenters have complained that it isn&#8217;t an objective comparison, I think it shows very nicely the difference in working in both environments:</p>
<p><iframe loading="lazy" width="560" height="315" src="http://www.youtube.com/embed/lSkXgXZL7G4" frameborder="0" allowfullscreen></iframe></p>
<p>This is another video showing the HUD In action:</p>
<p><iframe loading="lazy" width="560" height="315" src="http://www.youtube.com/embed/w_WW-DHqR3c" frameborder="0" allowfullscreen></iframe></p>
<p>The post <a href="https://complete-concrete-concise.com/ubuntu-2/ubuntu-13-04/ubuntu-13-04-basic-unity-interface-desktop-tutorial/">Ubuntu 13.04 &#8211; Basic Unity Interface / Desktop Tutorial</a> appeared first on <a href="https://complete-concrete-concise.com">Complete, Concrete, Concise</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Edit .htaccess in cPanel</title>
		<link>https://complete-concrete-concise.com/web-tools/how-to-edit-htaccess-in-cpanel/</link>
		
		<dc:creator><![CDATA[richardsplanet]]></dc:creator>
		<pubDate>Tue, 26 Mar 2013 11:31:29 +0000</pubDate>
				<category><![CDATA[Web Tools]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[cpanel]]></category>
		<category><![CDATA[edit]]></category>
		<category><![CDATA[how to]]></category>
		<guid isPermaLink="false">http://complete-concrete-concise.com/?p=2719</guid>

					<description><![CDATA[<p>This tutorial is for users whose web hosting administration front end is cPanel version 11.34.1 (build 12). It may be the same or similar for other versions of cPanel or other web hosting administration front ends, but no guarantee is made. Sometimes it is necessary to edit the .htaccess file. By default, cPanel hides this [&#8230;]</p>
<p>The post <a href="https://complete-concrete-concise.com/web-tools/how-to-edit-htaccess-in-cpanel/">How to Edit .htaccess in cPanel</a> appeared first on <a href="https://complete-concrete-concise.com">Complete, Concrete, Concise</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="c1">
<p>This tutorial is for users whose web hosting administration front end is cPanel version 11.34.1 (build 12).</p>
<p>It may be the same or similar for other versions of cPanel or other web hosting administration front ends, but no guarantee is made.</p>
</div>
<p>Sometimes it is necessary to edit the <code>.htaccess</code> file. By default, cPanel hides this file from the user.</p>
<p><strong>1) Find</strong> the section titled <u>Files</u> and <strong>click</strong> on <u>File Manager</u>:</p>
<p><img decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2013/03/edit-htaccess-cpanel.png" alt="" border="0" class="centered"/></p>
<p><strong>2) Select</strong> your website from the dropdown box (only necessary if you have more than one site). <strong>Check</strong> the <u>Show Hidden Files (dotfiles).</u> checkbox. <strong>Press</strong> <u>Go</u>:</p>
<p><img decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2013/03/edit-htaccess-cpanel-2.png" alt="" border="0" class="centered"/></p>
<p><strong>3) Select</strong> the <code>.htaccess</code> file by clicking on it (just a single click &#8211; double-clicking will attempt to download it), then <strong>click</strong> on <u>Edit</u> icon to edit the file:</p>
<p><img decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2013/03/edit-htaccess-cpanel-3.png" alt="" border="0" class="centered"/></p>
<div class="c4">
<p><strong>Warning:</strong> incorrectly editing <code>.htaccess</code> can render your website unusable.</p>
<p><strong>Ensure</strong> you make a backup of it before proceeding.</p>
</div>

<p>The post <a href="https://complete-concrete-concise.com/web-tools/how-to-edit-htaccess-in-cpanel/">How to Edit .htaccess in cPanel</a> appeared first on <a href="https://complete-concrete-concise.com">Complete, Concrete, Concise</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Solve Trigonometric Problems</title>
		<link>https://complete-concrete-concise.com/mathematics/how-to-solve-trigonometric-problems/</link>
		
		<dc:creator><![CDATA[richardsplanet]]></dc:creator>
		<pubDate>Thu, 15 Nov 2012 13:45:51 +0000</pubDate>
				<category><![CDATA[Mathematics]]></category>
		<category><![CDATA[cosecant]]></category>
		<category><![CDATA[cosine]]></category>
		<category><![CDATA[cotangent]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[secant]]></category>
		<category><![CDATA[sine]]></category>
		<category><![CDATA[solving]]></category>
		<category><![CDATA[tangent]]></category>
		<category><![CDATA[trigonometric functions]]></category>
		<category><![CDATA[trigonometry]]></category>
		<guid isPermaLink="false">http://complete-concrete-concise.com/?p=2555</guid>

					<description><![CDATA[<p>This tutorial offers advice on how to solve trigonometric problems and provides several problems worked through in detail. It assumes you are familiar with the trigonometric functions sine, cosine, tangent, secant, cosecant, and cotangent. A basic tutorial can be found here. A more advanced tutorial can be found here. If an explanation / walkthrough is [&#8230;]</p>
<p>The post <a href="https://complete-concrete-concise.com/mathematics/how-to-solve-trigonometric-problems/">How to Solve Trigonometric Problems</a> appeared first on <a href="https://complete-concrete-concise.com">Complete, Concrete, Concise</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="c1">
This tutorial offers advice on how to solve trigonometric problems and provides several problems worked through in detail.<br />
It assumes you are familiar with the trigonometric functions sine, cosine, tangent, secant, cosecant, and cotangent. A basic tutorial can be found <a href="//complete-concrete-concise.com/mathematics/understanding-sine-cosine-and-tangent">here</a>. A more advanced tutorial can be found <a href="//complete-concrete-concise.com/mathematics/understanding-trigonomtric-functions-using-the-unit-circle-advanced">here</a>.
</div>
<div class="c2">
If an explanation / walkthrough is not clear, please let me know in a comment and I will try to improve the answer.<br />
Identify what it is that is not clear &#8211; just saying &#8220;I didn&#8217;t understand it&#8221; isn&#8217;t very helpful.
</div>
<div class="c1">
If you have a problem you would like to see solved, leave a comment. <strong>Note:</strong> (1) I don&#8217;t do homework, (2) I don&#8217;t promise I will solve it, (3) I don&#8217;t promise to solve it quickly.
</div>
<h1>Don&#8217;t Panic</h1>
<ol>
<li>Don&#8217;t panic or freak out. No one is trying to trick you or trip you up (although, often times, word problems are poorly worded)</li>
<li>Read and understand the problem.</li>
<li>Trigonometric problems are always about right angle triangles. So the trick is to try and break the problem down into right angle triangles.</li>
<li>Trigonometry is about the ratios of the lengths of two sides. If we know the length of two sides of a right angle triangle we can calculate the ratio between those two sides. Those ratios are given special names: sine, cosine, tangent, cosecant, secant, cotangent. Because of the properties of right angle triangles, if we know one of the angles then we also know the ratios of all the sides.</li>
<li>Look for what ratios or partial ratios you can find. Then work from there.</li>
<li>Similar triangles are triangles that have the same shape that have the same angles inside. Often times, we don&#8217;t solve the problem directly but look for a similar triangle. The triangle may be bigger or smaller, but it has the same shape as the triangle we are studying.</li>
</ol>
<h3>Basic Use of Trigonometric Definitions</h3>
<div class="c1">
<div class="c3">
Consider the following right angle triangle having sides of length 3, 4, and 5 units and two angles called alpha and beta. What is sin&alpha;, cos&alpha;, tan&alpha;, sin&beta;, cos&beta;, tan&beta; and the angles &alpha; and &beta;?
</div>
<p><img decoding="async" class="centered" src="//complete-concrete-concise.com/wp-content/uploads/2012/11/3-4-5-triangle.png" alt="" border="0" /><br />
This problem is about understanding the definition of the trigonometric functions sine, cosine, and tangent.<br />
The triangle is displayed in a familiar way and we can easily calculate the trigonometric relations for &alpha; (remember sin&alpha; is shorthand for &#8220;<em>given a right angle triangle containing an angle &alpha;, what is the ratio of the side opposite the angle to the hypotenuse</em>&#8220;):<br />
We know that <code>sin&alpha; = opposite ÷ hypotenuse</code>, which is <code>3 / 5</code> which is <code>0.6</code>.<br />
We know that <code>cos&beta; = adjacent ÷ hypotenuse</code>, which is <code>4 / 5</code> which is <code>0.8</code>.<br />
We know that <code>tan&alpha; = opposite ÷ adjacent</code>, which is <code>3 / 4</code> which is <code>0.75</code>.<br />
Calculating the trigonometric relations for &beta; is no different, although, we need to correctly identify the opposite and adjacent sides:<br />
We know that <code>sin&beta; = opposite ÷ hypotenuse</code>, which is <code>4 / 5</code> which is <code>0.8</code>.<br />
We know that <code>cos&beta; = adjacent ÷ hypotenuse</code>, which is <code>3 / 5</code> which is <code>0.6</code>.<br />
We know that <code>tan&beta; = opposite ÷ adjacent</code>, which is <code>4 / 3</code> which is <code>1.333...</code><br />
We don&#8217;t know what the angles &alpha; and &beta; are, but we can find out. We know that <code>sin&alpha; = 0.6</code> and <code>sin&beta; = 0.8</code>. All we need to do is find out what angles &alpha; and &beta; have a sine corresponding to 0.6 and 0.8, respectively.<br />
Using the inverse sin function (sin<sup>-1</sup>) on a calculator, we see that &alpha; must be 36.87° for sin&alpha; to be 0.6 and &beta; must be 53.13° for sin&beta; to be 0.8.</p>
<div class="c2">
Before calculator use was wide spread, you would look up the value in a sine table. You can see a sine table with a resolution of 1 degree over <a href="http://www.grc.nasa.gov/WWW/k-12/airplane/tablsin.html">here</a>.
</div>
</div>
<h3>Basic Use and Application of Trigonometric Definitions and Properties of a Right Angle Triangle</h3>
<div class="c2">
<div class="c3">
Given a triangle having sides of length 1, 2, and 3 units, is this a right angle triangle?
</div>
<p><img decoding="async" class="centered" src="//complete-concrete-concise.com/wp-content/uploads/2012/11/1-2-3-triangle.png" alt="" border="0" /><br />
The simplest way is to see if the Pythagorean Theorem true &#8211; if this is a right angle triangle, we know that: <code>A<sup>2</sup> + B<sup>2</sup> = C<sup>2</sup></code><br />
<code>1<sup>2</sup> + 2<sup>2</sup> = 3<sup>2</sup></code><br />
<code>1 + 4 = 9</code> &#8211; the left hand side and right hand side are not the same, so the triangle is not a right angle triangle<br />
Using trigonometric functions, we can determine the angles &alpha; and &beta; and then check that all the angles sum up to 180°: <code>&alpha; + &beta; + 90° = 180°</code><br />
sin&alpha; = opposite ÷ hypotenuse = 1 / 3 = 0.333&#8230;<br />
sin&beta; = opposite ÷ hypotenuse = 2 / 3 = 0.666&#8230;<br />
Using the inverse sin function (sin<sup>-1</sup>) on a calculator, we determine that &alpha; is 19.47° and &beta; is 41.81°.<br />
Consequently, the sum of the angles is:<br />
<code>19.47° + 41.81° + 90° = 180°</code><br />
<code>151.28° = 180°</code> &#8211; the left hand side and right hand side are not the same, so the triangle is not a right angle triangle</p>
<div class="c1">
The only thing that might seem strange in this example are expressions of the form:<br />
<code>4 = 9</code><br />
These types of expressions are perfectly normal and valid in mathematics. This is because the symbol <code>=</code> does not have the same meaning we are usually used to: in mathematics, <code>=</code> means <u>is the same as</u>.<br />
Written in English, the expression <code>4 = 9</code> would be &#8220;<em>The value of 4 <u>is the same as</u> the value of 9</em>&#8220;. This statement is <u>false</u>. Don&#8217;t get confused and think you have just proven that 4 is the same as 9 because it isn&#8217;t.<br />
In this example, we are saying:</p>
<ol>
<li>The angles in a triangle sum up to 180°</li>
<li>Since this is supposed to be a right angle triangle, we know one of the angles is 90°</li>
<li>Since this is supposed to be a right angle triangle, we can look up the angles &alpha; and &beta; once we know the ratios of the sides</li>
<li>If the sum of all the angles is 180° then we know this is a right angle triangle</li>
<li>If the sum of all the angles is not 180° then we know this is not a right angle triangle.</li>
</ol>
</div>
</div>
<h3>Calculating the Height of a Tree</h3>
<div class="c1">
Potiphar&#8217;s out walking his cat. He notices that he casts a shadow 2 m long. He also notices that a tree in the garden casts a shadow 7 m long. If Potiphar is 1.5 m tall how tall is the tree? What is the angle of elevation of the sun?<br />
<img decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2012/11/potiphar-1.png" alt="" border="0" /><br />
This is a basic trigonometric problem involving similar triangles. Potiphar and his shadow form a right angle triangle. The tree and its shadow form another right angle triangle. The rays of the sun (which are invisible) form the hypotenuse of these right angle triangles.<br />
<img decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2012/11/potiphar-2.png" alt="" border="0" /><br />
We know that similar triangles have the same shape and the same angles. We know that the angle or slope of the hypotenuse is the same for both the <u>tree-triangle</u> and the <u>Potiphar-triangle</u> (because rays of sunlight are parallel to each other). Since both triangles are similar, we also know that the ratios of their sides must be the same.<br />
We know the lengths of the sides of the <u>Potiphar-triangle</u> and can use them to calculate a ratio:<br />
<code>A / B = 1.5 / 2 = 0.75</code><br />
Of the tree-triangle, we know the length of one of the sides but not of the other. However, we know that the ratio of the unknown length to the known length (i.e. shadow) must be the same as for the Potiphar-triangle:<br />
<code> a / b = A / B = 0.75</code><br />
Plugging in the values we know (and removing the A / B for clarity):<br />
<code> a / 7 = 0.75</code><br />
Rearranging we get:<br />
<code>a = 0.75 × 7 = 5.25</code><br />
The tree is 5.25 m tall.<br />
To calculate the elevation of the sun, we know the ratio of height to length. In trigonometric terms, this is the definition of tangent.<br />
<code>tan&alpha; = opposite ÷ adjacent = A / B = a / b = 0.75</code><br />
Looking up (or using the inverse key on the calculator) we see that for tan&alpha; to equal 0.75, &alpha; must be 36.87°.</p>
<div class="c2">
Before calculator use was wide spread, you would look up the value in a tangent table. You can see a tangent table with a resolution of 1 degree over <a href="http://www.grc.nasa.gov/WWW/k-12/airplane/tabltan.html">here</a>.
</div>
</div>
<h3>Calculating the Height of a Pyramid and Elevation of the Sun</h3>
<div class="c2">
<div class="c3">
Thales of Miletus measures the length of the shadow cast by the great pyramid and discovers that it is 17 m to the base of the pyramid. Using his 2 m measuring stick he notices that it casts a shadow of 1.8 m. If the great pyramid measures 230 m on a side, how high is the great pyramid? What is the angle of elevation of the sun?
</div>
<p><img decoding="async" class="centered" src="//complete-concrete-concise.com/wp-content/uploads/2012/11/thales-1-thumb.png" alt="" border="0" /><br />
This is another basic trigonometric problem involving similar triangles, but this time a little trickier to solve. We know the dimensions of the height and length of the <u>measuring-stick-triangle</u>, but we don&#8217;t know the height or length of the <u>pyramid-triangle</u>. We know the length of the shadow to the base of the pyramid, but we need to know the length of the shadow to the center of the pyramid (from which the height is measured).<br />
<img decoding="async" class="centered" src="//complete-concrete-concise.com/wp-content/uploads/2012/11/thales-2-thumb.png" alt="" border="0" /><br />
We know the length of a side of the pyramid (this 230 m), we can use this to determine what the length of the shadow to the center of the pyramid should be. The peak of the pyramid is in the center, so it is 115 m from the base of the pyramid. This gives us a corrected shadow length of 17 m to the base + 115 m from the base to the center which is 132 m.<br />
We now know the length of one of the sides of the <u>pyramid-triangle</u>. Since the <u>pyramid-triangle</u> is similar to the <u>measuring-stick-triangle</u>, and we know that similar triangles have the same ratios for their sides, we can calculate the height of the pyramid in the same way as the previous example:</p>
<div class="c1">
In the previous example (Calculating the HEight of a Tree), I wrote the equation as:<br />
<code>a / b = A / B = ratio</code><br />
Equations in mathematics can be written in many different ways. In this example, I don&#8217;t bother to write the ratio and instead write it as:<br />
<code>a / b = A / B</code>
</div>
<p>Substituting the known values we get:<br />
<code>2 / 1.8 = height / 132</code><br />
Rearranging we get:<br />
<code>(2 × 132) / 1.8 = height</code><br />
Simplifying everything we get:<br />
height = 146.7 m<br />
To calculate the elevation of the sun, we know the ratio of height to length. In trigonometric terms, this is the definition of tangent.<br />
tan&alpha; = opposite ÷ adjacent = 2 / 1.8 = 1.111&#8230;<br />
Looking up (or using the inverse key on the calculator) we see that for tan&alpha; to equal 1.111&#8230;, &alpha; must be 48°.
</div>
<h3>Calculating the Length of a Shadow</h3>
<div class="c1">
The Peace Tower in Ottawa, Canada is 92.2 m tall. On July 1st, 2012, at noon, the sun&#8217;s angle of elevation was 67.6°. How long was the shadow cast by the Peace Tower?<br />
<img decoding="async" class="centered" src="//complete-concrete-concise.com/wp-content/uploads/2012/11/peace-tower.png" alt="" border="0" /><br />
We know the height of the tower and we know the angle of the sun (relative to the ground).<br />
Unlike the previous two problems, we only have one right angle triangle &#8211; the <u>tower-shadow-triangle</u>. We know if we have two similar triangles, the ratios of their sides must be the same.<br />
We know the angle the sun makes with the ground, so we know one of the angles of the triangle (actually, we know two of them &#8211; the other is 90° &#8211; so, if we need to, we can find the third angle because all angles in a triangle must sum up to 180°).<br />
All right angle triangles with the same angles are similar triangles &#8211; it doesn&#8217;t matter if we don&#8217;t know the lengths of the sides because we know the ratios those sides will have.<br />
We know that the following must be true:<br />
<code>length of the opposite side ÷ length of the adjacent side = tan(&alpha;)</code><br />
Plugging in the values we know, we get:<br />
<code>92.2 / x = tan(67.6°)</code><br />
Evaluating (looking up) <code>tan(67.6°)</code> we get:<br />
<code>9.2. / x = 2.43</code><br />
Rearranging we get<br />
<code>x = 92.2 / 2.43</code><br />
Simplifying we get:<br />
<code>x = 37.94</code><br />
The length of the shadow is 37.94 m (and it is probably safe to round it up to 38 m).
</div>
<h3>Calculating the Height of a Cliff</h3>
<div class="c2">
<div class="c3">
A surveyor measuring the height of the cliff, determines that the angle to the top of the cliff is 60° and the distance to the base of the cliff is 120 m how high is the cliff?
</div>
<p><img decoding="async" class="centered" src="//complete-concrete-concise.com/wp-content/uploads/2012/11/cliff-60.png" alt="" border="0" /><br />
This is similar to calculating the length of the shadow from two examples earlier.<br />
The distance from the cliff, with the height of the cliff and the straight line to the top of the cliff form a right angle triangle.<br />
We know one of the angles. We also know that all right angle triangles with the same angle are similar triangles &#8211; this means we also know the ratios the various sides of the triangles have.<br />
As before, we know that:<br />
<code>opposite ÷ adjacent = tan(&alpha;)</code><br />
Plugging in the values we know, we get:<br />
<code>x / 120 = tan(60°)</code><br />
Evaluating <code>tan(60°)</code> we get:<br />
<code>x / 120 = 1.732</code><br />
Rearranging we get:<br />
<code>x = 1.732 × 120</code><br />
Simplifying we get:<br />
<code>x = 207.84</code><br />
The cliff is 207.84 m high (it is probably ok to round it to 208 m).</p>
<div class="c3">
How would the problem and solution change if we were given the other angle instead?<br />
In this case, we would have:<br />
<code>120 / x = tan(30°)</code><br />
When solved it would give us the same answer.<br />
The relationship remains the same, the only things that change are which side we call <u>opposite</u> and <u>adjacent</u>.
</div>
</div>
<h3>Calculating the Height of a Lighthouse</h3>
<div class="c1">
<div class="c3">
A surveyor measuring the height of the cliff, determines that the angle to the top of the cliff is 60° &#8211; this angle was measured at a height of 1.7 m (i.e. the surveying equipment is on a tripod and stands 1.7 m above the ground). The angle measured to the top of the lighthouse is 65°. The distance to the cliff is 120 m. How tall is the lighthouse? How high is the cliff?
</div>
<p><img decoding="async" class="centered" src="//complete-concrete-concise.com/wp-content/uploads/2012/11/cliff-lighthouse.png" alt="" border="0" /><br />
In this case, we are given two triangles, but they are not similar. One triangle is the <u>cliff-triangle</u>, the other is the <u>cliff-lighthouse-triangle</u>.<br />
If we find the height of both triangles, we can subtract the height of the cliff from the height of the cliff + lighthouse and get the height of the lighthouse.</p>
<h3>Cliff Height</h3>
<p>This is basic trigonometric ratios:<br />
<code>cliff height ÷ distance to cliff = tan(60°)</code><br />
Plugging in the known values:<br />
<code>x / 120 = tan(60°)</code><br />
Solving:<br />
<code>x = 207.84</code><br />
We&#8217;re not finished with the height of the cliff, the angle to the top of the cliff was measured from a height of 1.7 m, this means we need to add 1.7 m to the height of the cliff:<br />
<code>height = 207.84 + 1.7 = 209.54 m</code></p>
<div class="c2">
<div class="c3">
If we measured from the base of the tripod, what would the angle be to the top of the cliff?
</div>
<p>In this case, we know the length of two sides of the triangle: 120 m and 209.54 m.<br />
We can calculate the ratio of these two sides:<br />
<code>ratio = 209.54 / 120 = 1.74616...</code><br />
We know from trigonometric definitions that <code>tan(&alpha;) = opposite ÷ adjacent</code>, so all we need to find is what &alpha; gives us the necessary ratio. Using tan<sup>-1</sup> on the calculator we see that:<br />
<code>tan<sup>-1</sup>(1.74616...) = 60.2°</code>
</div>
<h3>Height of the Cliff + Lighthouse</h3>
<p>This is basic trigonometric ratios:<br />
<code>(cliff height + lighthouse height) ÷ distance to cliff = tan(&alpha;)</code><br />
Plugging in the known values we get:<br />
<code>x / 120 = tan(65°)</code><br />
Solving:<br />
<code> x = 257.34</code><br />
We&#8217;re not finished with the height of the cliff + lighthouse, the angle to the top of the cliff + lighthouse was measured from a height of 1.7 m, this means we need to add 1.7 m to the height of the cliff + lighthouse:<br />
<code>x = 257.34 + 1.7 = 259.04 m</code></p>
<h3>Height of the Lighthouse</h3>
<p>It is a simple matter of subtracting the height of the cliff from the height of the cliff + lighthouse:<br />
<code>lighthouse height = (lighthouse height + cliff height) - cliff height</code><br />
Plugging in the known values we get:<br />
<code>x = 259.04 - 209.54</code><br />
Solving we get:<br />
<code>x = 49.5 m</code></p>
<div class="c2">
In this example, it was not necessary to correct the height of the cliff and cliff + lighthouse by adding 1.7 m to each because each was offset (measured) from the same point &#8211; but it is still good practice to find the true heights (dimensions) even if only the relative ones are good enough.
</div>
</div>
<h3>Calculating the Length of a Field #1</h3>
<div class="c2">
<div class="c3">
Two surveyors measure the length of the field. One surveyor stands at one end of the field with the measuring equipment, the other surveyor stands at the other end of the field with a measuring stick 2 m high. The surveyor measures an angle of 2° to the base of the measuring stick. The surveying equipment is at a height of 1.7 m. How long is the field?
</div>
<p><img decoding="async" class="centered" src="//complete-concrete-concise.com/wp-content/uploads/2012/11/surveyor-1.png" alt="" border="0" /><br />
This is basic trigonometric ratios. The straight line (of sight) to the measuring stick is perpendicular to the measuring stick, therefore, it forms one side of a right angle triangle. The measuring stick (or part of it) forms another side. Finally, the line of sight to the base of the measuring stick forms the remaining side (which is also the hypotenuse):<br />
<img decoding="async" class="centered" src="//complete-concrete-concise.com/wp-content/uploads/2012/11/surveyor-2.png" alt="" border="0" /><br />
We know the height where the straight line of sight intersects the measuring stick must be 1.7 m. We also know the angle to the base of the measuring stick is 2°.<br />
We don&#8217;t know the length of the side adjacent to the measured angle, we do know the length of the side opposite the measured angle, and we know the angle. Two trigonometric ratios use the <u>opposite</u> and <u>adjacent</u> sides: <em>tangent</em> and <em>cotangent</em>. Since <em>tangent</em> is the more commonly used ratio (and appears on many calculators) we will use the definition of <em>tangent</em>:<br />
<code>tan(&alpha;) = opposite ÷ adjacent</code><br />
Plugging in the known values, we get:<br />
<code>tan(2°) = 1.7 / x</code><br />
Solving, we get:<br />
<code>x = 48.68</code><br />
The length of the field is 48.68 m (it is probably safe to round up to 48.7 m)
</div>
<h3>Calculating the Length of a Field #2</h3>
<div class="c1">
<div class="c3">
Two surveyors measure the length of the field. One surveyor stands at one end of the field with the measuring equipment, the other surveyor stands at the other end of the field with a measuring stick 2 m high. The surveyor forgot to measure the height of the equipment, but, fortunately, took two readings. The surveyor measures an angle of 2° to the base of the measuring stick and 1° to the top of the measuring stick.. How long is the field?
</div>
<p><img decoding="async" class="centered" src="//complete-concrete-concise.com/wp-content/uploads/2012/11/surveyor-3.png" alt="" border="0" /><br />
We know the straight line of sight to the measuring stick must be perpendicular to the measuring stick &#8211; this forms one side of a right angle triangle (as in the previous example). In fact, it forms the side of two right angle triangles &#8211; since two different angles were measured. Unlike the previous example, we don&#8217;t know the length of the other side, but we do know the length of the measuring stick &#8211; it is 2 m. We know that the sum of the two opposite sides must be 2 m. We also know the angles for both right angle triangles, so we know the ratios the sides have:<br />
<img decoding="async" class="centered" src="//complete-concrete-concise.com/wp-content/uploads/2012/11/surveyor-4.png" alt="" border="0" /><br />
From trigonometric definitions we know that <code>tan(&alpha;) = opposite / adjacent</code><br />
We also know the <u>adjacent</u> side is the same length for both triangles.<br />
Finally, we know that <code>opposite<sub>top</sub></code> + <code>opposite<sub>bottom</sub></code> = 2 m.</p>
<h3>Top Triangle</h3>
<p>Solving for the top triangle we get:<br />
<code>tan(1°) = opposite<sub>top</sub> / adjacent</code><br />
Calculating what we can, we get:<br />
<code>0.017455 = opposite<sub>top</sub> / adjacent</code></p>
<h3>Bottom Triangle</h3>
<p>Solving for the bottom triangle we get:<br />
<code>tan(2°) = opposite<sub>bottom</sub> / adjacent</code><br />
Calculating what we can, we get:<br />
<code>0.034921 = opposite<sub>top</sub> / adjacent</code></p>
<h3>Combining the Equations</h3>
<div class="c4">
Fundamental to basic algebra is the ability to manipulate an equation any way we like &#8211; as long as we do the same thing on both sides.<br />
For example, consider <span class="i2">4 = 4</span>:<br />
We can add 8 to both sides and the relationship remains the same: <span class="i2">4 + 8 = 4 + 8</span>.<br />
However, it is also perfectly valid to do: <span class="i2">4 + 8 = 4 + 1 + 2 + 5</span> (this is one of those non-intuitive mathematical tricks &#8211; but it is very useful).<br />
We need to employ this algebraic trick of substituting <em>equivalent</em> things into our equations.
</div>
<p>Since we know that the <u>adjacent</u> sides of both right angle triangles are identical, we can use this to merge the two equations together.<br />
Rearranging the bottom triangle equation so the <u>adjacent</u> is alone, we get:<br />
<code>adjacent = opposite<sub>bottom</sub> / 0.034921</code><br />
We now replace the <u>adjacent</u> side in the top triangle with its equivalent which is <code>opposite<sub>bottom</sub> / 0.034921</code>:<br />
<code>0.017455 = opposite<sub>top</sub> / (opposite<sub>bottom</sub> / 0.034921)</code><br />
Rearranging we get:<br />
<code>0.017455 × opposite<sub>bottom</sub> = 0.034921 × opposite<sub>top</sub></code></p>
<h3>Solving for the <em>opposite<sub>bottom</sub></em> side</h3>
<p>Dividing both sides by by 0.017455, we get:<br />
<code>opposite<sub>bottom</sub> = 2 × opposite<sub>top</sub></code></p>
<h3>Remembering the 2 m Measuring Stick</h3>
<p>At this point, we need to remember that <code>opposite<sub>bottom</sub> + opposite<sub>top</sub> = 2</code></p>
<div class="c2">
It is common in mathematics that you have to remember several things at the same time as you proceed through the steps of solving a problem.
</div>
<h3>Algebraic Substitution Trick on the Measuring Stick</h3>
<p>We can do a similar <i>equivalent</i> substitution in this equation (in this case, we will substitute <code>2 × opposite<sub>top</sub></code> for <code>opposite<sub>bottom</sub></code>:<br />
<code>2 × opposite<sub>top</sub> + opposite<sub>top</sub> = 2</code><br />
Solving we get:<br />
<code>opposite<sub>top</sub> = 0.666...</code></p>
<div class="c2">
If the top portion of the stick us 0.666&#8230; m, then the bottom portion must be 1.333&#8230; m
</div>
<h3>Returning to the original equation:</h3>
<div class="c2">
It does not matter which of the lengths we use (as long as we use them in the right place), the answer will still be the same (any small differences in the answers are due to rounding errors &#8211; you can avoid / minimize these by using the full precision provided by your calculator.
</div>
<p>Now we can take this value for <code>opposite<sub>top</sub></code> and substitute it our original equation for the top right angle triangle:<br />
<code>tan (1°) = 0.666... / adjacent</code><br />
Solving we get:<br />
<code>adjacent = 38.19</code><br />
The distance of the field is 38.19 m (which you can, probably, safely round up to 38.2 m)
</div>

<p>The post <a href="https://complete-concrete-concise.com/mathematics/how-to-solve-trigonometric-problems/">How to Solve Trigonometric Problems</a> appeared first on <a href="https://complete-concrete-concise.com">Complete, Concrete, Concise</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Ubuntu 12.10 &#8211; Installing GNOME Session Fallback</title>
		<link>https://complete-concrete-concise.com/ubuntu-2/ubuntu-12-10/ubuntu-12-10-installing-gnome-session-fallback/</link>
		
		<dc:creator><![CDATA[richardsplanet]]></dc:creator>
		<pubDate>Tue, 23 Oct 2012 12:39:02 +0000</pubDate>
				<category><![CDATA[Ubuntu 12.10]]></category>
		<category><![CDATA[change]]></category>
		<category><![CDATA[classic gnome]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[gnome session]]></category>
		<category><![CDATA[gnome-session-fallback]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[installing]]></category>
		<category><![CDATA[replace]]></category>
		<category><![CDATA[replacing]]></category>
		<category><![CDATA[ubuntu 12.10]]></category>
		<category><![CDATA[unity]]></category>
		<guid isPermaLink="false">http://complete-concrete-concise.com/?p=2420</guid>

					<description><![CDATA[<p>These instructions are for installing the GNOME Session Fallback in Ubuntu 12.10 running the Unity Desktop. Installation instructions may be the same or similar for other versions of Ubuntu or for other Linux distros, but no guarantee is made. If you are changing desktops because you are totally lost / confused by Unity, I suggest [&#8230;]</p>
<p>The post <a href="https://complete-concrete-concise.com/ubuntu-2/ubuntu-12-10/ubuntu-12-10-installing-gnome-session-fallback/">Ubuntu 12.10 &#8211; Installing GNOME Session Fallback</a> appeared first on <a href="https://complete-concrete-concise.com">Complete, Concrete, Concise</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="c1">
<p>These instructions are for installing the <em>GNOME Session Fallback</em> in Ubuntu 12.10 running the Unity Desktop.</p>
<p>Installation instructions may be the same or similar for other versions of Ubuntu or for other Linux distros, but no guarantee is made.</p>
</div>
<div class="c3">
<p>If you are changing desktops because you are totally lost / confused by Unity, I suggest reading this <a href="//complete-concrete-concise.com/ubuntu-2/ubuntu-12-04/ubuntu-12-04-basic-unity-interface-desktop-tutorial">tutorial</a> and giving Unity a chance. <span class="i3">The mentioned tutorial is for Ubuntu 12.04, but should be the same or very similar for 12.10. Eventually, I will have an updated tutorial for 12.10.</span></p>
<p>Of course, if you <u>really</u> hate Unity, then GNOME Session Fallback is an alternative desktop.</p>
</div>
<div class="c2">
<p>Some images may be clicked for full sized versions.</p>
</div>
<h1>What is it?</h1>
<p><u>GNOME Session Fallback</u> is the most basic version of GNOME you can install. The 3D features and requirements of the standard GNOME Shell are not present.</p>
<p>It is the closest you can get to the original GNOME 2 desktop. The GNOME 2 desktop is the one most users would recognize as the familiar or traditional desktop.</p>
<div class="c1">
<p>If you want a true GNOME 2 desktop experience, then you need to install MATE.</p>
<p>MATE is a fork (a development branch that has split from the main branch) of the original GNOME 2 project to preserve it.</p>
<p>GNOME 2 is no longer supported or developed &#8211; it has been superseded by GNOME 3.</p>
<p>MATE is the new GNOME 2.</p>
</div>
<p>GNOME 3 (aside from the Session Fallback) requires 3D hardware capability (according to <a href="https://live.gnome.org/GnomeShell/FAQ#What_led_to_the_decision_to_make_3D_acceleration_a_requirement_for_GNOME_Shell.3F">GNOME</a>, most 3D graphics cards manufactured after 2007 (or so) meet these requirements). However, the GNOME 3 desktop is different from the original or classic desktop most users are familiar with.</p>
<p><u>GNOME Session Fallback</u> is automatically installed when you install GNOME Shell or GNOME. It is provided in the case that your graphics card does not meet the minimum 3D hardware requirements or drivers for your graphics cards do not support 3D hardware acceleration.</p>
<h1>Who is it for?</h1>
<p><u>GNOME Session Fallback</u> is for those users that want a more or less traditional style desktop and don&#8217;t want to minimize the amount of extra files they install on their system.</p>
<p>While you can install <a href="//complete-concrete-concise.com/ubuntu-2/ubuntu-12-10/ubuntu-12-10-installing-gnome-shell">GNOME Shell</a> and GNOME, these will occupy more space on your hard drive. Installing them will not affect your systems performance except to where it comes down to free disk space.</p>
<p>In general, I think it is good practice to minimize the number of unneeded files on your system</p>
<h1>What it looks like</h1>
<p>There are two versions: GNOME Classic and GNOME Classic (No effects) &#8211; the difference between them is quite subtle.</p>
<p>The straight-out-of-the-box look of the desktop is:</p>
<div class="c1"><a href="//complete-concrete-concise.com/wp-content/uploads/2012/10/ubuntu-12.10-gnome-session-fallback-2-big.jpg" target="_blank"><img loading="lazy" decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2012/10/ubuntu-12.10-gnome-session-fallback-2-thumb.jpg" width="480" height="361" alt="" border="0" class="centered"/></a></p>
<p><u>Gnome Classic</u> displays the four desktops in the lower right corner as a small grid.</p>
</p></div>
<div class="c2"><a href="//complete-concrete-concise.com/wp-content/uploads/2012/10/ubuntu-12.10-gnome-session-fallback-1-big.jpg" target="_blank"><img loading="lazy" decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2012/10/ubuntu-12.10-gnome-session-fallback-1-thumb.jpg" width="480" height="361" alt="" border="0" class="centered"/></a></p>
<p><u>GNOME Classic (No effects)</u> displays the four desktops in the lower right bar as individual panes.</p>
</div>
<p>Otherwise, I don&#8217;t see any other differences between them.</p>
<div class="c1">
<p><strong>GNOME Session Fallback will install 35.5MB of files and data to your hard disk.</strong></p>
</div>
<h1>From the Command Line</h1>
<p>If you are comfortable with Linux and know how to use the command line and <code>apt-get</code> then the command is:</p>
<pre><code>sudo apt-get install gnome-session-fallback</code></pre>
<div class="c1">
<p>Detailed instructions for accessing a command line can be found <a href="//complete-concrete-concise.com/ubuntu-2/ubuntu-12-10/how-to-get-a-command-line-shell-or-terminal">here</a>.</p>
</div>
<div class="c2">
<p><strong>Note:</strong> during installation, you are likely to get a message box asking which display amanger you use. It is safe to use either one.</p>
<p><img decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2012/10/ubuntu-12.10-gnome-session-fallback-0.png" alt="" border="0" class="centered"/></p>
<p><code>gdm</code> is installed with <code>gnome-fallback-session</code>.</p>
<p><code>lightdm</code> is the display manager shipped with Ubuntu.</p>
<p>Basically, the difference between the two is that your login screen will look different.</p>
</div>
<p>Afterward, you need to restart your system.</p>
<h1>From the Ubuntu Software Center</h1>
<h3>Launching the Ubuntu Software Center</h3>
<p><strong>1) Tap</strong> the <u>Windows</u> (Super) key to bring up the Dash panel:</p>
<div class="c2">
<p><strong>Note:</strong> tapping the <u>Windows</u> keys means pressing it as though you intend to type it. It does not mean holding down the key (holding down the key does something else).</p>
<p>Ubuntu calls this the <u>Super</u> key</p>
</div>
<p><img loading="lazy" decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2012/04/ubuntu-12.04-basic-unity-tutorial-dash-2.jpg" width="480" height="187" alt="" border="0" class="centered" /></p>
<p><strong>2) Type </strong> <u>Ubuntu Software Center</u> into the search field:</p>
<div class="c2">
<p><strong>Note:</strong> as you type, search results will be displayed in the Dash Panel below.</p>
<p>You can stop typing when <u>Ubuntu Software Center</u> is the leftmost item in the panel.</p>
</div>
<p><a href="//complete-concrete-concise.com/wp-content/uploads/2012/10/ubuntu-12.10-gnome-session-fallback-3-big.jpg" target="_blank"><img loading="lazy" decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2012/10/ubuntu-12.10-gnome-session-fallback-3-thumb.jpg" width="480" height="285" alt="" border="0" class="centered"/></a></p>
<p><strong>3) Press</strong> the <u>Enter</u> key. This will select and launch the <u>Ubuntu Software Center</u></p>
<div class="c2">
<p><strong>Note:</strong> pressing the <u>Enter</u> key automatically selects the top, leftmost item in the Dash Panel. This is why it is not necessary to type everything.</p>
</div>
<div class="c3">
<p><strong>Note:</strong> if, for some reason, you switch focus or change focus from the search field, then pressing <u>Enter</u> will not work and you will need to select the icon using your mouse (or navigate using your keyboard). This is definitely an issue Ubuntu needs to address with the Dash.</p>
</div>
<p><strong>4) Type</strong> <u>gnome-session-fallback</u> into the <u>Ubuntu Software Center</u> search field. This will bring up related entries.</p>
<p><a href="//complete-concrete-concise.com/wp-content/uploads/2012/10/ubuntu-12.10-gnome-session-fallback-4-big.png" target="_blank"><img decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2012/10/ubuntu-12.10-gnome-session-fallback-4-thumb.png" alt="" border="0" class="centered"/></a></p>
<p><strong>5) Click</strong> on the entry <u>GNOME Session Manager &#8211; GNOME fallback session</u> &#8211; this will highlight it in orange:</p>
<p><a href="//complete-concrete-concise.com/wp-content/uploads/2012/10/ubuntu-12.10-gnome-session-fallback-5-big.png" target="_blank"><img decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2012/10/ubuntu-12.10-gnome-session-fallback-5-thumb.png" alt="" border="0" class="centered"/></a></p>
<p><strong>6) Click</strong> on Install:</p>
<p><a href="//complete-concrete-concise.com/wp-content/uploads/2012/10/ubuntu-12.10-gnome-session-fallback-6-big.png" target="_blank"><img decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2012/10/ubuntu-12.10-gnome-session-fallback-6-thumb.png" alt="" border="0" class="centered"/></a></p>
<div class="c4">
<p>If you receive the following error message:</p>
<p><img decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2012/04/ubuntu-12.04-ubuntu-software-center-install-error-message.png" alt="" border="0" class="centered" alt="Failed to download package files. Check your Internet connection."/></p>
<p>See <a href="//complete-concrete-concise.com/ubuntu-2/ubuntu-12-04/ubuntu-12-04-failed-to-download-package-files">this article</a> for a possible solution.</p>
<div class="c1">
<p><strong>Note:</strong> I haven&#8217;t encountered this error with Ubuntu 12.10, but I believe it is still possible.</p>
</div>
</div>
<p><strong>7) Enter</strong> your password and click <u>Authenticate</u>:</p>
<p><a href="//complete-concrete-concise.com/wp-content/uploads/2012/10/ubuntu-12.10-gnome-session-fallback-7-big.png" target="_blank"><img decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2012/10/ubuntu-12.10-gnome-session-fallback-7-thumb.png" alt="" border="0" class="centered"/></a></p>
<p><strong>8) After</strong> installation is finished, <strong>click</strong> on the <u>System</u> icon in the upper right corner of the desktop and <strong>select</strong> <u>Shut Down&#8230;</u> from the drop down menu:</p>
<div class="c2">
<p><strong>Note:</strong> it may be enough to just log out and log back in using the new desktop, but it doesn&#8217;t hurt to restart either.</p>
</div>
<p><img loading="lazy" decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2012/10/ubuntu-12.10-gnome-session-fallback-8.jpg" width="480" height="279" alt="" border="0" class="centered"/></p>
<p><strong>9) Click</strong> on <u>Restart</u>:</p>
<p><img decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2012/10/ubuntu-12.10-gnome-session-fallback-9.png" alt="" border="0" class="centered"/></p>
<h1>Selecting the Desktop</h1>
<p>After the system has restarted, it is necessary to select the new desktop from the login screen.</p>
<div class="c1">
<p>It is only necessary to select the desktop the first time after installation. Ubuntu will remember your your selection for future logins.</p>
<p>You can even install multiple desktops and switch between them.</p>
</div>
<p><strong>10) Click</strong> the icon in the top right of the Login box:</p>
<p><img loading="lazy" decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2012/10/ubuntu-12.10-gnome-session-fallback-10.jpg" width="480" height="270" alt="" border="0" class="centered"/></p>
<p><strong>11) Select</strong> either <u>GNOME Classic</u> or <u>GNOME Classic (No effects)</u>:</p>
<p><img loading="lazy" decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2012/10/ubuntu-12.10-gnome-session-fallback-11.jpg" width="480" height="289" alt="" border="0" class="centered"/></p>
<p><strong>12) Click</strong> on <u>OK</u>:</p>
<p><img loading="lazy" decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2012/10/ubuntu-12.10-gnome-session-fallback-12.jpg" width="480" height="289" alt="" border="0" class="centered"/></p>
<p><strong>13) Login</strong> as normal:</p>
<p><img loading="lazy" decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2012/10/ubuntu-12.10-gnome-session-fallback-13.jpg" width="480" height="248" alt="" border="0" class="centered"/></p>
<div class="c2">
<p>Notice the icon in the upper right hand corner has changed to a different icon. Some, not all, desktop environments will display an icon there.</p>
<p>This provides a quick way to know which desktop environment you are logging into.</p>
</div>

<p>The post <a href="https://complete-concrete-concise.com/ubuntu-2/ubuntu-12-10/ubuntu-12-10-installing-gnome-session-fallback/">Ubuntu 12.10 &#8211; Installing GNOME Session Fallback</a> appeared first on <a href="https://complete-concrete-concise.com">Complete, Concrete, Concise</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Ubuntu 12.10 &#8211; How to Lock Your Screen / Computer</title>
		<link>https://complete-concrete-concise.com/ubuntu-2/ubuntu-12-10/ubuntu-12-10-how-to-lock-your-screen-computer/</link>
		
		<dc:creator><![CDATA[richardsplanet]]></dc:creator>
		<pubDate>Thu, 18 Oct 2012 11:10:24 +0000</pubDate>
				<category><![CDATA[Ubuntu 12.10]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[keyboard shortcut]]></category>
		<category><![CDATA[lock computer]]></category>
		<category><![CDATA[lock display]]></category>
		<category><![CDATA[lock screen]]></category>
		<category><![CDATA[ubuntu 12.10]]></category>
		<guid isPermaLink="false">http://complete-concrete-concise.com/?p=2376</guid>

					<description><![CDATA[<p>These instructions are for Ubuntu 12.10 running the Unity interface. They may be the same for other version combinations, but no guarantee is made. Sometimes you have to leave your computer but don&#8217;t want to leave your session open for someone else to start using. One option is to log out, the other is to [&#8230;]</p>
<p>The post <a href="https://complete-concrete-concise.com/ubuntu-2/ubuntu-12-10/ubuntu-12-10-how-to-lock-your-screen-computer/">Ubuntu 12.10 &#8211; How to Lock Your Screen / Computer</a> appeared first on <a href="https://complete-concrete-concise.com">Complete, Concrete, Concise</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="c1">
<p>These instructions are for Ubuntu 12.10 running the Unity interface. They may be the same for other version combinations, but no guarantee is made.</p>
</div>
<p>Sometimes you have to leave your computer but don&#8217;t want to leave your session open for someone else to start using.</p>
<p>One option is to log out, the other is to lock your session. Logging out is rather drastic and requires you to save all your work. Locking the screen allows all your work to remain as is until you unlock the screen.</p>
<h1>Keyboard Shortcut</h1>
<p><strong>1) Press</strong> <code>Ctrl + Alt + L</code> to lock your screen.</p>
<div class="c2">
<p><strong>NOTE:</strong> pressing <code>Ctrl + Alt + L</code> means: simultaneously hold down the <code>Ctrl</code> key and <code>Alt</code> key, then press the <code>L</code> key as though you intend to type it.</p>
<p><strong>DO NOT</strong> press the <code>Shift</code> key because <code>Ctrl + Alt + Shift + L</code> is different from <code>Ctrl + Alt + L</code>.</p>
<p>It does <strong>NOT</strong> matter if your <code>Caps Lock</code> key is on or off.</p>
</div>
<p>Your screen should change to something like the following (your choice of desktop background, username, etc, will affect the specific appearance):</p>
<p><img loading="lazy" decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2012/10/ubuntu-12.10-lock-screen-1.jpg" width="480" height="252" alt="" border="0" class="centered"/></p>
<h1>Using the Mouse</h1>
<p><strong>1) Click</strong> on the <u>System</u> icon in the top right corner of the screen:</p>
<p><img loading="lazy" decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2012/10/ubuntu-12.10-lock-screen-2.jpg" width="480" height="309" alt="" border="0" class="centered"/></p>
<p><strong>2) Select</strong> <u>Lock Screen</u> from the drop down menu.</p>
<p>The post <a href="https://complete-concrete-concise.com/ubuntu-2/ubuntu-12-10/ubuntu-12-10-how-to-lock-your-screen-computer/">Ubuntu 12.10 &#8211; How to Lock Your Screen / Computer</a> appeared first on <a href="https://complete-concrete-concise.com">Complete, Concrete, Concise</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Ubuntu 12.10 &#8211; How to Display / Show Hidden Files or Folders</title>
		<link>https://complete-concrete-concise.com/ubuntu-2/ubuntu-12-10/ubuntu-12-10-how-to-display-show-hidden-files-or-folders/</link>
		
		<dc:creator><![CDATA[richardsplanet]]></dc:creator>
		<pubDate>Thu, 18 Oct 2012 10:56:30 +0000</pubDate>
				<category><![CDATA[Ubuntu 12.10]]></category>
		<category><![CDATA[display]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[files]]></category>
		<category><![CDATA[folder]]></category>
		<category><![CDATA[folders]]></category>
		<category><![CDATA[hidden file]]></category>
		<category><![CDATA[hidden folder]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[show]]></category>
		<category><![CDATA[ubuntu 12.10]]></category>
		<category><![CDATA[view]]></category>
		<guid isPermaLink="false">http://complete-concrete-concise.com/?p=2372</guid>

					<description><![CDATA[<p>These instructions are for Ubuntu 12.10 running the Unity interface and using Nautilus as the default file browser &#8211; this is the default Ubuntu 12.10 configuration. It may work for other version combinations, but no guarantee is made. The default settings in the Nautilus file browser prevent you from seeing certain files and folders. These [&#8230;]</p>
<p>The post <a href="https://complete-concrete-concise.com/ubuntu-2/ubuntu-12-10/ubuntu-12-10-how-to-display-show-hidden-files-or-folders/">Ubuntu 12.10 &#8211; How to Display / Show Hidden Files or Folders</a> appeared first on <a href="https://complete-concrete-concise.com">Complete, Concrete, Concise</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="c1">
<p>These instructions are for Ubuntu 12.10 running the Unity interface and using Nautilus as the default file browser &#8211; this is the default Ubuntu 12.10 configuration.</p>
<p>It may work for other version combinations, but no guarantee is made.</p>
</div>
<p>The default settings in the Nautilus file browser prevent you from seeing certain files and folders. These files begin with a period (.) and tend to be configuration files and folders (directories).</p>
<div class="c2">
<p>The Unix / Linux convention for hiding a file or folder is to prefix the name with a period (.).</p>
</div>
<p>Sometimes it is necessary to be able to see them in order to be able to edit them or delete them.</p>
<p><strong>1) Open</strong> the Nautilus file browser. The default icon on the Unity Launcher opens your Home folder:</p>
<p><img loading="lazy" decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2012/04/ubuntu-12.04-how-display-hidden-files-1.jpg" width="480" height="318" alt="" border="0" class="centered" /></p>
<p>By default, configuration files and folders are not shown:</p>
<p><img loading="lazy" decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2012/04/ubuntu-12.04-how-display-hidden-files-2.jpg" width="480" height="318" alt="" border="0" class="centered" /></p>
<p><strong>2) Type</strong> <code>Ctrl + H</code> to display hidden files and folders.</p>
<div class="c2">
<p><strong>NOTE:</strong> typing <code>Ctrl + H</code> means: while holding down the <code>Ctrl</code> key, press the <code>H</code> key as though you intend to type it.</p>
<p><strong>DO NOT</strong> press the <code>Shift</code> key because <code>Ctrl + Shift + H</code> is different from <code>Ctrl +  H</code>.</p>
<p>It does <strong>NOT</strong> matter if your <code>Caps Lock</code> key is on or off.</p>
</div>
<p>Any hidden files or folders will be displayed along with the other files and folders.</p>
<div class="c4">
<p><strong>NOTE:</strong> there may <u>not</u> be any hidden files or folders to display.</p>
</div>

<p>The post <a href="https://complete-concrete-concise.com/ubuntu-2/ubuntu-12-10/ubuntu-12-10-how-to-display-show-hidden-files-or-folders/">Ubuntu 12.10 &#8211; How to Display / Show Hidden Files or Folders</a> appeared first on <a href="https://complete-concrete-concise.com">Complete, Concrete, Concise</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
