<?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>Japh &#187; HTML</title>
	<atom:link href="http://japh.com.au/category/html/feed/" rel="self" type="application/rss+xml" />
	<link>http://japh.com.au</link>
	<description>Web developer, technologist, innovator. I love the internet.</description>
	<lastBuildDate>Tue, 13 Jul 2010 10:48:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Time-sensitive CSS</title>
		<link>http://japh.com.au/html/time-sensitive-css/</link>
		<comments>http://japh.com.au/html/time-sensitive-css/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 09:18:28 +0000</pubDate>
		<dc:creator>Japh</dc:creator>
				<category><![CDATA[Cascading Stylesheets]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://japh.com.au/?p=115</guid>
		<description><![CDATA[Have you ever wanted to load a specific stylesheet depending on what time it is?  It is actually very easy to do!
View Demo
I&#8217;m using jQuery in this just because it makes it look a little simpler, it&#8217;s not much more complex to do without jQuery&#8230; but let&#8217;s face it, you&#8217;re probably already using jQuery [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>Have you ever wanted to load a specific stylesheet depending on what time it is?  It is actually very easy to do!</p>
<p><a href="/demos/115/">View Demo</a></p>
<p>I&#8217;m using jQuery in this just because it makes it look a little simpler, it&#8217;s not much more complex to do without jQuery&#8230; but let&#8217;s face it, you&#8217;re probably already using jQuery anyway, so why not  <img src='http://japh.com.au/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Make yourself a new file to put your javascript into, I&#8217;ve called mine &#8220;script.js&#8221;.  Include the new javascript file by putting this line in your HTML &lt;head&gt;&lt;/head&gt; section with the following line:</p>

<div class="wp_codebox"><table><tr id="p1153"><td class="code" id="p115code3"><pre class="html" style="font-family:monospace;">&lt;script type=&quot;text/javascript&quot; src=&quot;script.js&quot;&gt;&lt;/script&gt;</pre></td></tr></table></div>

<p>Now open your &#8220;script.js&#8221; file, and put the following lump of code into it:</p>

<div class="wp_codebox"><table><tr id="p1154"><td class="code" id="p115code4"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// This line depends on jQuery, and tells the browser to kick off this stuff once</span>
<span style="color: #006600; font-style: italic;">// everything's fully loaded</span>
$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #006600; font-style: italic;">// These two lines make set a Date variable with the current date and time</span>
    <span style="color: #003366; font-weight: bold;">var</span> currentDate <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Date<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">var</span> currentHour <span style="color: #339933;">=</span> currentDate.<span style="color: #660066;">getHours</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">// Here we're creating a new &lt;link /&gt; to insert in the &lt;head&gt;&lt;/head&gt;</span>
    <span style="color: #003366; font-weight: bold;">var</span> newCSS <span style="color: #339933;">=</span> document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'link'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    newCSS.<span style="color: #660066;">type</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'text/css'</span><span style="color: #339933;">;</span>
    newCSS.<span style="color: #660066;">rel</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'stylesheet'</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">// This is where you can determine when to use which stylesheet.</span>
    <span style="color: #006600; font-style: italic;">// If the current hour is before 9am or 8pm (or later), use &quot;night.css&quot;</span>
    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>currentHour <span style="color: #339933;">&lt;</span> <span style="color: #CC0000;">9</span> <span style="color: #339933;">||</span> currentHour <span style="color: #339933;">&gt;=</span> <span style="color: #CC0000;">20</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        newCSS.<span style="color: #660066;">href</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'css/night.css'</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #006600; font-style: italic;">// Otherwise, use &quot;day.css&quot;</span>
    <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
        newCSS.<span style="color: #660066;">href</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'css/day.css'</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #006600; font-style: italic;">// This line actually does the deed, and attaches the selected stylesheet</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;head&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span>newCSS<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">// This line isn't necessary, it's just showing the actual time in the demo.</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.satellite&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span>currentDate.<span style="color: #660066;">toTimeString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Read the commenting to understand what&#8217;s actually going on there, but that should do it!  Easier than you thought, I bet  <img src='http://japh.com.au/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>If you have any questions or suggestions, leave a comment!</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://japh.com.au/html/time-sensitive-css/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>A shell for your HTML</title>
		<link>http://japh.com.au/html/a-shell-for-your-html/</link>
		<comments>http://japh.com.au/html/a-shell-for-your-html/#comments</comments>
		<pubDate>Sun, 23 Sep 2007 13:53:35 +0000</pubDate>
		<dc:creator>Japh</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.japheththomson.com/?p=5</guid>
		<description><![CDATA[Ok, so I promised you the basic structure of an HTML page.  So here is it:

&#60;!DOCTYPE html PUBLIC &#34;-//W3C//DTD XHTML 1.0 Transitional//EN&#34; &#34;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#34;&#62;
&#60;html xmlns=&#34;http://www.w3.org/1999/xhtml&#34;&#62;
&#60;head&#62;
&#60;meta http-equiv=&#34;Content-Type&#34; content=&#34;text/html; charset=utf-8&#34; /&#62;
&#60;title&#62;My First HTML Page&#60;/title&#62;
&#60;/head&#62;
&#60;body&#62;
&#60;p&#62;This is the first paragraph on the page.&#60;/p&#62;
&#60;p&#62;This is the second paragraph on the page, and it's a little bit longer than the first [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>Ok, so I promised you the basic structure of an HTML page.  So here is it:</p>

<div class="wp_codebox"><table><tr id="p57"><td class="code" id="p5code7"><pre class="html" style="font-family:monospace;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
&lt;title&gt;My First HTML Page&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;p&gt;This is the first paragraph on the page.&lt;/p&gt;
&lt;p&gt;This is the second paragraph on the page, and it's a little bit longer than the first one.  Try resizing your window to make it narrower to see the text wrap but maintain the paragraph spacing.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre></td></tr></table></div>

<p><span id="more-5"></span>Now I&#8217;ll explain what it all means!</p>
<p>The first line tells the user&#8217;s browser some basic information about how to treat the code it finds in the document.  It&#8217;s HTML, in fact, it says that it&#8217;s XHTML 1.0 Transitional.  At this point, that won&#8217;t mean much to you, and it also won&#8217;t really matter to you.  Essentially, the internet is currently transitioning from using HTML, to using XML for defining or describing the structure of a web page.  So if you&#8217;re interested in <a title="XHTML - Wikipedia" href="http://en.wikipedia.org/wiki/XHTML" target="_blank">reading more about XHTML, check out Wikipedia</a>.</p>
<p>The next line is the opening html tag.  Everything on your page should be placed within your opening and closing html tags.</p>
<p>Within your html tags, you should have a set of head tags, and a set of body tags.  Everything on your page should be within one of these two.  Content between the body tags, and various other things that we&#8217;ll get to later, between the head tags.</p>
<p>Two things we can see here already in the head tags, are a meta tag, and a title tag.  Meta tags have a number of different uses.  This particular one is defining the character set to be used on the page (UTF-8 in this case), you can also use them to define keywords for search engines and things like that.</p>
<p>The title tag defines what will appear in the user&#8217;s title bar on their browser.  For example, on this page if you look up in the title bar of your browser, you&#8217;ll see it says &#8220;Japheth Thomson&#8221;, possibly followed by some arrows and some other text (depending how you got to this article).</p>
<p>For now, you can just copy and paste the code above into a new text file, save it as template.html, and then open it in a browser to see what happens.</p>
<p>You should get a blank white page, with the words &#8220;Untitled Document&#8221; in your title bar.  Once you&#8217;ve got that working fine, try having a play with inserting paragraph tags as I talked about in my previous post to see what happens.</p>
<p>As an example, you should end up with something like this:</p>

<div class="wp_codebox"><table><tr id="p58"><td class="code" id="p5code8"><pre class="html" style="font-family:monospace;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
&lt;title&gt;My First HTML Page&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;p&gt;This is paragraph number on this HTML page.&lt;/p&gt;
&lt;p&gt;This is the second paragraph.  It's a bit longer than the first so that if you resize your window at all, you'll be able to see the text wrapping and maintaining the paragraph spacing above and below it.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre></td></tr></table></div>



<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://japh.com.au/html/a-shell-for-your-html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Starting at the beginning</title>
		<link>http://japh.com.au/html/starting-at-the-beginning/</link>
		<comments>http://japh.com.au/html/starting-at-the-beginning/#comments</comments>
		<pubDate>Sat, 22 Sep 2007 13:36:34 +0000</pubDate>
		<dc:creator>Japh</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://www.japheththomson.com/?p=4</guid>
		<description><![CDATA[What better place to start than at the beginning?  Because web development involves quite a lot of jargon, I figure for the first few posts, I&#8217;ll just explain what things are.  That way, once we start to get into it a bit more, you&#8217;ll know what I mean if I use any jargon [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>What better place to start than at the beginning?  Because web development involves quite a lot of jargon, I figure for the first few posts, I&#8217;ll just explain what things are.  That way, once we start to get into it a bit more, you&#8217;ll know what I mean if I use any jargon (I&#8217;ll try not to use too much jargon, and just terminology where appropriate!).</p>
<p>So you&#8217;ve heard that there&#8217;s this stuff called HTML that you use to make web pages&#8230; but what is it, and what does HTML even stand for?<span id="more-4"></span></p>
<p>Well you&#8217;ve probably done a bit of Googling already and found that HTML stands for HyperText Markup Language&#8230; but what does that even mean?</p>
<p>Basically, it&#8217;s text that describes the structure of text (we use Cascading Style Sheets to describe the formatting of text, but we&#8217;ll get to that in another post).</p>
<p>HTML is a collection of &#8220;tags&#8221; that you put around the text you want it to describe.</p>
<p>Each tag generally has an opening tag which looks like:</p>

<div class="wp_codebox"><table><tr id="p413"><td class="code" id="p4code13"><pre class="html" style="font-family:monospace;">&lt;tagname&gt;</pre></td></tr></table></div>

<p>and a closing tag, which looks like:</p>

<div class="wp_codebox"><table><tr id="p414"><td class="code" id="p4code14"><pre class="html" style="font-family:monospace;">&lt;/tagname&gt;</pre></td></tr></table></div>

<p>For example, if you want your text to be in a paragraph, you use the P tag, like this:</p>

<div class="wp_codebox"><table><tr id="p415"><td class="code" id="p4code15"><pre class="html" style="font-family:monospace;">&lt;p&gt;This is the text that will appear on the page in a paragraph.&lt;/p&gt;</pre></td></tr></table></div>

<p>There are some exceptions to this, like the line-break tag and the horizontal rule tag.  These are done like this:</p>

<div class="wp_codebox"><table><tr id="p416"><td class="code" id="p4code16"><pre class="html" style="font-family:monospace;">&lt;br /&gt;
&lt;hr /&gt;</pre></td></tr></table></div>

<p>In my next post, I&#8217;ll show you the basic structure of an HTML page, and you can put some of this into action to see what I mean.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://japh.com.au/html/starting-at-the-beginning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
