 
    
<?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>magin-top Archives - Complete, Concrete, Concise</title>
	<atom:link href="https://complete-concrete-concise.com/tag/magin-top/feed/" rel="self" type="application/rss+xml" />
	<link>https://complete-concrete-concise.com/tag/magin-top/</link>
	<description>Practical Information Without The Bloat</description>
	<lastBuildDate>Sat, 05 Jan 2019 14:24:43 +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>Nine More CSS Properties to Play With</title>
		<link>https://complete-concrete-concise.com/tutorials/webdev/front-end-basics/nine-more-css-properties-to-play-with/</link>
		
		<dc:creator><![CDATA[richardsplanet]]></dc:creator>
		<pubDate>Wed, 25 Apr 2018 10:56:13 +0000</pubDate>
				<category><![CDATA[Front-End Basics]]></category>
		<category><![CDATA[box-sizing]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[font-family]]></category>
		<category><![CDATA[font-size]]></category>
		<category><![CDATA[font-style]]></category>
		<category><![CDATA[font-weight]]></category>
		<category><![CDATA[height]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[line-height]]></category>
		<category><![CDATA[magin-top]]></category>
		<category><![CDATA[margin]]></category>
		<category><![CDATA[margin-bottom]]></category>
		<category><![CDATA[margin-left]]></category>
		<category><![CDATA[margin-right]]></category>
		<category><![CDATA[padding]]></category>
		<category><![CDATA[padding-bottom]]></category>
		<category><![CDATA[padding-left]]></category>
		<category><![CDATA[padding-right]]></category>
		<category><![CDATA[padding-top]]></category>
		<category><![CDATA[text-align]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[width]]></category>
		<guid isPermaLink="false">https://complete-concrete-concise.com/?p=3627</guid>

					<description><![CDATA[<p>Expand your CSS styling vocabulary with 9 more properties and expand your knowledge of margin and padding.</p>
<p>The post <a href="https://complete-concrete-concise.com/tutorials/webdev/front-end-basics/nine-more-css-properties-to-play-with/">Nine More CSS Properties to Play With</a> appeared first on <a href="https://complete-concrete-concise.com">Complete, Concrete, Concise</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="preamble">
<p>So far, we have restricted ourselves to a handful of CSS Properties as we familiarize ourselves with how CSS and the Box Model.</p>
<p>This tutorial expands your vocabulary with 9 new properties.</p>
</div>
<p>We’ve seen these 6 CSS properties:</p>
<ol type="1">
<li><span class="css-property">color</span></li>
<li><span class="css-property">background-color</span></li>
<li><span class="css-property">padding</span></li>
<li><span class="css-property">border</span></li>
<li><span class="css-property">margin</span></li>
<li><span class="css-property">display</span></li>
</ol>
<p>They allow you to play around with the text and background colours and the space around your content.</p>
<p>We’ll expand our knowledge of the <span class="css-property">margin</span> and <span class="css-property">padding</span> properties and add learn another 9 CSS properties to allow you to give a bit more style to your document.</p>
<p>As with the previous 6 properties, we won’t cover them all in full detail &#8211; just enough to so you can use them and become familiar with them. They will be covered in more detail in future tutorials.</p>
<h2>
Contents<br />
</h2>
<ol type="1">
<li><a href="#margin">margin</a>
<ol type="1">
<li><a href="#specific-margin-styling">Specific Margin Styling</a></li>
<li><a href="#styling-with-4-margin-values">Styling with 4 Margin Values</a></li>
<li><a href="#styling-with-2-margin-values">Styling with 2 Margin Values</a></li>
</ol>
</li>
<li><a href="#padding">padding</a>
<ol type="1">
<li><a href="#specific-padding-styling">Specific Padding Styling</a></li>
<li><a href="#styling-with-4-padding-values">Styling with 4 Padding Values</a></li>
<li><a href="#styling-with-2-padding-values">Styling with 2 Padding Values</a></li>
</ol>
</li>
<li><a href="#width">width</a>
<ol type="1">
<li><a href="#width-and-the-img-tag">width and the &lt;img&gt; tag</a></li>
</ol>
</li>
<li><a href="#height">height</a></li>
<li><a href="#box-sizing">box-sizing</a></li>
<li><a href="#font-size">font-size</a>
</li>
<li><a href="#font-family">font-family</a></li>
<li><a href="#font-weight">font-weight</a></li>
<li><a href="#font-style">font-style</a></li>
<li><a href="#line-height">line-height</a></li>
<li><a href="#text-align">text-align</a></li>
<li><a href="#conclusion">Conclusion</a></li>
<li><a href="#playing-around">Playing Around</a></li>
<li><a href="#references">References</a></li>
</ol>
<h2 id="margin">margin</h2>
<p>You have seen how to set all margins around an HTML <strong>element</strong> to the same value:</p>
<div class="sourceCode" id="cb1">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb1-1" data-line-number="1">p {</a>
<a class="sourceLine" id="cb1-2" data-line-number="2">  <span class="kw">margin</span>: <span class="dv">16px</span>;</a>
<a class="sourceLine" id="cb1-3" data-line-number="3">}</a></code></pre>
</div>
<p>The above code fragment will set all margins around the paragraph <strong>element</strong> to 16px.</p>
<p><strong>Remember</strong>: top and bottom margins are ignored for HTML elements with the <span class="css-property">display</span> property set to <strong>inline</strong>.</p>
<h3 id="specific-margin-styling">Specific Margin Styling</h3>
<p>You can choose which margin to style:</p>
<div class="sourceCode" id="cb2">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb2-1" data-line-number="1"><span class="fu">.left-margin</span> {</a>
<a class="sourceLine" id="cb2-2" data-line-number="2">  <span class="kw">margin-left</span>: <span class="dv">16px</span>;</a>
<a class="sourceLine" id="cb2-3" data-line-number="3">}</a>
<a class="sourceLine" id="cb2-4" data-line-number="4"></a>
<a class="sourceLine" id="cb2-5" data-line-number="5"><span class="fu">.right-margin</span> {</a>
<a class="sourceLine" id="cb2-6" data-line-number="6">  <span class="kw">margin-right</span>: <span class="dv">16px</span>;</a>
<a class="sourceLine" id="cb2-7" data-line-number="7">}</a>
<a class="sourceLine" id="cb2-8" data-line-number="8"></a>
<a class="sourceLine" id="cb2-9" data-line-number="9"><span class="fu">.top-margin</span> {</a>
<a class="sourceLine" id="cb2-10" data-line-number="10">  <span class="kw">margin-top</span>: <span class="dv">16px</span>;</a>
<a class="sourceLine" id="cb2-11" data-line-number="11">}</a>
<a class="sourceLine" id="cb2-12" data-line-number="12"></a>
<a class="sourceLine" id="cb2-13" data-line-number="13"><span class="fu">.bottom-margin</span> {</a>
<a class="sourceLine" id="cb2-14" data-line-number="14">  <span class="kw">margin-bottom</span>: <span class="dv">16px</span>;</a>
<a class="sourceLine" id="cb2-15" data-line-number="15">}</a></code></pre>
</div>
<p>Each class in the code fragment above applies a margin value to a specific side.</p>
<h3 id="styling-with-4-margin-values">Styling with 4 Margin Values</h3>
<p>You can individually style all four margin in a single line:</p>
<div class="sourceCode" id="cb3">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb3-1" data-line-number="1"><span class="fu">.custom-margins</span> {</a>
<a class="sourceLine" id="cb3-2" data-line-number="2">  <span class="kw">margin</span>: <span class="dv">8px</span> <span class="dv">10px</span> <span class="dv">4px</span> <span class="dv">16px</span>;</a>
<a class="sourceLine" id="cb3-3" data-line-number="3">}</a></code></pre>
</div>
<p>The margin values start at the top and are given in clockwise order:</p>
<ol type="1">
<li>top</li>
<li>right</li>
<li>bottom</li>
<li>left</li>
</ol>
<h3 id="styling-with-2-margin-values">Styling with 2 Margin Values</h3>
<p>If the top and bottom margins are the same and the left and right margins are the same, then you can style them in a single line:</p>
<div class="sourceCode" id="cb4">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb4-1" data-line-number="1"><span class="fu">.custom-margins</span> {</a>
<a class="sourceLine" id="cb4-2" data-line-number="2">  <span class="kw">margin</span>: <span class="dv">0px</span> <span class="dv">16px</span>;</a>
<a class="sourceLine" id="cb4-3" data-line-number="3">}</a></code></pre>
</div>
<p>The first value is the top and bottom margin value. The second value is the left and right margin value.</p>
<h2 id="padding">padding</h2>
<p>You have seen how to set all the padding around HTML <strong>content</strong> to the same value:</p>
<div class="sourceCode" id="cb5">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb5-1" data-line-number="1">p {</a>
<a class="sourceLine" id="cb5-2" data-line-number="2">  <span class="kw">padding</span>: <span class="dv">16px</span>;</a>
<a class="sourceLine" id="cb5-3" data-line-number="3">}</a></code></pre>
</div>
<p>The above code fragment will set all the padding around the paragraph <strong>content</strong> to 16px.</p>
<h3 id="specific-padding-styling">Specific Padding Styling</h3>
<p>You can choose which side to apply padding to:</p>
<div class="sourceCode" id="cb6">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb6-1" data-line-number="1"><span class="fu">.left-margin</span> {</a>
<a class="sourceLine" id="cb6-2" data-line-number="2">  <span class="kw">padding-left</span>: <span class="dv">16px</span>;</a>
<a class="sourceLine" id="cb6-3" data-line-number="3">}</a>
<a class="sourceLine" id="cb6-4" data-line-number="4"></a>
<a class="sourceLine" id="cb6-5" data-line-number="5"><span class="fu">.right-margin</span> {</a>
<a class="sourceLine" id="cb6-6" data-line-number="6">  <span class="kw">padding-right</span>: <span class="dv">16px</span>;</a>
<a class="sourceLine" id="cb6-7" data-line-number="7">}</a>
<a class="sourceLine" id="cb6-8" data-line-number="8"></a>
<a class="sourceLine" id="cb6-9" data-line-number="9"><span class="fu">.top-padding</span> {</a>
<a class="sourceLine" id="cb6-10" data-line-number="10">  <span class="kw">padding-top</span>: <span class="dv">16px</span>;</a>
<a class="sourceLine" id="cb6-11" data-line-number="11">}</a>
<a class="sourceLine" id="cb6-12" data-line-number="12"></a>
<a class="sourceLine" id="cb6-13" data-line-number="13"><span class="fu">.bottom-padding</span> {</a>
<a class="sourceLine" id="cb6-14" data-line-number="14">  <span class="kw">padding-bottom</span>: <span class="dv">16px</span>;</a>
<a class="sourceLine" id="cb6-15" data-line-number="15">}</a></code></pre>
</div>
<p>Each class in the code fragment above applies a padding value to a specific side.</p>
<h3 id="styling-with-4-padding-values">Styling with 4 Padding Values</h3>
<p>You can individually style all four padding values in a single line:</p>
<div class="sourceCode" id="cb7">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb7-1" data-line-number="1"><span class="fu">.custom-padding</span> {</a>
<a class="sourceLine" id="cb7-2" data-line-number="2">  <span class="kw">padding</span>: <span class="dv">8px</span> <span class="dv">10px</span> <span class="dv">4px</span> <span class="dv">16px</span>;</a>
<a class="sourceLine" id="cb7-3" data-line-number="3">}</a></code></pre>
</div>
<p>The padding values start at the top and are given in clockwise order:</p>
<ol type="1">
<li>top</li>
<li>right</li>
<li>bottom</li>
<li>left</li>
</ol>
<h3 id="styling-with-2-padding-values">Styling with 2 Padding Values</h3>
<p>If the top and bottom padding is the same and the left and right padding is the same, then you can style them in a single line:</p>
<div class="sourceCode" id="cb8">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb8-1" data-line-number="1"><span class="fu">.custom-padding</span> {</a>
<a class="sourceLine" id="cb8-2" data-line-number="2">  <span class="kw">padding</span>: <span class="dv">0px</span> <span class="dv">16px</span>;</a>
<a class="sourceLine" id="cb8-3" data-line-number="3">}</a></code></pre>
</div>
<p>This first value is the top and bottom padding value. The second value is the left and right padding value.</p>
<h2 id="width">width</h2>
<p>You’ve seen that block elements take up the full width of the container they are in. The <span class="css-property">width</span> allows you to control the width of the HTML content:</p>
<div class="sourceCode" id="cb9">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb9-1" data-line-number="1"><span class="fu">.width-test</span> {</a>
<a class="sourceLine" id="cb9-2" data-line-number="2">  <span class="kw">width</span>: <span class="dv">200px</span>;</a>
<a class="sourceLine" id="cb9-3" data-line-number="3">  <span class="kw">border</span>: <span class="dv">2px</span> <span class="dv">solid</span> <span class="dv">red</span>;</a>
<a class="sourceLine" id="cb9-4" data-line-number="4">  <span class="kw">background-color</span>:lightgray;</a>
<a class="sourceLine" id="cb9-5" data-line-number="5">}</a></code></pre>
</div>
<p>As with other CSS properties, you specify dimensions in pixels.<a href="#fn1" class="footnote-ref" id="fnref1"><sup>1</sup></a></p>
<p>Applying the above code fragment to the following HTML code:</p>
<div class="sourceCode" id="cb10">
<pre class="sourceCode html"><code class="sourceCode html"><a class="sourceLine" id="cb10-1" data-line-number="1"><span class="kw">&lt;p</span><span class="ot"> class=</span><span class="st">&quot;width-test&quot;</span><span class="kw">&gt;</span></a>
<a class="sourceLine" id="cb10-2" data-line-number="2">  This is a 200 pixel wide test paragraph.</a>
<a class="sourceLine" id="cb10-3" data-line-number="3"><span class="kw">&lt;/p&gt;</span></a>
<a class="sourceLine" id="cb10-4" data-line-number="4"><span class="kw">&lt;p</span><span class="ot"> class=</span><span class="st">&quot;width-test&quot;</span><span class="kw">&gt;</span></a>
<a class="sourceLine" id="cb10-5" data-line-number="5">  Another paragraph.</a>
<a class="sourceLine" id="cb10-6" data-line-number="6"><span class="kw">&lt;/p&gt;</span></a></code></pre>
</div>
<p>will result in something like the following:</p>
<p style="width:200px;border:2px solid red;background:lightgray;">
This is a 200 pixel wide test paragraph.
</p>
<p style="width:200px;border:2px solid red;background:lightgray;">
Another paragraph.
</p>
<p>Notice that the HTML element:</p>
<ul>
<li>no longer expands to fill the full width of the container</li>
<li>the block elements still follow normal HTML flow and stack one atop the other<a href="#fn2" class="footnote-ref" id="fnref2"><sup>2</sup></a></li>
</ul>
<h3 id="width-and-the-img-tag">width and the &lt;img&gt; tag</h3>
<p>Setting the <span class="css-property">width</span> property on an <span class="html-tag">img</span> tag to <span class="css-value">100%</span>, will scale the image to fit the enclosing container<a href="#fn3" class="footnote-ref" id="fnref3"><sup>3</sup></a> without distorting the image.</p>
<div class="sourceCode" id="cb11">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb11-1" data-line-number="1">img {</a>
<a class="sourceLine" id="cb11-2" data-line-number="2">  <span class="kw">width</span>: <span class="dv">100%</span>;</a>
<a class="sourceLine" id="cb11-3" data-line-number="3">}</a></code></pre>
</div>
<p>Consider the following 400x400px image:</p>
<p><img fetchpriority="high" decoding="async" src="https://complete-concrete-concise.com/wp-content/uploads/2018/04/22-img-width-400-min.jpg" alt="Labrador Retriever puppy sitting in grass." width="400" height="400" class="aligncenter size-full wp-image-3746" srcset="https://complete-concrete-concise.com/wp-content/uploads/2018/04/22-img-width-400-min.jpg 400w, https://complete-concrete-concise.com/wp-content/uploads/2018/04/22-img-width-400-min-150x150.jpg 150w, https://complete-concrete-concise.com/wp-content/uploads/2018/04/22-img-width-400-min-300x300.jpg 300w" sizes="(max-width: 400px) 100vw, 400px" /></p>
<p>If we style the <span class="html-tag">img</span> tag to have a <span class="css-property">width</span> of <span class="css-value">100%</span>:</p>
<div class="sourceCode" id="cb12">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb12-1" data-line-number="1">img {</a>
<a class="sourceLine" id="cb12-2" data-line-number="2">  <span class="kw">width</span>: <span class="dv">100%</span>;</a>
<a class="sourceLine" id="cb12-3" data-line-number="3">}</a></code></pre>
</div>
<p>and insert the image inside smaller and larger containers:</p>
<div class="sourceCode" id="cb13">
<pre class="sourceCode html"><code class="sourceCode html"><a class="sourceLine" id="cb13-1" data-line-number="1"><span class="kw">&lt;div</span><span class="ot"> class=</span><span class="st">&quot;small-container&quot;</span><span class="kw">&gt;</span></a>
<a class="sourceLine" id="cb13-2" data-line-number="2">  <span class="kw">&lt;img</span><span class="ot"> src=</span><span class="st">&quot;image.jpg&quot;</span><span class="kw">&gt;</span></a>
<a class="sourceLine" id="cb13-3" data-line-number="3"><span class="kw">&lt;/div&gt;</span></a>
<a class="sourceLine" id="cb13-4" data-line-number="4"></a>
<a class="sourceLine" id="cb13-5" data-line-number="5"><span class="kw">&lt;div</span><span class="ot"> class=</span><span class="st">&quot;large-container&quot;</span><span class="kw">&gt;</span></a>
<a class="sourceLine" id="cb13-6" data-line-number="6">  <span class="kw">&lt;img</span><span class="ot"> src=</span><span class="st">&quot;image.jpg&quot;</span><span class="kw">&gt;</span></a>
<a class="sourceLine" id="cb13-7" data-line-number="7"><span class="kw">&lt;/div&gt;</span></a></code></pre>
</div>
<p>where:</p>
<div class="sourceCode" id="cb14">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb14-1" data-line-number="1"><span class="fu">.small-container</span> {</a>
<a class="sourceLine" id="cb14-2" data-line-number="2">  <span class="kw">width</span>: <span class="dv">200px</span>;</a>
<a class="sourceLine" id="cb14-3" data-line-number="3">}</a>
<a class="sourceLine" id="cb14-4" data-line-number="4"></a>
<a class="sourceLine" id="cb14-5" data-line-number="5"><span class="fu">.large-container</span> {</a>
<a class="sourceLine" id="cb14-6" data-line-number="6">  <span class="kw">width</span>: <span class="dv">500px</span>;</a>
<a class="sourceLine" id="cb14-7" data-line-number="7">}</a></code></pre>
</div>
<p>We get the following results:</p>
<div class="html-output">
<p>
200px wide container:
</p>
<div style="width:200px;">
<img decoding="async" src="https://complete-concrete-concise.com/wp-content/uploads/2018/04/22-img-width-400-min.jpg" alt="Labrador Retriever puppy sitting in grass."/>
</div>
<p>
500px wide container:
</p>
<div style="width:500px;">
<img decoding="async" style="width:100%;" src="https://complete-concrete-concise.com/wp-content/uploads/2018/04/22-img-width-400-min.jpg" alt="Labrador Retriever puppy sitting in grass."/>
</div>
</div>
<h2 id="height">height</h2>
<p>You’ve seen that HTML elements expand in height to fit whatever content they contain. Just as you can specify the width of the HTML element, you can also specify its height:</p>
<div class="sourceCode" id="cb15">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb15-1" data-line-number="1"><span class="fu">.height-test</span> {</a>
<a class="sourceLine" id="cb15-2" data-line-number="2">  <span class="kw">height</span>: <span class="dv">100px</span>;</a>
<a class="sourceLine" id="cb15-3" data-line-number="3">  <span class="kw">border</span>: <span class="dv">5px</span> <span class="dv">green</span> <span class="dv">solid</span>;</a>
<a class="sourceLine" id="cb15-4" data-line-number="4">  <span class="kw">background-color</span>: <span class="dv">yellow</span>;</a>
<a class="sourceLine" id="cb15-5" data-line-number="5">}</a></code></pre>
</div>
<p>As with many of the other CSS properties, you specify dimensions in pixels.</p>
<p>Applying the above code fragment to the following HTML code:</p>
<div class="sourceCode" id="cb16">
<pre class="sourceCode html"><code class="sourceCode html"><a class="sourceLine" id="cb16-1" data-line-number="1"><span class="kw">&lt;p</span><span class="ot"> class=</span><span class="st">&quot;height-test&quot;</span><span class="kw">&gt;</span></a>
<a class="sourceLine" id="cb16-2" data-line-number="2">  This paragraph box is 100px high.</a>
<a class="sourceLine" id="cb16-3" data-line-number="3"><span class="kw">&lt;/p&gt;</span></a></code></pre>
</div>
<p>will result in something like the following:</p>
<p style="height:100px;border:5px solid green;background:yellow;">
This paragraph box is 100px high..
</p>
<p>Notice that the HTML element is now 200 pixels high, even though it doesn’t need to be.</p>
<p>You can combine the width and height:</p>
<div class="sourceCode" id="cb17">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb17-1" data-line-number="1"><span class="fu">.width-height-test</span> {</a>
<a class="sourceLine" id="cb17-2" data-line-number="2">  <span class="kw">width</span>: <span class="dv">200px</span>;</a>
<a class="sourceLine" id="cb17-3" data-line-number="3">  <span class="kw">height</span>: <span class="dv">200px</span>;</a>
<a class="sourceLine" id="cb17-4" data-line-number="4">  <span class="kw">border</span>: <span class="dv">2px</span> <span class="dv">solid</span> <span class="dv">black</span>;</a>
<a class="sourceLine" id="cb17-5" data-line-number="5">  <span class="kw">background</span>: <span class="dv">lime</span>;</a>
<a class="sourceLine" id="cb17-6" data-line-number="6">}</a></code></pre>
</div>
<p>Applying the above code fragment to:</p>
<div class="sourceCode" id="cb18">
<pre class="sourceCode html"><code class="sourceCode html"><a class="sourceLine" id="cb18-1" data-line-number="1"><span class="kw">&lt;p</span><span class="ot"> class=</span><span class="st">&quot;width-height-test&quot;</span><span class="kw">&gt;&lt;/p&gt;</span></a></code></pre>
</div>
<p>Results in:</p>
<p style="width:200px;height:200px;border:2px solid black;background:lime;">
<h2 id="box-sizing">box-sizing</h2>
<p>By default, the <span class="css-property">width</span> and <span class="css-property">height</span> set the dimensions of the <strong>content</strong> area of the CSS Box Model. Any padding or borders you add are extra on top of the width and height.</p>
<p>However, Microsoft’s Internet Explorer used what is commonly known as the <strong>broken box model</strong>. Internet Explorer considered the padding and borders as part of the width and height of the HTML element.</p>
<p>In both cases, margins are always extra on top of whatever width or height you set.</p>
<p>Consider the following two HTML paragraph elements:<a href="#fn4" class="footnote-ref" id="fnref4"><sup>4</sup></a></p>
<p style="box-sizing:content-box; border:5px solid black;padding:20px;width:200px;height:200px;background:lime;">
width = 200px, <br /> height = 200px, <br />border = 5px <br /> padding = 20px, <br />Content sizing
</p>
<p style="box-sizing:border-box; border:5px solid black;padding:20px;width:200px;height:200px;background:yellow;">
width = 200px, <br /> height = 200px, <br /> border = 5px, <br /> padding = 20px, <br />Border sizing
</p>
<p>Both have exactly the same settings for:</p>
<ul>
<li>width</li>
<li>height</li>
<li>padding</li>
<li>border</li>
</ul>
<p>The green element is sized using the standard model which applies the width and height only to the content of the CSS Box. The padding and borders add extra width and height to the element.</p>
<p>The yellow element is sized using Internet Explorer’s <strong>broken box model</strong> which applies the width and height to the borders of the CSS Box. All padding and content is contained within that.</p>
<p>You can choose which model you want to use:</p>
<ul>
<li><strong>content-box</strong> &#8211; this is the default behaviour and can be considered to put the content “first” since it sizes the space for the content. However, it can make for more difficult layouts because changing the padding or border changes the size of the element on the page.</li>
<li><strong>border-box</strong> &#8211; this can be considered to put the layout “first” since it sizes the space for the entire HTML element (content + padding + border).</li>
</ul>
<p>Regardless of which box sizing method you choose, margins always add extra space.</p>
<p>Normally, you don’t set this property on an element by element basis, but for all elements in the document:</p>
<div class="sourceCode" id="cb20">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb20-1" data-line-number="1">* {</a>
<a class="sourceLine" id="cb20-2" data-line-number="2">  <span class="kw">box-sizing</span>: <span class="dv">border-box</span>;</a>
<a class="sourceLine" id="cb20-3" data-line-number="3">}</a></code></pre>
</div>
<p>The above code fragment will change the <span class="css-property">box-sizing</span> to <strong>border-box</strong> for all elements in the document. This is a typical use for the <strong>Universal</strong> selector.</p>
<p>This might seem somewhat pointless since the only layout flow you know is top to bottom (and nesting elements inside other elements). However, in a future tutorial, you will see how to change the normal <em>top to bottom</em> HTML flow so that HTML elements flow from <em>left to right</em> or <em>right to left</em>.</p>
<h2 id="font-size">font-size</h2>
<p>Fonts are graphical representations of characters that are (usually) used for text.<a href="#fn5" class="footnote-ref" id="fnref5"><sup>5</sup></a></p>
<p>In general, the default font size in a browser is set to 16 pixels.<a href="#fn6" class="footnote-ref" id="fnref6"><sup>6</sup></a></p>
<p>You can change the size using the CSS property <span class="css-property">font-size</span>:</p>
<div class="sourceCode" id="cb21">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb21-1" data-line-number="1"><span class="fu">.large-font</span> {</a>
<a class="sourceLine" id="cb21-2" data-line-number="2">  <span class="kw">font-size</span>: <span class="dv">32px</span>;</a>
<a class="sourceLine" id="cb21-3" data-line-number="3">}</a></code></pre>
</div>
<p>The size is given in pixels.<a href="#fn7" class="footnote-ref" id="fnref7"><sup>7</sup></a></p>
<p style="font-size:32px; border:2px solid black;background:yellow;padding:0.5em; line-height:40px">
A sample paragraph with the font size set to 32px (and some other styling for background color and border).
</p>
<h2 id="font-family">font-family</h2>
<p>You can specify which font should be used. For this tutorial we only cover the 3 major font families:</p>
<ul>
<li><strong>serif</strong>: <span style="font-family:serif;">serif fonts have small strokes attached to the tips of each letter. <strong>Time New Roman</strong> is an example of a serif font.</span></li>
<li><strong>sans-serif</strong>: <span style="font-family:sans-serif;">sans-serif fonts do not have the extra strokes attached to each letter. <strong>Verdana</strong> or <strong>Arial</strong> are examples of san-serif fonts.</span></li>
<li><strong>monospace</strong>: <span style="font-family:monospace;">monospace fonts have characters that are all the same width. They may be serif or sans-serif. <strong>Courier New</strong> is an example of a monospace font.</span></li>
</ul>
<p>You can change the font family (the style of the font) using the <span class="css-property">font-family</span> property:</p>
<div class="sourceCode" id="cb22">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb22-1" data-line-number="1"><span class="fu">.serif</span> {</a>
<a class="sourceLine" id="cb22-2" data-line-number="2">  <span class="kw">font-family</span>: <span class="dv">serif</span>;</a>
<a class="sourceLine" id="cb22-3" data-line-number="3">}</a>
<a class="sourceLine" id="cb22-4" data-line-number="4"></a>
<a class="sourceLine" id="cb22-5" data-line-number="5"><span class="fu">.sans</span> {</a>
<a class="sourceLine" id="cb22-6" data-line-number="6">  <span class="kw">font-family</span>: <span class="dv">sans-serif</span>;</a>
<a class="sourceLine" id="cb22-7" data-line-number="7">}</a>
<a class="sourceLine" id="cb22-8" data-line-number="8"></a>
<a class="sourceLine" id="cb22-9" data-line-number="9"><span class="fu">.mono</span> {</a>
<a class="sourceLine" id="cb22-10" data-line-number="10">  <span class="kw">font-family</span>: <span class="dv">monospace</span>;</a>
<a class="sourceLine" id="cb22-11" data-line-number="11">}</a></code></pre>
</div>
<p>The above code fragment defines 3 different classes that can be used to change the font family.</p>
<p>In a future tutorial, we will see how to specify a specific font (like Arial or Times New Roman).<a href="#fn8" class="footnote-ref" id="fnref8"><sup>8</sup></a></p>
<h2 id="font-weight">font-weight</h2>
<p>Most fonts come in two weights: normal and bold. There can be more,<a href="#fn9" class="footnote-ref" id="fnref9"><sup>9</sup></a> but, for now, we only consider those two because those are the two most common font weights. Very few fonts have more than those two weights &#8211; sometimes they only have one weight.</p>
<p>You style it using the <span class="css-property">font-weight</span> property:</p>
<div class="sourceCode" id="cb23">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb23-1" data-line-number="1"><span class="fu">.bold-font</span> {</a>
<a class="sourceLine" id="cb23-2" data-line-number="2">  <span class="kw">font-weight</span>: <span class="dv">bold</span>;</a>
<a class="sourceLine" id="cb23-3" data-line-number="3">}</a>
<a class="sourceLine" id="cb23-4" data-line-number="4"></a>
<a class="sourceLine" id="cb23-5" data-line-number="5"><span class="fu">.normal-font</span> {</a>
<a class="sourceLine" id="cb23-6" data-line-number="6">  <span class="kw">font-weight</span>: <span class="dv">normal</span>;</a>
<a class="sourceLine" id="cb23-7" data-line-number="7">}</a></code></pre>
</div>
<p>The above code fragment implements two classes that allow setting the font weight for an HTML element.</p>
<p>Applied to paragraph tags (with a bit of extra styling), the result looks like this:</p>
<p style="background:yellow;font-weight:normal">
This is some normal text.
</p>
<p style="background:yellow;font-weight:bold">
This is some bold text.
</p>
<h2 id="font-style">font-style</h2>
<p>Fonts have 3 different styles:</p>
<ul>
<li><strong>normal</strong>: this is the normal font</li>
<li><strong>italic</strong>: this is distinct from the normal font. It is typically designed to have an inclined appearance and calligraphic (handwritten) feel to it</li>
<li><strong>oblique</strong>: this is the normal font that has been tilted (typically about 10°) to the right.</li>
</ul>
<p>In practice, italic and oblique are pretty much synonymous<a href="#fn10" class="footnote-ref" id="fnref10"><sup>10</sup></a>.</p>
<div class="sourceCode" id="cb24">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb24-1" data-line-number="1"><span class="fu">.normal-style</span> {</a>
<a class="sourceLine" id="cb24-2" data-line-number="2">  <span class="kw">font-style</span>: <span class="dv">normal</span>;</a>
<a class="sourceLine" id="cb24-3" data-line-number="3">}</a>
<a class="sourceLine" id="cb24-4" data-line-number="4"></a>
<a class="sourceLine" id="cb24-5" data-line-number="5"><span class="fu">.italic-style</span> {</a>
<a class="sourceLine" id="cb24-6" data-line-number="6">  <span class="kw">font-style</span>: <span class="dv">italic</span>;</a>
<a class="sourceLine" id="cb24-7" data-line-number="7">}</a>
<a class="sourceLine" id="cb24-8" data-line-number="8"></a>
<a class="sourceLine" id="cb24-9" data-line-number="9"><span class="fu">.oblique-style</span> {</a>
<a class="sourceLine" id="cb24-10" data-line-number="10">  <span class="kw">font-style</span>: <span class="dv">oblique</span>;</a>
<a class="sourceLine" id="cb24-11" data-line-number="11">}</a></code></pre>
</div>
<p>Applied to paragraph tags (with a bit of extra styling), the result looks something like this:</p>
<p style="background:yellow;font-style:normal; font-family:serif; font-size:2em;padding:0.5em;">
This is some normal text.
</p>
<p style="background:yellow;font-style:oblique; font-family:serif; font-size:2em;;padding:0.5em;">
This is some oblique text.
</p>
<p style="background:yellow;font-style:italic; font-family:serif; font-size:2em;;padding:0.5em;">
This is some italic text.
</p>
<p>If your browser’s default serif font has italics, you will notice a difference between the oblique and italic text. You will see that the oblique is simply the normal skewed to the right.</p>
<h2 id="line-height">line-height</h2>
<p>You can also adjust the height of your lines using the <span class="css-property">line-height</span> property.</p>
<p>Single space lines would have the same height as the <span class="css-property">font-size</span>:</p>
<div class="sourceCode" id="cb25">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb25-1" data-line-number="1"><span class="fu">.single</span> {</a>
<a class="sourceLine" id="cb25-2" data-line-number="2">  <span class="kw">font-size</span>: <span class="dv">16px</span>;</a>
<a class="sourceLine" id="cb25-3" data-line-number="3">  <span class="kw">line-height</span>: <span class="dv">16px</span>;</a>
<a class="sourceLine" id="cb25-4" data-line-number="4">}</a>
<a class="sourceLine" id="cb25-5" data-line-number="5"></a>
<a class="sourceLine" id="cb25-6" data-line-number="6"><span class="fu">.double</span> {</a>
<a class="sourceLine" id="cb25-7" data-line-number="7">  <span class="kw">font-size</span>: <span class="dv">16px</span>;</a>
<a class="sourceLine" id="cb25-8" data-line-number="8">  <span class="kw">line-height</span>: <span class="dv">32px</span>;</a>
<a class="sourceLine" id="cb25-9" data-line-number="9">}</a></code></pre>
</div>
<p>The above code fragment applied to the following paragraphs results in something like this:</p>
<p style="line-height:1em; border:2px solid black;background:yellow;">
This paragraph has been styled to use a line-height equal to the font size. This makes the text “single spaced”. Depending on the font used, it can appear too dense. Normally, you would use a line height around 1.5 times the font size.
</p>
<p style="line-height:2em; border:2px solid black;background:yellow;">
This paragraph has been styled to use a line-height equal to double the font size. This makes the text “double spaced”. Depending on the font used, it can appear too sparse. Normally, you would use a line height around 1.5 times the font size.
</p>
<p style="line-height:1.5em; border:2px solid black;background:yellow;">
This paragraph has been styled to use a line-height equal to 1.5 times the font size. This makes the text. This is, typically, a good line spacing to use. Normally, you would use a line height around 1.5 times the font size.
</p>
<h2 id="text-align">text-align</h2>
<p>You can set your text alignment:</p>
<ul>
<li><strong>right</strong>: the text is right justified. This means the text lines up on the right side of the HTML element</li>
<li><strong>left</strong>: the text is left justified. This means the text lines up on the left side of the HTML element</li>
<li><strong>center</strong>: the text is horizontally centered inside the HTML element.</li>
<li><strong>justify</strong>: the text is fully justified. This means the text lines up on both the left and right side of the HTML element. White space is inserted as needed to justify the text.</li>
</ul>
<div class="sourceCode" id="cb26">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb26-1" data-line-number="1"><span class="fu">.right-align</span> {</a>
<a class="sourceLine" id="cb26-2" data-line-number="2">  <span class="kw">text-align</span>: <span class="dv">right</span>;</a>
<a class="sourceLine" id="cb26-3" data-line-number="3">}</a>
<a class="sourceLine" id="cb26-4" data-line-number="4"></a>
<a class="sourceLine" id="cb26-5" data-line-number="5"><span class="fu">.left-align</span> {</a>
<a class="sourceLine" id="cb26-6" data-line-number="6">  <span class="kw">text-align</span>: <span class="dv">left</span>;</a>
<a class="sourceLine" id="cb26-7" data-line-number="7">}</a>
<a class="sourceLine" id="cb26-8" data-line-number="8"></a>
<a class="sourceLine" id="cb26-9" data-line-number="9"><span class="fu">.center-align</span> {</a>
<a class="sourceLine" id="cb26-10" data-line-number="10">  <span class="kw">text-align</span>: <span class="dv">center</span>;</a>
<a class="sourceLine" id="cb26-11" data-line-number="11">}</a>
<a class="sourceLine" id="cb26-12" data-line-number="12"></a>
<a class="sourceLine" id="cb26-13" data-line-number="13"><span class="fu">.justified-align</span> {</a>
<a class="sourceLine" id="cb26-14" data-line-number="14">  <span class="kw">text-align</span>: <span class="dv">justify</span>;</a>
<a class="sourceLine" id="cb26-15" data-line-number="15">}</a></code></pre>
</div>
<p>The code fragment above applied to the following paragraphs results in something like:</p>
<p style="text-align:right; border:2px solid black;background:yellow">
This paragraph is right aligned. The text lines up on the right side of the HTML element. The left side can be ragged.
</p>
<p style="text-align:left; border:2px solid black;background:yellow;">
This paragraph is left aligned. This means the text lines up on the left side of the HTML element. The right side can be ragged.
</p>
<p style="text-align:center; border:2px solid black;background:yellow;">
This paragraph is centered. This means the text horizontally centers itself inside the HTML element. The left and right sides can be ragged.
</p>
<p style="text-align:justify; border:2px solid black;background:yellow;">
This paragraph is justified. This means the text lines up on both the left and the right side of the HTML element. The left and right side will not be ragged except, possibly, the right side of the last line.
</p>
<h2 id="conclusion">Conclusion</h2>
<p>We covered quite a lot of stuff &#8211; but don’t worry, there is still plenty more.</p>
<ol type="1">
<li>There are multiple ways to style margins around HTML <strong>elements</strong>:
<ol type="1">
<li>Setting all margins to the same value by providing a single value to the <span class="css-property">margin</span> property</li>
<li>Setting each margin individually using the <span class="css-property">margin-left</span>, <span class="css-property">margin-right</span>, <span class="css-property">margin-top</span>, <span class="css-property">margin-bottom</span> properties.</li>
<li>Setting all margin values individually in a single line by providing 4 values to the <span class="css-property">margin</span> property. The margin values are given in clockwise order starting from the top: top, right, bottom, left.</li>
</ol>
</li>
<li>Remember that top and bottom margins are ignored for inline elements.</li>
<li>There are multiple ways to style padding around HTML <strong>content</strong>:
<ol type="1">
<li>Setting all padding to the same value by providing a single value to the <span class="css-property">padding</span> property</li>
<li>Setting each padding value individually using the <span class="css-property">padding-left</span>, <span class="css-property">padding-right</span>, <span class="css-property">padding-top</span>, <span class="css-property">padding-bottom</span> properties.</li>
<li>Setting all padding values individually in a single line by providing 4 values to the <span class="css-property">padding</span> property. The padding values are given in clockwise order starting from the top: top, right, bottom, left.</li>
</ol>
</li>
<li>The <span class="css-property">width</span> property allows you set the width of an HTML element. The width is given in pixels.</li>
<li>The <span class="css-property">height</span> property allows you set the height of an HTML element. The height is given in pixels.</li>
<li>By default, the width and height is applied to the <strong>content</strong> of the HTML element.</li>
<li>If you want the width and height to apply to the entire HTML element, including <strong>content</strong>, <strong>padding</strong>, and <strong>margins</strong>, then you set the <span class="css-property">box-sizing</span> property to <em>border-box</em>.</li>
<li>The <span class="css-property">font-size</span> property allows you set the size of the font inside an HTML element. The size is given in pixels.</li>
<li>In general, the default font size is 16px.</li>
<li>The <span class="css-property">font-family</span> property allows you set the type of font used inside an HTML element. The 3 main font types are:
<ul>
<li>serif (<span style="font-family:serif">Serif Example</span>)</li>
<li>sans-serif (<span style="font-family:sans-serif">San Serif Example</span>)</li>
<li>monospace (<span style="font-family:monospace">Monospace Example</span>)</li>
</ul>
</li>
<li>The <span class="css-property">font-weight</span> property allows you set the weight of the font inside an HTML element. The common weights are:
<ul>
<li>normal (<span style="font-weight:normal">Normal Example</span>)</li>
<li>bold (<span style="font-weight:bold">Bold Example</span>)</li>
</ul>
</li>
<li>The <span class="css-property">font-style</span> property allows you set the style of the font inside an HTML element. The 3 styles are:
<ul>
<li>normal (<span style="font-style:normal">Normal Example</span>)</li>
<li>oblique (<span style="font-style:oblique">Oblique Example</span>)</li>
<li>italic (<span style="font-style:italic">Italic Example</span>)</li>
</ul>
</li>
<li>Italic and oblique are very similar. User agents (browsers) commonly substitute oblique for italic if an italic version of the font is not available.</li>
<li>The <span class="css-property">line-height</span> property allows you set the height of the line inside an HTML element. The height is given in pixels.</li>
<li>Typical line heights are 1.5 times the font-size.</li>
<li>The <span class="css-property">text-align</span> property allows you specify how text is to be aligned inside an HTML element. The 4 alignment values are:
<ul>
<li>left</li>
<li>right</li>
<li>center</li>
<li>justify</li>
</ul>
</li>
</ol>
<h2 id="playing-around">Playing Around</h2>
<p>The best way to learn is to play around with what you have learned.</p>
<p>You have enough knowledge now to create the following style of webpage:</p>
<div style="background:white;padding:1em;">
<p style="margin:auto;width:60%;padding:1em;background:cornsilk;text-align:center;">
Header / Title
</p>
<p style="margin:auto;width:60%;padding:1em;background:aliceblue;text-align:left;">
A whole bunch of content. You don’t need to go overboard. The goal is to practice and reinforce your knowledge, not get bored.
</p>
<p style="margin:auto;width:60%;padding:1em;background:#FFF0F8;text-align:center;">
Copyright / Footer
</p>
</div>
<p>There are a number of ways to do this (I will show 3 in the next tutorial).</p>
<ol type="1">
<li>Don’t try to get the document looking good at all kinds of resolutions. Just make it look good in your browser at whatever resolution you are using. Future tutorials will get into how to make your site <strong>responsive</strong>.</li>
<li>What do you need to do to get a uniform margin on the left-hand side?</li>
<li>How are you going to control the width of the content in the center?</li>
<li>Don’t worry about background colours (I just used them in the example to highlight the task)</li>
<li>You don’t have to use all the HTML elements and CSS properties you have seen.</li>
<li>You want the content (roughly) in the center of the page.</li>
<li>The content width should be constrained.</li>
<li>The title should be centered.</li>
<li>The copyright should be centered.</li>
</ol>
<h2 id="references">References</h2>
<ol type="1">
<li><a href="https://drafts.csswg.org/css-box-3/#margin-props">margin</a></li>
<li><a href="https://drafts.csswg.org/css-box-3/#padding-props">padding</a></li>
<li><a href="https://www.w3.org/TR/CSS2/visudet.html#the-width-property">width</a></li>
<li><a href="https://www.w3.org/TR/CSS2/visudet.html#the-height-property">height</a></li>
<li><a href="https://drafts.csswg.org/css-ui-3/#box-sizing">box-sizing</a></li>
<li><a href="https://www.w3.org/TR/CSS2/fonts.html#propdef-font-size">font-size</a></li>
<li><a href="https://www.w3.org/TR/CSS2/fonts.html#propdef-font-family">font-family</a></li>
<li><a href="https://www.w3.org/TR/CSS2/fonts.html#propdef-font-weight">font-weight</a></li>
<li><a href="https://www.w3.org/TR/CSS2/fonts.html#propdef-font-style">font-style</a></li>
<li><a href="https://www.w3.org/TR/CSS2/visudet.html#propdef-line-height">line-height</a></li>
<li><a href="https://www.w3.org/TR/CSS2/text.html#alignment-prop">text-align</a></li>
</ol>
<div class="prev">
<p><a href="https://complete-concrete-concise.com/tutorials/webdev/front-end-basics/five-examples-using-css-selectors">Prev</a></p>
</div>
<div class="next">
<p><a href="#">Next</a></p>
</div>
<div class="clear">
</div>
<section class="footnotes">
<hr />
<ol>
<li id="fn1">
<p>There are numerous ways to specify dimensions in CSS. For now, we will stick with pixels. Future tutorials will cover other dimensions.<a href="#fnref1" class="footnote-back">↩</a></p>
</li>
<li id="fn2">
<p>Getting HTML elements to flow one after the other, instead of one atop the other, will be covered in a future tutorial.<a href="#fnref2" class="footnote-back">↩</a></p>
</li>
<li id="fn3">
<p>It is a little more complicated: you also need to set the <span class="css-property">height</span> to <span class="css-value">auto</span>. Because this is the default value, there is no need to explicitly set it to <span class="css-value">auto</span>.<a href="#fnref3" class="footnote-back">↩</a></p>
</li>
<li id="fn4">
<p>The CSS used for this example is:</p>
<div class="sourceCode" id="cb19">
<pre class="sourceCode css"><code class="sourceCode css"><a class="sourceLine" id="cb19-1" data-line-number="1"><span class="fu">.content-box</span> {</a>
<a class="sourceLine" id="cb19-2" data-line-number="2">  <span class="kw">box-sizing</span>: <span class="dv">content-box</span>;</a>
<a class="sourceLine" id="cb19-3" data-line-number="3">  <span class="kw">border</span>: <span class="dv">5px</span> <span class="dv">solid</span> <span class="dv">black</span>;</a>
<a class="sourceLine" id="cb19-4" data-line-number="4">  <span class="kw">padding</span>: <span class="dv">20px</span>;<span class="kw">width</span>:<span class="dv">200px</span>;</a>
<a class="sourceLine" id="cb19-5" data-line-number="5">  <span class="kw">height</span>: <span class="dv">200px</span>;</a>
<a class="sourceLine" id="cb19-6" data-line-number="6">  <span class="kw">background</span>: <span class="dv">lime</span>;</a>
<a class="sourceLine" id="cb19-7" data-line-number="7">}</a>
<a class="sourceLine" id="cb19-8" data-line-number="8"></a>
<a class="sourceLine" id="cb19-9" data-line-number="9"><span class="fu">.border-box</span> {</a>
<a class="sourceLine" id="cb19-10" data-line-number="10">  <span class="kw">box-sizing</span>:<span class="dv">border-box</span>;</a>
<a class="sourceLine" id="cb19-11" data-line-number="11">  <span class="kw">border</span>: <span class="dv">5px</span> <span class="dv">solid</span> <span class="dv">black</span>;</a>
<a class="sourceLine" id="cb19-12" data-line-number="12">  <span class="kw">padding</span>: <span class="dv">20px</span>;</a>
<a class="sourceLine" id="cb19-13" data-line-number="13">  <span class="kw">width</span>: <span class="dv">200px</span>;</a>
<a class="sourceLine" id="cb19-14" data-line-number="14">  <span class="kw">height</span>: <span class="dv">200px</span>;</a>
<a class="sourceLine" id="cb19-15" data-line-number="15">  <span class="kw">background</span>: <span class="dv">yellow</span>;</a>
<a class="sourceLine" id="cb19-16" data-line-number="16">}</a></code></pre>
</div>
<p><a href="#fnref4" class="footnote-back">↩</a></li>
<li id="fn5">
<p>There are fonts that are just pure graphics / symbols / icons. <a href="https://fontawesome.com/">Fontawesome</a> is one such font library. We will look at it in a future tutorial.<a href="#fnref5" class="footnote-back">↩</a></p>
</li>
<li id="fn6">
<p>Most browsers let the user to change the default font (or text) size. Unfortunately, most websites do not respect this. This website does. If you go to your browser settings and change the text size, you will find this site adjusts accordingly. Go to pretty much any other website and you will find they ignore the user’s preferred font size settings.<a href="#fnref6" class="footnote-back">↩</a></p>
</li>
<li id="fn7">
<p>This will hard code the size of the font. In a future tutorial, we will see how to set the font size so it respects the users text size setting in the browser.<a href="#fnref7" class="footnote-back">↩</a></p>
</li>
<li id="fn8">
<p>Specifying a specific font is simple &#8211; just write its name. However, all things considered, it is a little more complicated. It is better to first learn the core principles before adding more complexity.<a href="#fnref8" class="footnote-back">↩</a></p>
</li>
<li id="fn9">
<p>This will be discussed more in a future tutorial.<a href="#fnref9" class="footnote-back">↩</a></p>
</li>
<li id="fn10">
<p>They’re not. An italic font is specially designed. An oblique font is simply the normal font skewed to the right.<a href="#fnref10" class="footnote-back">↩</a></p>
</li>
</ol>
</section>
<p>The post <a href="https://complete-concrete-concise.com/tutorials/webdev/front-end-basics/nine-more-css-properties-to-play-with/">Nine More CSS Properties to Play With</a> appeared first on <a href="https://complete-concrete-concise.com">Complete, Concrete, Concise</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
