<?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>Basic lessons in HTML, CGI, SEO, domain registration, hosting - build an on line business! &#187; Internal Style Sheets</title>
	<atom:link href="http://powertoearnmoney.com/tag/internal-style-sheets/feed/" rel="self" type="application/rss+xml" />
	<link>http://powertoearnmoney.com</link>
	<description>Learn to write HTML, CGI, SEO tips, domain setup- to build a website or blog to earn money from home</description>
	<lastBuildDate>Fri, 03 Feb 2012 16:15:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to Use Internal Style Sheets</title>
		<link>http://powertoearnmoney.com/html/how-to-use-internal-style-sheets/</link>
		<comments>http://powertoearnmoney.com/html/how-to-use-internal-style-sheets/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 17:09:33 +0000</pubDate>
		<dc:creator>AdminP</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[Internal Style Sheets]]></category>
		<category><![CDATA[Using Style Sheets]]></category>

		<guid isPermaLink="false">http://powertoearnmoney.com/?p=539</guid>
		<description><![CDATA[<p>Writing an HTML page that has different sizes of fonts, font color, link elements, etc. to make the page interesting doesn&#8217;t have to be time consuming or difficult. Rather than coding each word or element individually, using an &#8216;internal style sheet&#8217; on a page makes setting the tags easy &#8211; particularly if you plan on [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-556" title="internalstylesheets1" src="http://powertoearnmoney.com/wp-content/uploads/2009/12/internalstylesheets1.jpg" alt="internalstylesheets1" width="187" height="194" />Writing an HTML page that has different sizes of fonts, font color, link elements, etc. to make the page interesting doesn&#8217;t have to be time consuming or difficult. Rather than coding each word or element individually, using an &#8216;internal style sheet&#8217; on a page makes setting the tags easy &#8211; particularly if you plan on using tables.</p>
<p>The information contained in an &#8216;internal style sheet&#8217; is placed after the &lt;/HEAD&gt; tag but before the &lt;BODY&gt; tag. All of the information included in the style sheet will be between the &lt;STYLE&gt; and &lt;/STYLE&gt; tags. You can also assign subcategories to elements . . . for now we&#8217;ll just address the basics.</p>
<p>You can assign a variety of tags in the &#8216;style&#8217; tags, i.e.,</p>
<ul>
<li>Link color</li>
<li>Hover color (makes the font color of an active link change when the cursor is placed on it)</li>
<li>Remove the underline from active links (Text decoration)</li>
<li>Assign font elements for tables (Rows and columns)</li>
<li>Assign margin sizes for the page</li>
<li>Designate a background image</li>
</ul>
<p>We all know that when you have an open tag &lt; &gt; you must have a close tag &lt;/ &gt; for the code. However, if you are using a table with a lot of text, the code you assign using tags, i,e, font, font color, font size, italics, etc. will not carry from one row to the next or from one cell to the next. This means if you do not use an <em>internal style sheet</em> you will have to code the font tags for each row and cell to maintain the continuity of the table. That&#8217;s a lot of work!</p>
<p>However, if you have an <em>internal style sheet</em> set up, you can begin building the page without having to do any coding relevant to the table&#8217;s basic styles &#8211; or page styles either.</p>
<p>Within the &#8216;style&#8217; tags each set of properties must begin with an opening curly bracket &#8221; { &#8221; and end with a closing curly bracket &#8221; } &#8220;. Also, when you are using more than one style marker per curly bracket, it assigned values must be separated with a semi-color &#8221; ; &#8220;.  <em><span style="color: #999999;">See examples below </span></em></p>
<p>In the following examples, HTML code is shown in <span style="color: #0000ff;"><strong>blue.</strong></span></p>
<h3><span style="color: #0000ff;"><span style="color: #000000;">Fonts</span></span></h3>
<p>One of the best uses for an <em>internal style sheet</em> is to assign values to the page&#8217;s font &#8211; size, face and color.  These values can be applied to the body of the page as well as any table (rows and columns).</p>
<p style="padding-left: 30px;"><span style="text-decoration: underline;">Example</span>:  In writing an HTML page you want to assign values to the page&#8217;s body and the table&#8217;s rows and columns. The values you want to assign are the font face and size. In our example the font-family is &#8216;Arial&#8217; followed by a &#8216;back-up&#8217; font Helvetica should the Arial face not be available. We have also set the font size to 12px (pixels). By assigning this code, the body text  <em>and</em> the text for every table on this page will display in Arial, size 12px. The complete code to do this would look like:</p>
<p><span style="color: #0000ff;"><strong>&lt;STYLE&gt;</strong></span></p>
<p><span style="color: #0000ff;"><strong>body,td,tr {</strong></span></p>
<p><span style="color: #0000ff;"><strong>font-family: Arial, Helvetica, sans-serif;</strong></span></p>
<p><span style="color: #0000ff;"><strong>font-size: 12px;</strong></span></p>
<p><span style="color: #0000ff;"><strong>}</strong></span></p>
<p><span style="color: #0000ff;"><strong>&lt;/STYLE&gt;</strong></span></p>
<p style="padding-left: 30px;"><strong>Note</strong>: In example above we have separated the tags we want to assign values to with commas. By using commas to separate the tags, the properties assigned will apply to all tags &#8211; (body, td, tr).  If we had only <strong>td,tr </strong>for our tags, then only the table columns and rows would be effected and the rest of the body would be shown in the default settings.</p>
<h3>Links</h3>
<p>Active links on a page are <span style="text-decoration: underline;">underlined</span> by default, however, sometimes you may not want the link underlined. Removing the underline can be accomplished through the use of an <em>internal style sheet</em> as well.</p>
<p>Also, assigning different colors to anchor text allows you to not only highlight an active link but also let the viewer see the links they have already visited.</p>
<p style="padding-left: 30px;"><span style="text-decoration: underline;">Example</span>: We do not want the links on our page to be underlined,.i.e., no &#8216;text decoration&#8217;. We also want our active links to display as &#8216;black&#8217; (#000000), visited links to display as &#8216;blue&#8217; (#0000FF) and the link&#8217;s hover color to be &#8216;red&#8217; (#FF0000). To accomplish this our code would look like:</p>
<p><span style="color: #0000ff;"><strong>&lt;STYLE&gt;</strong></span></p>
<p><span style="color: #0000ff;"><strong>a {text-decoration: none}</strong></span></p>
<p><span style="color: #0000ff;"><strong>a:link{color: #000000}</strong></span></p>
<p><span style="color: #0000ff;"><strong>a:visited {color: #0000FF}</strong></span></p>
<p><span style="color: #0000ff;"><strong>a:hover {color: #FF0000}</strong></span></p>
<p><span style="color: #0000ff;"><strong>&lt;/STYLE&gt;</strong></span></p>
<p> </p>
<h3>Margins</h3>
<p>There may be times when you will want to set the size of the margins so that the page displays with no space at the top, left, right, bottom. You would use the information in this style sheet to adjust the position of the page relevant to how it displays on the screen.</p>
<p style="padding-left: 30px;"><span style="text-decoration: underline;">Example</span>: We want our page to be placed squarely in the upper left corner &#8211; no space. The code for this would look like:</p>
<p><span style="color: #0000ff;"><strong>&lt;STYLE&gt;</strong></span></p>
<p><span style="color: #0000ff;"><strong>body {</strong></span></p>
<p><span style="color: #0000ff;"><strong>margin-left: 0px;</strong></span></p>
<p><span style="color: #0000ff;"><strong>margin-top: 0px;</strong></span></p>
<p><span style="color: #0000ff;"><strong>margin-right: 0px;</strong></span></p>
<p><span style="color: #0000ff;"><strong>margin-bottom: 0px;</strong></span></p>
<p><span style="color: #0000ff;"><strong>}</strong></span></p>
<p><span style="color: #0000ff;"><strong>&lt;STYLE&gt;</strong></span></p>
<h3>Additional tips:</h3>
<ol>
<li>You can change styles individually within a page that has an <em>internal style sheet</em> by coding the desired properties &#8211; such as font size, color or face &#8211;  in line.  This code will take precedence over the <em>internal style sheet.</em></li>
<li>Add comments using the open comment tag ( &lt;! &#8211; - ) after the &lt;STYLE&gt; tag and the close comment tag ( &#8211; - &gt; ) before the &lt;/STYLE&gt; tag. This will hide the style sheet from browsers.</li>
<li>Define additional properties for a tag by typing the dependent tag after the parent tag separated by a space.</li>
</ol>
<p style="padding-left: 60px;"><span style="text-decoration: underline;">Example</span>: You want all the text marked with &lt;em&gt; &lt;/em&gt; tags (italics) inside of the H1 tag to be shown in red. This one line of code within the STYLE tags would look like:</p>
<p><span style="color: #0000ff;"><strong>H1 EM {color:red}</strong></span></p>
<h3>Summary</h3>
<p>Using <em>internal style sheets</em> cuts down on a lot of work by allowing you to address all of the &#8216;styles&#8217; on a page in one place.  And, while the different style codes have been shown separately for sake of discussion, they could all be displayed inside one set of &#8216;style&#8217; tags by making use of the curly brackets to separate them.</p>
<p>For more information on internal style sheets, get one of the <a href="http://astore.amazon.com/ptem-20&quot;"><span style="color: #ff0000;">Quickstart Guides on HTML by Elizabeth Castro &#8211; available from Amazon</span></a><span style="color: #ff0000;">.</span></p>
<h3>Upcoming Topics</h3>
<ul>
<li>Gathering Statistics</li>
<li>The unbelievable new program takes you from start to finish on building a profitable blog.</li>
</ul>
<p><script type="text/javascript"><!--
google_ad_client = "pub-1598331958804858";
/* PTEM_Posts_12042009_336x280, created 4/20/10 */
google_ad_slot = "7069101248";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fpowertoearnmoney.com%2Fhtml%2Fhow-to-use-internal-style-sheets%2F&amp;title=How%20to%20Use%20Internal%20Style%20Sheets"><img src="http://powertoearnmoney.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://powertoearnmoney.com/html/how-to-use-internal-style-sheets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

