<?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>Ruelicke.net &#187; Tutorials</title>
	<atom:link href="http://www.ruelicke.net/category/tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ruelicke.net</link>
	<description>...when coding passion, gaming addiction, Internet surfing syndrome and the real life collide...</description>
	<lastBuildDate>Mon, 05 Apr 2010 17:11:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Xfire &#8211; Gaming Simplified</title>
		<link>http://www.ruelicke.net/2008/06/30/xfire-gaming-simplified/</link>
		<comments>http://www.ruelicke.net/2008/06/30/xfire-gaming-simplified/#comments</comments>
		<pubDate>Mon, 30 Jun 2008 07:00:46 +0000</pubDate>
		<dc:creator>Marco</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Review]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Computer]]></category>
		<category><![CDATA[Xfire]]></category>

		<guid isPermaLink="false">http://www.ruelicke.net/?p=191</guid>
		<description><![CDATA[Every Gamer knows this problem: You play a game and your have your favorite messenger running in the background. Right in a fight you get an incoming message. Depending on your computer, the game and the messenger, you either get killed, the game/computer crashes or something else happens. Also, you may not be able to [...]]]></description>
			<content:encoded><![CDATA[<p><span class="c_letter">E</span>very Gamer knows this problem: You play a game and your have your favorite messenger running in the background. Right in a fight you get an incoming message. Depending on your computer, the game and the messenger, you either get killed, the game/computer crashes or something else happens. Also, you may not be able to &#8220;tab out&#8221; and reply.</p>
<p>Maybe it is the perfect timing to tell you about gaming messenger named <a href="http://www.xfire.com">Xfire</a>.<span id="more-191"></span></p>
<p><a href="http://www.xfire.com" title="Xfire - Gaming Simplified"><img src="http://www.ruelicke.net/wp-content/uploads/2008/06/xfire-logo.jpg" alt="Xfire - Gaming Simplified" title="Xfire - Gaming Simplified" class="centered" /></a></p>
<blockquote><p>Xfire&trade; is a new, free tool that automatically keeps track of when and where gamers are playing PC games online and lets their friends join them easily. It works regardless of game type, server browser, or gaming service that a player is using. Xfire eliminates the hassles of running multiple programs like IRC, instant messengers, or in-game friends lists to keep track of when and where a gamer&#8217;s friends are playing. It supports the best and the latest online PC games including server and non-server-based First Person Shooters, Real Time Strategy, and Role Playing Games.</p></blockquote>
<p>But how good is Xfire really? It is time for a&#8230;</p>
<h3>Review</h3>
<h4>The Look</h4>
<p><strong>First Look</strong> &#8211; it is a free software you can <a href="http://www.xfire.com/downloads/">download</a>. So what do you expect? The website looks great, but it doesn&#8217;t help to evaluate the casing of the software as there is no casing.</p>
<p><strong>Installation</strong> &#8211; using the usual installer. Nothing spectacular, but it allows you to chose the installation path and if you want to create icons for the desktop, start menu and quick launch. It also shows which files it is installing. 4 of 5 points</p>
<p><strong>First Time</strong> &#8211; The look is cool, but of course you either have to create a free account first or you have to log in with your account to actually use the messenger. 5 of 5 points.</p>
<p><strong>Requirements and Look</strong> &#8211; The requirements are low, the look is great. Full points.</p>
<h4>Installation Process</h4>
<p><strong>Time</strong> &#8211; Installation begins with downloading the software: The download is pretty fast if you got broadband. And 10 MB aren&#8217;t that large either. The installation process is also quick, so just give a fast 4 of 5 points.</p>
<p><strong>Complexity</strong> &#8211; The installation is easy, which means I end up with 5 of 5 points.</p>
<h4>Usage and Performance</h4>
<p><strong>Requirements, Look and actual performance</strong> &#8211; Xfire has surprisingly low requirements:</p>
<ul>
<li>PC with a Pentium processor running Windows XP, 2000 or Vista</li>
<li>10 MB available hard drive space recommended</li>
<li>Desktop resolution of 800 x 600 at 256 colors (1024 x 768 at 16 bit color or higher recommended)</li>
<li>Internet Explorer 5.0 with Service Pack 1 or higher</li>
<li>Internet connection (broadband recommended)</li>
</ul>
<p>It runs smooth on my old computer and it runs even smoother on the computer I use to write this article. I&#8217;d give full points, but the fact that you need Internet access and Internet Explorer makes me give 4 of 5 points.</p>
<p><strong>Complexity</strong> &#8211; Xfire is easy to use, but there are some parts you will only use when you running Xfire as your major messenger -> 4 of 5 points.</p>
<p><strong>Learning Curve</strong> &#8211; Using this gaming messenger, you do it by using your intuition. Full points.</p>
<p><strong>Bugs</strong> &#8211; Unfortunately there are a few bugs in the software. Occasionally the file transfer won&#8217;t work, a <a href="http://www.xfire.com/games/">supported game</a> is not recognized or, although very rare, Xfire crashes without a reason. 3 of 5 points.</p>
<h4>Personal Impression</h4>
<p>Xfire is a very, very useful messenger. At least for me. It allows me to keep track of <a href="http://www.xfire.com/profile/wedgeswingman/">my gaming times</a>, play a game and chat with my friends without having to &#8220;tab out&#8221; or getting issues with the messenger running in the background. Unfortunately there are some games which are not supported, but there is hope that they will be supported in the near future. There are many people in the community who <a href="http://www.xfire.com/xf/modules.php?name=Forums&#038;file=viewforum&#038;f=3">suggest new games</a> for support and so far the developers listen to the community. You can even suggest features or, for the more experienced user, <a href="http://wiki.xfire.com/wiki/index.php/GettingStarted">create your own Xfire skin</a> (or you just <a href="http://www.xfire.com/cms/xf_skins/">chose one of the many</a> existing already).</p>
<h3>Summary</h3>
<p>I believe <a href="http://www.xfire.com">Xfire</a> deserves the <strong>4.4 points out of 5 possible points</strong>. It is one of the best messengers for the gamer. There are a few things I had to leave out as those don&#8217;t belong to a review. I&#8217;ll write another article in the near future to talk about some of the more <a href="http://www.xfire.com/faq/#FAQ_category_24">advanced parts of Xfire</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ruelicke.net/2008/06/30/xfire-gaming-simplified/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>C#/C++ &#8211; Hello World!</title>
		<link>http://www.ruelicke.net/2008/01/09/c-sharp-c-plus-plus-hello-world/</link>
		<comments>http://www.ruelicke.net/2008/01/09/c-sharp-c-plus-plus-hello-world/#comments</comments>
		<pubDate>Wed, 09 Jan 2008 07:00:51 +0000</pubDate>
		<dc:creator>Marco</dc:creator>
				<category><![CDATA[C#/C++]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[C Plus Plus]]></category>
		<category><![CDATA[C Sharp]]></category>
		<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://www.ruelicke.net/2008/01/c-sharp-c-plus-plus-hello-world/</guid>
		<description><![CDATA[As I have the fortune to learn C#/C++ at school I thought it is a good idea to share what I learned and what I&#8217;m learning. Additionally it helps me to repeat what I learned and I can make sure that I really understood it. Here we go: Hello World At first we need a [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.ruelicke.net/wp-content/themes/ruelicke/images/icon-c-sharp-c-plus-plus.png" alt="C#/C++" title="C#/C++" class="alignleft" /><span class="c_letter">A</span>s I have the fortune to learn C#/C++ at school I thought it is a good idea to share what I learned and what I&#8217;m learning. Additionally it helps me to repeat what I learned and I can make sure that I really understood it.</p>
<p><span class="c_letter">H</span>ere we go:</p>
<h3>Hello World</h3>
<p><span class="c_letter">A</span>t first we need a program which allows us to write and compile C#/C++ code. We are using the <a href="http://www.codegear.com/products/cppbuilder">Borland C++ Builder</a> but as I&#8217;m a fan of open-source programs I&#8217;m training my knowledge using the <a href="http://www.bloodshed.net/devcpp.html">Bloodshed Dev-C++</a> program unless I&#8217;m forced to use Borland.</p>
<p><span class="c_letter">N</span>ow let&#8217;s have a look at our first program.<span id="more-159"></span></p>
<h3>The Code</h3>
<p><code style="background-color:#FFF;color:#000;display:block;padding-left:0.2em;"><br />
<span style="background-color:#FFF;color:#008000;">#pragma hdrstop</span><br />
<span style="background-color:#FFF;color:#008000;">#include &lt;conio.h&gt;</span><br />
<span style="background-color:#FFF;color:#008000;">#include &lt;iostream.h&gt;</span><br />
<span style="background-color:#FFF;color:#5E81BC;font-style:italic;">//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</span><br />
<span style="background-color:#FFF;color:#008000;">#pragma argsused</span><br />
<span style="font-weight:700;">int</span> main(<span style="font-weight:700;">int</span> argc, <span style="font-weight:700;">char*</span> argv[])<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cout &lt;&lt; <span style="background-color:#FFF;color:#F00;">"Hello world!"</span>;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;getch();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="font-weight:700;">return</span> <span style="background-color:#FFF;color:#800080;">0</span>;<br />
}<br />
&nbsp;<br />
</code><br />
<span class="c_letter">C</span>opy and paste the code into your C++ program, compile and execute it. A console window should open displaying &#8220;Hello world!&#8221;. Press any key to close the window again.</p>
<p><span class="c_letter">N</span>ow as your program is working, let&#8217;s have a look at the code itself.</p>
<h3>Detailed Explanation</h3>
<p><code style="background-color:#FFF;color:#000;display:block;padding-left:0.2em;"><span style="background-color:#FFF;color:#008000;">#pragma hdrstop</span><br />
[...]<br />
<span style="background-color:#FFF;color:#008000;">#pragma argsused</span><br />
</code><br />
These two lines hide possible error warnings in Borland. The program will even work if you leave them out.</p>
<p><code style="background-color:#FFF;color:#000;display:block;padding-left:0.2em;"><span style="background-color:#FFF;color:#008000;">#include &lt;conio.h&gt;</span><br />
<span style="background-color:#FFF;color:#008000;">#include &lt;iostream.h&gt;</span><br />
</code><br />
<strong>&#8220;conio.h&#8221;</strong> is a library required to create a program which runs in a console window. This &#8220;abbreviation&#8221; means <strong>CON</strong>sole<strong>I</strong>nput<strong>O</strong>utput.</p>
<p><strong>&#8220;iostream.h&#8221;</strong> is a library required to allow the program to output streamed content, also it allows streamed input. This &#8220;abbreviation&#8221; means <strong>I</strong>nput<strong>O</strong>utput<strong>STREAM</strong>.</p>
<p><code style="background-color:#FFF;color:#000;display:block;padding-left:0.2em;"><span style="background-color:#FFF;color:#5E81BC;font-style:italic;">//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</span><br />
</code><br />
The <strong>&#8220;//&#8221;</strong> allows you to add a single line comment to the code. We use the line &#8220;- &#8211; - -&#8221; to separate the includes from the actual code.</p>
<p><code style="background-color:#FFF;color:#000;display:block;padding-left:0.2em;"><span style="font-weight:700;">int</span> main(<span style="font-weight:700;">int</span> argc, <span style="font-weight:700;">char*</span> argv[])<br />
{<br />
[...]<br />
}<br />
</code><br />
This function is the main function. Inside it you have every code you need to run the program. Later you will learn to create your own functions, so I stop here only stating that this function is always the last one of the whole program. Meaning: It has to stay at the bottom of the whole code.</p>
<p>As <a href="http://www.slevi.net">Slevi</a> outlined in his comment, the &#8220;<span style="font-weight:700;">int</span> argc, <span style="font-weight:700;">char*</span> argv[])&#8221; is used to receive the arguments in case you start the exe via console e.g. &#8220;example.exe foo bar&#8221;. As this is already advanced coding I skip a more detailed description. I&#8217;ll come back to it in a later tutorial.</p>
<p><code style="background-color:#FFF;color:#000;display:block;padding-left:0.2em;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cout &lt;&lt; <span style="background-color:#FFF;color:#F00;">"Hello world!"</span>;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;getch();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="font-weight:700;">return</span> <span style="background-color:#FFF;color:#800080;">0</span>;<br />
</code><br />
Now we look at the actual code which allows us to display &#8220;Hello world!&#8221; in the console.</p>
<p><strong>&#8220;cout&#8221;</strong> allows you to output any kind of data. In this case it is &#8220;Hello world!&#8221;, later you will also learn about other types of data..</p>
<p><strong>&#8220;&lt;&lt;&#8221;</strong> is a shift operator which moves the output to the console screen. You could say said &#8220;cout&#8221; is the screen and &#8220;Hello world!&#8221; is moved to the screen by the &#8220;&lt;&lt;&#8221;.</p>
<p><strong>&#8220;Hello world!&#8221;</strong> is a so-called string which is displayed in the console. That&#8217;s why it is required to wrap it with the quotation marks.</p>
<p><strong>&#8220;getch()&#8221;</strong> is a function which waits for any kind of user input, basically it waits that the user is pressing any key to continue. We use it here to prevent the console from closing again right after displaying our &#8220;Hello world&#8221;. For the record, this is a solution I was looking for when I tried to learn C++ on my on a couple of years ago. All other tutorials on the Internet did not have this function in the code, leading to an instantly closed console window. Hopefully this tutorial will help other beginners to avoid my problem back then.</p>
<p><strong>&#8220;return 0&#8243;</strong> informs the program that the code has been processed and the console window can be closed, after the mentioned user input. It is not possible to avoid using &#8220;getch()&#8221; and use &#8220;return 1&#8243; instead, as this one will also exit the program.</p>
<h3>Wrap Up</h3>
<p><span>N</span>ow we are finished and got our first program working, if you encounter any kind of problem, leave me a message and I&#8217;ll try to help you.</p>
<p>P.S. Feel free to play around and try different messages just for the fun of it. <img src='http://www.ruelicke.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><ins datetime="2008-01-12T20:55:29+00:00">Update:</ins><br />
<span class="c_letter">I</span> just had to add this note about <strong>getch()</strong>:<br />
The getch() function is a C function, but since I&#8217;m writing a C#/C++ tutorial it would be more appropriate to use <strong>cin.get()</strong> instead. It does the same but is the C++ variant of the command. Either method should work and I will get back to cin.get() in one of my next tutorials to make sure that any questions about cin.get() get answered.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ruelicke.net/2008/01/09/c-sharp-c-plus-plus-hello-world/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>CSS &#8211; Make your list different</title>
		<link>http://www.ruelicke.net/2007/09/12/css-make-your-list-different/</link>
		<comments>http://www.ruelicke.net/2007/09/12/css-make-your-list-different/#comments</comments>
		<pubDate>Wed, 12 Sep 2007 19:49:22 +0000</pubDate>
		<dc:creator>Marco</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://www.ruelicke.net/2007/09/css-make-your-list-different/</guid>
		<description><![CDATA[If you have a look at my sidebar, you see that my menu options have little dots (or images) to the left. Thanks to CSS, Cascading Style Sheets, you have many options to style your list, ranging from no style to one of the many default styles. You are even able to use an image [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.ruelicke.net/wp-content/themes/ruelicke/images/icon-css.png" alt="CSS - Cascading Style Sheets" title="CSS - Cascading Style Sheets" class="alignleft" /><span class="c_letter">I</span>f you have a look at my sidebar, you see that my menu options have little dots (or images) to the left. Thanks to CSS, Cascading Style Sheets, you have many <a href="http://www.w3schools.com/css/css_reference.asp#list">options to style your list</a>, ranging from no style to one of the many default styles. You are even able to use an image of your choice!</p>
<p><strong><span class="c_letter">S</span>o how do you edit and style your list?</strong></p>
<p><span class="c_letter">O</span>f course you are able to use almost any of the available CSS properties, like <a href="http://www.w3schools.com/css/css_reference.asp#border">borders</a>, <a href="http://www.w3schools.com/css/css_reference.asp#background">background</a>, <a href="http://www.w3schools.com/css/css_reference.asp#font">font</a> and so on.</p>
<h3>A list without icons</h3>
<p><span class="c_letter">L</span>et&#8217;s assume you want to use the list to create a menu, but you don&#8217;t want to have the default list icons added by the browser, because it would break with the design. How do you remove the icons? With a tiny bit of CSS of course:<br />
<code><br />
ul, ol {<br />
list-style:none;<br />
}<br />
</code><br />
This code will remove any list style, leaving you a <a href="http://www.ruelicke.net/example/css/tutorial01.html#list-2">list without the list icons</a>. It works for both types of lists, order and unordered. If you prefer using in-line editing, just add a <code>style="list-style:none;"</code> to the &#8220;ul&#8221; or &#8220;ol&#8221; tag and you are set.<span id="more-127"></span></p>
<h3>A list with one of the default icons</h3>
<p><span class="c_letter">N</span>ow let&#8217;s have a look at how we can use one of the many default icons. Please keep in mind that some of those icons are show different in different browsers. I recommend testing them before you use them.</p>
<p><span class="c_letter">B</span>efore we can set an icon, we need to know which icons exist. I took the time and compiled you a list:</p>
<ul>
<li>disc</li>
<li>circle</li>
<li>square</li>
<li>decimal</li>
<li>decimal-leading-zero</li>
<li>lower-roman</li>
<li>upper-roman</li>
<li>lower-alpha</li>
<li>upper-alpha</li>
<li>lower-greek</li>
<li>lower-latin</li>
<li>upper-latin</li>
<li>hebrew</li>
<li>armenian</li>
<li>georgian</li>
<li>cjk-ideographic</li>
<li>hiragana</li>
<li>katakana</li>
<li>hiragana-iroha</li>
<li>katakana-iroha</li>
</ul>
<p><span class="c_letter">A</span>nd before you start yelling at me &#8220;How does those icons look like&#8221; just <a href="http://www.ruelicke.net/example/css/tutorial01.html#list-2">have a look at my example</a> and try them all.</p>
<p><span class="c_letter">T</span>o add one of the icons you can use this code:<br />
<code><br />
ul, ol {<br />
list-style-type:<em>liststyle</em>;<br />
}</code></p>
<p>Replace the <em>liststyle</em> with the name of the icon you want to use. Of course you can also use the in-line style <code>style="list-style-type:<em>liststyle</em>"</code>.</p>
<p><span style="c_letter;">E</span>asy so far, isn&#8217;t it?</p>
<h3>A list with an icon/image of your choice</h3>
<p><span class="c_letter">N</span>ow let&#8217;s go a step further. I believe you can imagine that the default icons limit you in your design efforts. Fortunately CSS enables you to use an own image by using the code:<br />
<code><br />
list-style-image:url(<em>path-to-image</em>);<br />
</code><br />
<span class="c_letter">R</span>eplace the <em>path-to-image</em> with the url to your image. For the image I use in <a href="http://www.ruelicke.net/example/css/tutorial01.html#list-3">my example</a> the path would be:<br />
<em>http://www.ruelicke.net/wp-content/themes/ruelicke/images/feed-icon.png</em></p>
<p><span class="c_letter">Y</span>ou can use any kind of image, but depending on it&#8217;s size you need to play with the padding and font size to make it fit with the list.</p>
<h3>Wrap up</h3>
<p><span class="c_letter">C</span>ongratulation, you are now able to adjust the list style icon to your needs. You no longer need to use <a href="http://www.ruelicke.net/example/css/tutorial01.html#list-1">the default</a> icon.</p>
<p><span class="c_letter">I</span>f you like it fancy, you could <a href="http://www.ruelicke.net/example/css/tutorial01.html#list-5">style the list as I did</a> although I would never use that design. Of course I would never use that one on a site, but I think it is always good to play around with the CSS to get an idea about how it works.</p>
<p><strong>Any questions left?</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ruelicke.net/2007/09/12/css-make-your-list-different/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>JavaScript &#8211; Playing with a Form</title>
		<link>http://www.ruelicke.net/2007/09/09/javascript-playing-with-a-form/</link>
		<comments>http://www.ruelicke.net/2007/09/09/javascript-playing-with-a-form/#comments</comments>
		<pubDate>Sun, 09 Sep 2007 17:26:24 +0000</pubDate>
		<dc:creator>Marco</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://www.ruelicke.net/2007/09/javascript-playing-with-a-form/</guid>
		<description><![CDATA[I assume you already saw one of those forms which show something like &#8220;Enter query&#8221; in one of the input fields and as soon as you enter a letter or press a key on the keyboard, the &#8220;Enter query&#8221; vanishes. As I needed such a feature for a project of mine, I decided to write [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.ruelicke.net/wp-content/themes/ruelicke/images/icon-js.png" alt="JS - JavaScript" title="JS - JavaScript" class="alignleft" /><span class="c_letter">I</span> assume you already saw one of those forms which show something like &#8220;Enter query&#8221; in one of the input fields and as soon as you enter a letter or press a key on the keyboard, the &#8220;Enter query&#8221; vanishes.</p>
<p><span class="c_letter">A</span>s I needed such a feature for a project of mine, I decided to write this tutorial to share a couple of techniques you can use for such an interesting form.</p>
<h3><a href="http://www.ruelicke.net/example/javascript/tutorial02.html#form-1">Form #1</a></h3>
<p><span class="c_letter">T</span>he first form has the mentioned feature that removes the text in the input field as soon as you hit a key:<span id="more-123"></span><br />
<code style="text-align:left;">&lt;script type="text/javascript"&gt;<br />
&lt;!--<br />
function clear_input($input)<br />
{<br />
if (document.getElementById($input).value == "Name" || document.getElementById($input).value == "Password")<br />
{<br />
document.getElementById($input).value = '';<br />
};<br />
}<br />
window.onload = document.getElementById("name-1").value="Name";<br />
window.onload = document.getElementById("password-1").value="Password";<br />
//--&gt;<br />
&lt;/script&gt;</code></p>
<p><span class="c_letter">P</span>ut this code at the bottom of the page, <em>replace the getElementByID values and IDs with the ones you are using</em>, then add the event <code style="text-align:left;">onkeypress=""</code> to the input box you want to have using this feature. Inside the <code style="text-align:left;">onkeypress=""</code> you add <code>clear_input('id of the input field');return true;</code>.<br />
For <a href="http://www.ruelicke.net/example/javascript/tutorial02.html#form-1">my example</a> it would be for the &#8220;name&#8221; input field: <code>onkeypress=" clear_input('name-1'); return true;"</code></p>
<p><span class="c_letter">T</span>he &#8220;return true&#8221; is a bug fix for some browsers which won&#8217;t clear the input field as we want it.</p>
<h3><a href="http://www.ruelicke.net/example/javascript/tutorial02.html#form-2">Form #2</a></h3>
<p><span class="c_letter">T</span>his form will check the input data before it submits it:<br />
<code style="text-align:left;">&lt;script type="text/javascript"&gt;<br />
&lt;!--<br />
function check_input()<br />
{<br />
if (document.getElementById("name-2").value != "Name" &#038;&#038; document.getElementById("name-2").value != "" &#038;&#038; document.getElementById("password-2").value != "Password" &#038;&#038; document.getElementById("password-2").value != "")<br />
{<br />
return true;<br />
}<br />
else<br />
{<br />
return false;<br />
}<br />
}<br />
function clear_input($input)<br />
{<br />
if (document.getElementById($input).value == "Name" || document.getElementById($input).value == "Password")<br />
{<br />
document.getElementById($input).value = '';<br />
};<br />
}<br />
window.onload = document.getElementById("name-2").value="Name";<br />
window.onload = document.getElementById("password-2").value="Password";<br />
//--&gt;<br />
&lt;/script&gt;</code></p>
<p><span class="c_letter">A</span>s you see I&#8217;m using the <code>clear_input()</code> function again and added a <code>check_input</code> function. Add <code>onsubmit="return check_input;"</code> to the opening form tag and make sure you are using the right IDs in your script.</p>
<p><span class="c_letter">I</span>f everything is working, your <a href="http://www.ruelicke.net/example/javascript/tutorial02.html#form-2">form should behave like mine</a>.</p>
<h3>Wrap Up</h3>
<p><span class="c_letter">I</span> hope this tutorial gave you an idea or two on how to improve your form a little bit. An idea which just pops up right now is to combine the <code>clear_input</code> method with Ajax to provide search suggestions, if it is a search form. Or you add a check_mail variant which validate an inserted email on the fly.</p>
<p><span class="c_letter">T</span>here are many options. Do you know a special one and have no idea how to achieve it? Or do you want to share an idea or script? I&#8217;m happy about any kind comment!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ruelicke.net/2007/09/09/javascript-playing-with-a-form/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS &#8211; First letter of a paragraph larger than the others</title>
		<link>http://www.ruelicke.net/2007/09/06/css-first-letter-of-a-paragraph-larger-than-the-others/</link>
		<comments>http://www.ruelicke.net/2007/09/06/css-first-letter-of-a-paragraph-larger-than-the-others/#comments</comments>
		<pubDate>Thu, 06 Sep 2007 21:12:58 +0000</pubDate>
		<dc:creator>Marco</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://www.ruelicke.net/2007/09/css-first-letter-of-a-paragraph-larger-than-the-others/</guid>
		<description><![CDATA[Pro Blog Design had an article about formating blog posts for readability the other day. As we discussed further methods of styling your blog articles, we started talking about &#8220;the concept of making the first letter of a paragraph larger than the others&#8220;. I then decided to give this technique a try on my blog [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.ruelicke.net/wp-content/themes/ruelicke/images/icon-css.png" alt="CSS - Cascading Style Sheets" title="CSS - Cascading Style Sheets" class="alignleft" /><a href="http://www.problogdesign.com"><span class="c_letter">P</span>ro Blog Design</a> had an article about <a href="http://www.problogdesign.com/blog-usability/format-your-posts-for-readability/">formating blog posts for readability</a> the other day. As we discussed further methods of styling your blog articles, we started talking about &#8220;<cite>the concept of making the first letter of a paragraph larger than the others</cite>&#8220;.</p>
<p><span class="c_letter">I</span> then decided to give this technique a try on my blog and we continued talking about it, which helped me to tweak my CSS code to make this &#8220;magic&#8221; happen. The code for this &#8220;magic trick&#8221; was posted as comment, but I think it is better to put it into an extra tutorial article although it is nothing special if you know how to use Cascading Style Sheets.</p>
<p><span class="c_letter">T</span>here are <strong>two methods</strong> to achieve the goal, I will tell you how to do it and mention the advantages and disadvantages.<span id="more-119"></span></p>
<h3>First method</h3>
<p><code>div.entry p:first-letter {<br />
font-size:1.5em;<br />
font-weight:700;<br />
text-transform:capitalize;<br />
}</code></p>
<p><span class="c_letter">T</span>his one will auto-add the &#8220;first letter of a paragraph larger than the others&#8221; effect, which saves you a lot of time. Unfortunately you are not able to not use it in an article. <strong>The effect will be always created.</strong> If you only write articles and it works for your design and style of writing, great! <img src='http://www.ruelicke.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><span class="c_letter">I</span>n my case I have a problem when I post a story like my <a href="http://www.ruelicke.net/2007/08/star-wars-soldiers-vs-jedi/">Soldiers vs. Jedi</a>. So I had to look for an alternate way.</p>
<h3>Second method</h3>
<p><code>div.entry p span.c_letter {<br />
font-size:1.5em;<br />
font-weight:700;<br />
text-transform:uppercase;<br />
}</code></p>
<p><span class="c_letter">H</span>ow do you enable the effect now?<br />
You just have to wrap a <code>&lt;span class=”c_letter”&gt;</code> around the letter you want to capitalize and you get that effect. This will only work if the span is inside a paragraph:</p>
<p>e.g.:<br />
<code style="text-align:left;">&lt;p&gt;&lt;span class="c_letter"&gt;T&lt;/span&gt;he first letter is huge[…]&lt;/p&gt;</code></p>
<p><span class="c_letter">T</span>his method allows you to decide if you want to have a capital letter or not. However, it requires you to spend some time on wrapping the code around the letter.</p>
<p><span class="c_letter">S</span>o you need to see which method works best for you.</p>
<p><em><strong>#1 Note:</strong> The first method will also edit your older blog posts, so if you don&#8217;t want to &#8220;auto-edit&#8221; them, you should use the second method.</em></p>
<p><em><strong>#2 Note:</strong> Maybe you noticed the <code>text-transform:uppercase;</code> piece in the second method. It means that even a non-capital character will be shown as capital character. I added in case you could use it for <span class="c_letter">highlighting</span> a word without actually writing it in capitals. You may remove it if you don&#8217;t want it</em> <img src='http://www.ruelicke.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><span class="c_letter">I</span> hope this tutorial was helpful for you. If you have any questions or need help with this, feel free to leave a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ruelicke.net/2007/09/06/css-first-letter-of-a-paragraph-larger-than-the-others/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>JavaScript &#8211; Hello World</title>
		<link>http://www.ruelicke.net/2007/09/03/javascript-hello-world/</link>
		<comments>http://www.ruelicke.net/2007/09/03/javascript-hello-world/#comments</comments>
		<pubDate>Mon, 03 Sep 2007 10:00:11 +0000</pubDate>
		<dc:creator>Marco</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://www.ruelicke.net/2007/09/javascript-hello-world/</guid>
		<description><![CDATA[Unlike my PHP and HTML tutorials this tutorial will be different. Although I know JavaScript I don&#8217;t use it often because of a few reasons. So I&#8217;m using this &#8220;tutorial&#8221; to 1. refresh my knowledge about JavaScript and 2. teach you the one or the other useful thing. Let&#8217;s begin For this &#8220;tutorial&#8221; you should [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.ruelicke.net/wp-content/themes/ruelicke/images/icon-js.png" alt="JS - JavaScript" title="JS - JavaScript" class="alignleft" /><span class="c_letter">U</span>nlike my <a href="http://www.ruelicke.net/category/tutorial/php/">PHP</a> and <a href="http://www.ruelicke.net/category/tutorial/html/">HTML</a> tutorials this tutorial will be different.</p>
<p><span class="c_letter">A</span>lthough I know JavaScript I don&#8217;t use it often because of a few reasons. So I&#8217;m using this &#8220;tutorial&#8221; to<br />
<strong>1. refresh my knowledge about JavaScript</strong><br />
and<br />
<strong>2. teach you the one or the other useful thing.</strong></p>
<h3>Let&#8217;s begin</h3>
<p><span class="c_letter">F</span>or this &#8220;tutorial&#8221; you should have some basic understanding about <a href="http://www.ruelicke.net/category/tutorial/html/">HTML</a> and CSS, later it could be useful to know <a href="http://www.ruelicke.net/category/tutorial/php/">PHP</a>, but that&#8217;s some time later&#8230;<span id="more-116"></span></p>
<p><strong><span class="c_letter">T</span>o use JavaScript in an HTML document</strong> you have 2 methods:</p>
<ul>
<li>Using an external JavaScript file.</li>
<li>Having the JavaScript code right on the page.</li>
</ul>
<p><span class="c_letter">W</span>hich method you use is up to you but at the end you need to use more or less same technique to include the JavaScript in the HTML page.<br />
To embed a JavaScript you are using:<br />
<code style="text-align:left;"><br />
&lt;script type="text/javascript"  src="path/to/file"&gt;&lt;/script&gt;<br />
</code><br />
<strong><span class="c_letter">T</span>he above example is used when you have an external javascript file.</strong> Otherwise you will be using this code:<br />
<code style="text-align:left;"><br />
&lt;script type="text/javascript"&gt;<br />
&lt;!--<br />
<em>...javascript code...</em><br />
//--&gt;<br />
&lt;/script&gt;<br />
</code></p>
<p><span class="c_letter">Y</span>ou place this HTML code either in the &lt;head&gt; or &lt;body&gt; part of the page, then you are ready to write your first Javascript script.</p>
<h3>Hello World!</h3>
<p><span class="c_letter">W</span>e want to write our first script and we want to execute it as soon as the page is loaded. The JavaScript event handler we need for this is onload() although we could also do it in a different way.</p>
<p><span class="c_letter">O</span>ur &#8220;hello world&#8221; script will bring up an alert box with the message &#8220;Hello world!&#8221;:<br />
<code style="text-align:left;">&lt;script type="text/javascript"&gt;<br />
&lt;!--<br />
function hello_world()<br />
{<br />
alert("Hello world!");<br />
}<br />
//--&gt;<br />
&lt;/script&gt;<br />
</code><br />
<em>Note: If you are using an external file, just take the javascript inside the html comments and put it into the external file.</em></p>
<p><span class="c_letter">W</span>e got our first function and now we need to call it somehow. As I said already, we will be using the onload() handler.<br />
To make sure that the code works as intended, you have to put the code in the &lt;head&gt; part of your HTML page.<br />
Now add <code>onload="hello_world();"</code> in the opening body tag. Save the page and load it in a browser.<br />
To have a comparison, <a href="javascript:alert('Hello%20world!');">try my &#8220;Hello world&#8221; alert</a>.</p>
<p><strong><span class="c_letter">T</span>he <code>onload()</code> handler is useful, but is often abused.</strong> I recommend you only use it when you have to. Same applies for the <code>alert()</code> message.</p>
<h3>Better &#8220;Hello World!&#8221;</h3>
<p><span class="c_letter">D</span>epending on the amount of your JavaScript code, the page needs longer to load. If you put the code into the head, it will take some time before the visitors see any content of your page. <strong>It is recommended to put the JavaScript into the foot part of the body.</strong><br />
<span class="c_letter">I</span>f you try it, you will see that <code>onload()</code> will not work, so we have to use a different approach:<br />
<code style="text-align:left;">&lt;script type="text/javascript"&gt;<br />
&lt;!--<br />
function hello_world()<br />
{<br />
alert("Hello world!");<br />
}<br />
window.onload = hello_world();<br />
//--&gt;<br />
&lt;/script&gt;<br />
</code><br />
<span class="c_letter">N</span>ow the script will be <strong>executed after everything on the page is loaded</strong>.</p>
<h3>Wrap up and some hints</h3>
<p><span class="c_letter">T</span>his is all I want to teach you for now. Have a look at <a href="http://www.w3schools.com/js/default.asp">w3school&#8217;s JavaScript Tutorial</a> if you can&#8217;t wait to go on with learning JavaScript. Before you visit this page, please <strong>listen to my hints as these are based on my knowledge of coding nice, user-friendly websites</strong>:</p>
<ul>
<li>Never ever use JavaScript to open PopUps <strong><em>without</em></strong> informing the user before.</li>
<li>Only use JavaScript if it increases the experience of the website.</li>
<li>Try to <strong>avoid excessive use of JavaScript</strong> just because you can do that.
<li>Don&#8217;t use JavaScript to &#8220;link&#8221; to another page. It can break the browser history and result in a bad experience of the user.</li>
<li>Never ever use JavaScript to resize the browser window of the user</li>
<li>When using JavaScript, make sure that those who disabled JavaScript won&#8217;t miss parts of the website someone with JavaScript enabled would be able to see.</li>
</ul>
<p><span class="c_letter">I</span> know, if you read this list you will most likely not know how to create the mentioned effects. I suggest you keep this list in mind when I continue with my tutorial because then I will show you some of those things you shouldn&#8217;t do just for the purpose of showing it.</p>
<p><span class="c_letter">I</span> hope you enjoyed this introduction to my JavaScript tutorials. If you want to be informed on the publish of new tutorials, <a href="http://www.ruelicke.net/what-the-heck-is-rss/"><strong>subscribe to my RSS Feed</strong></a> or <a href="http://www.ruelicke.net/mail-subscription/"><strong>sign up for the newsletter</strong></a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ruelicke.net/2007/09/03/javascript-hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML Tutorial 103: Design with tables and CSS</title>
		<link>http://www.ruelicke.net/2007/07/31/html-tutorial-103-design-tables-css/</link>
		<comments>http://www.ruelicke.net/2007/07/31/html-tutorial-103-design-tables-css/#comments</comments>
		<pubDate>Mon, 30 Jul 2007 22:27:00 +0000</pubDate>
		<dc:creator>Marco</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://blog.ruelicke.net/2007/07/31/html-tutorial-103-design-tables-css/</guid>
		<description><![CDATA[You know how to write a valid XHTML document, however, the page is still not as nice looking as ruelicke.net or google.com or any other website out there. What I teach you today is not how to create a professional website, but it is the basic design method any web programmer started with. It is [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.ruelicke.net/wp-content/themes/ruelicke/images/icon-html.png" alt="HTML - HyperText Markup Language" title="HTML - HyperText Markup Language" class="alignleft" />You know <a href="http://www.ruelicke.net/2007/04/html-tutorial-102-tags-validation/">how to write a valid XHTML document</a>, however, the page is still not as nice looking as <a href="http://www.ruelicke.net">ruelicke.net</a> or <a href="http://www.google.com">google.com</a> or any other website out there.</p>
<p>What I teach you today is not how to create a professional website, but it is the basic design method any web programmer started with.<br />
It is the old school table, but I add Cascading Style Sheets (CSS) to the table to get it a nice look.</p>
<p>But before you can start, you need to have an idea how you want to structure your page. The best thing to do is to grab a piece of paper and make a draft. As example I made a draft in a graphic program, although I prefer the paper method:<br />
<a href="http://www.ruelicke.net/2007/07/html-tutorial-103-design-tables-css/draft-for-page/" rel="attachment wp-att-59" title="Draft for a page"><img src="http://www.ruelicke.net/wp-content/uploads/html103_img01.thumbnail.png" alt="Draft for a page" /></a></p>
<p><span id="more-58"></span></p>
<p>Now let&#8217;s think about how to convert the design into HTML&#8230;<br />
You remember reading in the W3Schools reference something about &lt;table&gt;? If not, it is no problem as I explain it now <img src='http://www.ruelicke.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>But first let&#8217;s get the basic page code done, which is:<br />
<code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;<br />
&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;Hello world!&lt;/title&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;</code></p>
<p><code>&lt;/body&gt;<br />
&lt;/html&gt;</code></p>
<p>Now let&#8217;s see how we add the basic structure of the original design by using</p>
<h3>Tables</h3>
<p>To create a HTML table you need the &lt;table&gt;, &lt;tr&gt; and &lt;td&gt; tag. I will post the code I used for the table of my final example page and then I explain you the additional attributes used to modify the table:</p>
<p><code>&lt;table&gt;<br />
         &lt;tr&gt;<br />
            &lt;td colspan="2"&gt;<br />
               Hello World!<br />
            &lt;/td&gt;<br />
         &lt;/tr&gt;<br />
         &lt;tr&gt;<br />
            &lt;td&gt;<br />
               menu<br />
            &lt;/td&gt;<br />
            &lt;td&gt;<br />
               text<br />
            &lt;/td&gt;<br />
            &lt;td rowspan="2"$gt;<br />
            	 whatever<br />
            &lt;/td&gt;<br />
         &lt;/tr&gt;<br />
         &lt;tr&gt;<br />
            &lt;td colspan="2"&gt;<br />
               foot<br />
            &lt;/td&gt;<br />
         &lt;/tr&gt;<br />
      &lt;/table&gt;</code></p>
<p>Put the whole table code inside the body tags and have a look it it. I know it isn&#8217;t looking nice, but we will take care of it later.<br />
So what does the code do&#8230;<br />
<strong>the &lt;table&gt; tag</strong> defines a new table,<br />
<strong>the &lt;tr&gt; tag</strong> defines a new row in the table. If you count our &#8220;&lt;tr&gt;&#8230;&lt;/tr&gt;&#8221; you will count 3 rows,<br />
<strong>the &lt;td&gt; tag</strong> defines a new cell/column in a row. Our first row has one cell/column, the second has 3 cells/columns and the third has one cell/column again.</p>
<p>Please keep the following &#8220;method&#8221; in mind when you build a table. It served me good back when I used tables for layouts:<br />
1. define the table: &lt;table&gt;&lt;/table&gt;<br />
2. count how many rows you need and add them inside the &lt;table&gt; tags: &lt;tr&gt;&lt;/tr&gt;&lt;tr&gt;&lt;/tr&gt;&#8230;<br />
3. have a look at the first row and count how many cells/columns you need. Then insert the amount of cells you need by adding the appropriate code into the &lt;tr&gt;&lt;/tr&gt; tags: &lt;td&gt;&#8230;&lt;/td&gt;&lt;td&gt;&#8230;&lt;/td&gt;</p>
<p>If you used the above method you will see that our table doesn&#8217;t work as intended if we use my draft. So here we are using those attributes I have in my sample code already:<br />
<strong>rowspan</strong> tells the browser if a cell is stretched over multiple rows. In my example the third cell of the second row stretches over 3 rows, so we are using rowspan=&#8221;3&#8243;<br />
<strong>colspan</strong> tells the browser if a cell is stretched over multiple cells/columns. The cells of the first and the third row in our example are stretched over 2 cells/columns, meaning that the cells of the first and third row are as long as the 2 cells of the second row. We use colspan=&#8221;2&#8243; here to achieve the proper behavior.<br />
I assume it is difficult to visualize, so let me try to explain it in a different way:<br />
<strong>rowspan</strong> stretches a cell vertical while the <strong>colspan</strong> stretches a cell horizontal.</p>
<p>Now as our table is behaving the way we want it to, it is time to add some optical</p>
<h3>design with <abbr title="Cascading Style Sheets">CSS</abbr></h3>
<p>For a <a href="http://www.w3schools.com/css/css_reference.asp">full list of <abbr title="Cascading Style Sheets">CSS</abbr> properties</a> <a href="http://www.w3schools.com">visit the w3schools website</a></p>
<p>Let me show you the code of the final result of my example, using what we have learned and updated with the <abbr title="Cascading Style Sheets">CSS</abbr> I want to teach you:</p>
<p><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;<br />
&lt;html&gt;<br />
   &lt;head&gt;<br />
      &lt;title&gt;<br />
         Hello World<br />
      &lt;/title&gt;<br />
   &lt;/head&gt;</p>
<p>   &lt;body style="background:#333333;color:#FFFFFF;"&gt;</p>
<p>      &lt;table  style="background:#222222;border:1px solid #555555;width:100%;"&gt;<br />
         &lt;tr&gt;<br />
            &lt;td style="background:#999999;border:1px solid #555555;font-size:50px;font-weight:700;width:auto" colspan="2"&gt;<br />
               Hello World!<br />
            &lt;/td&gt;<br />
         &lt;/tr&gt;<br />
         &lt;tr&gt;<br />
            &lt;td style="background:#990000;border:1px solid #555555;font-size:12px;font-weight:700;text-align:right;vertical-align:top;width:180px;"&gt;<br />
               &lt;a href="http://www.ruelicke.net/2007/04/html-tutorial-101-basics/" style="color:#00FFFF;"&gt;HTML Tutorial 101:&lt;br /&gt;Basics&lt;/a&gt;<br />
               &lt;br /&gt;&lt;br /&gt;<br />
               &lt;a href="http://www.ruelicke.net/2007/04/html-tutorial-102-tags-validation/" style="color:#FFFF00;text-decoration:overline;"&gt;HTML Tutorial 102:&lt;br /&gt;Tags and Validation&lt;/a&gt;<br />
               &lt;br /&gt;&lt;br /&gt;<br />
               &lt;a href="#"&gt;HTML 103&lt;/a&gt;<br />
               &lt;br /&gt;<br />
            &lt;/td&gt;<br />
            &lt;td style="background:#009900;border:1px solid #555555;text-align:left;vertical-align:top;width:auto;"&gt;<br />
               This is my first website.<br />
               &lt;br /&gt;<br />
               This is my first website.<br />
               &lt;br /&gt;<br />
               This is my first website.<br />
               &lt;br /&gt;<br />
               This is my first website.<br />
               &lt;br /&gt;<br />
               This is my first website.<br />
               &lt;br /&gt;<br />
               This is my first website.<br />
               &lt;br /&gt;<br />
               This is my first website.<br />
               &lt;br /&gt;<br />
               This is my first website.<br />
               &lt;br /&gt;<br />
               This is my first website.<br />
               &lt;br /&gt;<br />
               This is my first website.<br />
               &lt;br /&gt;<br />
               This is my first website.<br />
               &lt;br /&gt;<br />
               This is my first website.<br />
               &lt;br /&gt;<br />
               This is my first website.<br />
               &lt;br /&gt;<br />
               This is my first website.<br />
               &lt;br /&gt;<br />
               This is my first website.<br />
               &lt;br /&gt;<br />
               This is my first website.<br />
               &lt;br /&gt;<br />
               This is my first website.<br />
               &lt;br /&gt;<br />
               This is my first website.<br />
            &lt;/td&gt;<br />
            &lt;td rowspan="2" style="width:50px;"&gt;<br />
            	 right tab, covering all 3 rows<br />
            &lt;/td&gt;<br />
         &lt;/tr&gt;<br />
         &lt;tr&gt;<br />
            &lt;td style="background:#999999;border:1px solid #555555;font-size:6px;font-weight:700;text-align:center;width:auto" colspan="2"&gt;<br />
               Goodbye World!<br />
            &lt;/td&gt;<br />
         &lt;/tr&gt;</p>
<p>      &lt;/table&gt;</p>
<p>   &lt;/body&gt;<br />
&lt;/html&gt;<br />
</code></p>
<p>I know the code is a mess on here, so I recommend you copy and paste it into a text editor to have a proper look at it <img src='http://www.ruelicke.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Let&#8217;s start with the body tag. You see the attribute &#8220;style&#8221; which tells the browser that inside this attribute you are using <abbr title="Cascading Style Sheets">CSS</abbr> to modify how the page is displayed.</p>
<p><strong>background</strong> let you change the background color of the overall website. You need to use <a href="http://html-color-codes.com/">hexadecimal colors</a> although there are also named colors, like yellow or black. I recommend you <a href="http://www.google.com/search?hl=en&#038;q=hexadecimal+color">use Google to find more informations about hexadecimal colors.</a><br />
<strong>color</strong> let you change the font color of the overall website. The same as for the background color applies.</p>
<p>I also added the style attribute to the table tag as I wanted to change the style of the table. I also wanted to make the table stretch over the whole width of the browser window.</p>
<p><strong>border</strong> let you create a border around the table. I decided to use a solid 1px width border and gave it a grey color. There are some more border styles, so <a href="http://www.w3schools.com/css/css_reference.asp#border">visit the CSS reference</a> <img src='http://www.ruelicke.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
<strong>width</strong> let you define how broad the table is. In my case I used 100% which means that the table fills the whole browser window. Alternately you can use pixel to give a fixed size, like 800px or what you like.</p>
<p>To manipulate the style inside or of a cell itself, you again add the style attribute. Basically you can add the style attribute to any tag, except the closing tag of a tag of course.<br />
So, what did I do to my cells:</p>
<p>the cell of the first row got a<br />
<strong>font-size</strong> of 50px, which means that the size of the displayed font is 50px.<br />
The <strong>font-weight</strong> of 700 displays the text as bold.</p>
<p>the text in the first cell of the second row got<br />
aligned to the right with the proprietary: <strong>text-align</strong>. Additional to &#8220;right&#8221; you can use &#8220;center&#8221; and &#8220;left&#8221;.<br />
<strong>vertical-align:top;</strong> aligns the whole text in the cell to the top of the cell as our second cell, the one with the in it, is a lot longer. Wouldn&#8217;t we set it to the top, it would be vertical aligned in the middle, as it happens in the third cell. There are <a href="http://www.w3schools.com/css/pr_pos_vertical-align.asp">a few more vertical align behaviors</a>, <a href="http://www.w3schools.com/css/pr_pos_vertical-align.asp">have a look at them</a> and play around <img src='http://www.ruelicke.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
I also changed the color of the links in the cell and used <a href="http://www.w3schools.com/css/pr_text_text-decoration.asp"><strong>text-decoration</strong></a> to show you that you can change a lot more with the right style proprietaries.</p>
<p>The other cells and rows got style proprietaries I explained earlier. I just used different colors to show you how the table layout looks like, so you can compare what the attributes are doing with a cell or row or the table&#8230;</p>
<p>I hope you understood everything, so <a href="http://www.ruelicke.net/example/html/tutorial103.html">have a look at my example page</a>.<br />
If you are not able to get your page working the way you want, feel free to use the comment section to ask for help.</p>
<p>Right now I have no idea what I will do in the next tutorial, so it will be a surprise. Meanwhile, use and train what you have learned. <img src='http://www.ruelicke.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ruelicke.net/2007/07/31/html-tutorial-103-design-tables-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Tutorial 102: Manipulating Variables and doing Mathematics</title>
		<link>http://www.ruelicke.net/2007/04/28/php-tutorial-102-variables-mathematics/</link>
		<comments>http://www.ruelicke.net/2007/04/28/php-tutorial-102-variables-mathematics/#comments</comments>
		<pubDate>Sat, 28 Apr 2007 18:27:21 +0000</pubDate>
		<dc:creator>Marco</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://blog.ruelicke.net/2007/04/28/php-tutorial-102-variables-mathematics/</guid>
		<description><![CDATA[Now, after we learned how to show content and also had a first glance at variables, we will now go a step further. To define a variable in PHP you just need to use $ and a variable name: $variable. You can use as variable name whatever you like, however you are not allowed to [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.ruelicke.net/wp-content/themes/ruelicke/images/icon-php.png" alt="PHP - Hypertext PreProcessor" title="PHP - Hypertext PreProcessor" class="alignleft" />Now, after we learned <a href="http://www.ruelicke.net/2007/04/php-tutorial-101-hello-world/">how to show content</a> and also had a first glance at variables, we will now go a step further.</p>
<p>To define a variable in PHP you just need to use $ and a variable name: <code>$variable</code>.<br />
You can use as variable name whatever you like, however you are not allowed to let it start with a number, like <code>$1variable</code> and there are also some predefined variables, about which I will talk later.</p>
<p>There are many types of variables, but for now we concentrate on 4 types (actually 5, but the fifth will follow in another tutorial).<span id="more-13"></span></p>
<p>So, which 4 types do we have?</p>
<p><strong>string</strong><br />
e.g. <code>$string = "This is a string";</code></p>
<p><strong>boolean</strong><br />
e.g. <code>$boolean = True;</code></p>
<p><strong>integer</strong><br />
e.g. <code>$integer = 123456;</code></p>
<p><strong>float</strong><br />
e.g. <code>$float = 1.234;</code></p>
<p>so, let&#8217;s make a script where can play a bit with those variables:</p>
<p><code>&lt;?PHP<br />
$string= "This is a string"; // String<br />
$string_alt= 123456; // String<br />
$boolean= True; // Boolean<br />
$integer= 123456; // Integer<br />
$float= 1.234; // Float</code></p>
<p><code>print 'The variable "$string" has the type of: '.gettype($string).'&lt;br /&gt;';<br />
print 'The variable "$string_alt" has the type of: '.gettype($string_alt).'&lt;br /&gt;';<br />
print 'The variable "$boolean" has the type of: '.gettype($boolean).'&lt;br /&gt;';<br />
print 'The variable "$integer" has the type of: '.gettype($integer).'&lt;br /&gt;';<br />
print 'The variable "$float" has the type of: '.gettype($float);<br />
?&gt;</code></p>
<p>Run this script and the gettype() function will tell you which type a variable has.<br />
If you have a look at the output, you will see a mistake. Isn&#8217;t &#8220;$string_alt&#8221; supposed to have the type &#8220;string&#8221;?<br />
Yes, it is supposed to be a string, however, PHP does not know that your number shall be a string. So how can fix this problem?<br />
It is quite easy, just add <code>(string)</code> infront of it, so it looks like <code>$string_alt= (string) 123456; // String</code>.</p>
<p>Everything should be fine now, you could even turn the string back to integer, just add (integer) again:<br />
<code>&lt;?PHP<br />
$string_alt= (string) 123456; // String</code></p>
<p><code>print 'The variable "$string_alt" has the type of: '.gettype($string_alt).'&lt;br /&gt;';</code></p>
<p><code>$string_alt = (integer )$string_alt; // convert to Integer<br />
print 'The variable "$string_alt" has the type of: '.gettype($string_alt);<br />
?&gt;</code></p>
<p>What we did here is called &#8220;type casting&#8221; and it is always useful if you have script where you need to change the variable type to prepare it for a special function or whatever you plan to do with it. You can find a complete list of the type casting in the <a href="http://php.net/manual/en/language.types.type-juggling.php#language.types.typecasting">PHP documentation at the official website.</a></p>
<p>Type casting is not the only thing you can do variables. You can also add $variable1 at the end (or beginning) of $variable2:</p>
<p><code>&lt;?PHP<br />
$start = "The little brown fox ";<br />
$end = "jumped over the green fence.";</code></p>
<p><code>$start_merge = $start;<br />
$start_merge .= $end; // adds behind the existing content</code></p>
<p><code>print 'Start sentence: '.$start.'&lt;br /&gt;';<br />
print 'End sentence: '.$end.'&lt;br /&gt;&lt;br /&gt;';<br />
print 'Correct sentence: '.$start_merge.'&lt;br /&gt;';<br />
print 'Correct sentence: '.$start.$end.'&lt;br /&gt;';<br />
?&gt;</code></p>
<p>As you will see our sentence will be shown in different ways. So let us have a closer look at the code itself:<br />
The &#8220;.=&#8221; means, that the variable which shall be added to another one will be added at the end of the other variable<br />
The &#8220;$start.$end&#8221; looks, familiar, doesn&#8217;t it? I mentioned it in <a href="http://www.ruelicke.net/2007/04/php-tutorial-101-hello-world/">PHP Tutorial 101: Hello World!</a> and the same behavior you see there also happens here.</p>
<p>Before I go on with some mathematical things we can do, I will tell you about the &#8220;//&#8221; I added to the code because I assume you are wondering what it means <img src='http://www.ruelicke.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
The double-slashes only exclude a comment of the code. Beside the &#8220;//&#8221; you can also use &#8220;/* comment */&#8221; and &#8220;#&#8221;<br />
The &#8220;//&#8221; comment will end either at the end of the line of code where it is placed; Everything on the same line and behind of the slashes belong to the comment.<br />
The &#8220;/* comment */&#8221; starts at &#8220;/*&#8221; and ends at &#8220;*/&#8221; no matter if there are multiple lines of code or not.<br />
The &#8220;#&#8221; comment behaves like the &#8220;//&#8221; comment.</p>
<p>So, as we have this explained, I&#8217;m able to use more comments in the code and avoid longer &#8220;outside of code&#8221; explanations <img src='http://www.ruelicke.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Now let&#8217;s do some mathematics!</p>
<p>With PHP (as with any other programming language) you are able to make all kind mathematic calculations. For this tutorial, I only stick to the most basic mathematic functions and refer you to the <a href="http://php.net/manual/en/ref.math.php">PHP Manual: Mathematical Functions</a></p>
<p>We will use the following script as a start for some calculations:<br />
<code>&lt;?PHP<br />
$a = 5;<br />
$b = 2.3;<br />
$c = -6;<br />
$d = 100;</code></p>
<p><code>$ad = $a + $d; // Adds $d to $a<br />
$da = $a - $d; // Subtracts $d from $a<br />
$bc = $b / $c; // Divides $b through $c<br />
$dc = $d * $c; // Multiplies $b with $c</code></p>
<p><code>print $a.' + '.$d.' = '.$ad.'&lt;br /&gt;';<br />
print $a.' - '.$d.' = '.$da.'&lt;br /&gt;';<br />
print $b.' / '.$c.' = '.$bc.'&lt;br /&gt;';<br />
print $d.' x '.$c.' = '.$dc.'&lt;br /&gt;';<br />
?&gt;</code></p>
<p>We just did the basic mathematic calculations you and I think it is self-explanatory, so let&#8217;s have a look how we can get a random number, divide it by another random number and make sure the result is rounded to 2 decimal places, if it is a floating number:<br />
<code>&lt;?PHP<br />
$random_a = rand(1,1000); // get a random number between 1 and 1000<br />
$random_b = rand(500,1500); // get a random number between 500 and 1500</code></p>
<p><code>$random = $random_a / $random_b;<br />
$random_round = round($random,2); // rounds result to 2 decimal places</code></p>
<p><code>print 'First random number is: '.$random_a.'&lt;br /&gt;<br />
Second random number is: '.$random_b.'&lt;br /&gt;<br />
Result is: '.$random.'&lt;br /&gt;<br />
Rounded result is: '.$random_round;<br />
?&gt;</code></p>
<p>Of course there are way more things you can do, but I think this is enough for mathematics. I recommend you have a look at the <a href="http://php.net/manual/en/ref.math.php">PHP Manual: Mathematical Functions</a> and play around because it is proved that you learn much more by the &#8220;Trial and Error&#8221; concept that any other Tutorial.<br />
A tutorial is always a start, but you really learn something by doing it on your own. So use the time to the next tutorial by training what you have learned. <img src='http://www.ruelicke.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><ins datetime="2007-07-29T20:49:05+00:00">Update:</ins> <a href="http://www.ruelicke.net/example/php/tutorial102.php">Here you see a page with the results of the code used in this tutorial</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ruelicke.net/2007/04/28/php-tutorial-102-variables-mathematics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML Tutorial 102: Tags and Validation</title>
		<link>http://www.ruelicke.net/2007/04/25/html-tutorial-102-tags-validation/</link>
		<comments>http://www.ruelicke.net/2007/04/25/html-tutorial-102-tags-validation/#comments</comments>
		<pubDate>Wed, 25 Apr 2007 16:34:02 +0000</pubDate>
		<dc:creator>Marco</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://blog.ruelicke.net/2007/04/25/html-tutorial-102-tags-validation/</guid>
		<description><![CDATA[So, you got the idea how the basic HTML page is build? If not, read the HTML Tutorial 101: Basics before you continue Ok, so you think your page got already some interesting content&#8230;but I bet the layout is&#8230;uhm&#8230;let&#8217;s say boring&#8230;white background and black text&#8230;depending on the server default&#8230;so, the good news is there are [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.ruelicke.net/wp-content/themes/ruelicke/images/icon-html.png" alt="HTML - HyperText Markup Language" title="HTML - HyperText Markup Language" class="alignleft" />So, you got the idea how the basic HTML page is build? If not, read the <a href="http://www.ruelicke.net/2007/04/html-tutorial-101-basics/">HTML Tutorial 101: Basics</a> before you continue <img src='http://www.ruelicke.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Ok, so you think your page got already some interesting content&#8230;but I bet the layout is&#8230;uhm&#8230;let&#8217;s say boring&#8230;white background and black text&#8230;depending on the server default&#8230;so, the good news is there are tags which allow you to manipulate how a page is displayed.</p>
<p>Maybe you think there has to be a bad news if I only mention the good news above. Well, there are two bad news:<br />
to write valid XHTML code you need to<br />
1. learn some CSS (=Cascading Style Sheet) and<br />
2. define the DTD (=DocTypeDefinition).</p>
<p>Before you start searching my blog (or the web) for a <abbr title="CascadingStyleSheet">CSS</abbr> tutorial you should know that I will cover some basic <abbr title="CascadingStyleSheet">CSS</abbr> knowledge in this tutorial and write some <abbr title="CascadingStyleSheet">CSS</abbr> Tutorials at a later date.</p>
<p>Now, after you calmed down, let&#8217;s go on with this tutorial:</p>
<p><ins datetime="2007-07-31T11:26:43+00:00">Update:</ins> Because of the recent update of the W3C validator I&#8217;m introducing here, I had to expand the tutorial and added a couple more things at the bottom of the tutorial. <span id="more-9"></span></p>
<p>Before I start posting a list with all HTML tags and their usage/effect I just forward you to this <a href="http://www.w3schools.com/tags/default.asp">XHTML1.0 Reference at W3Schools</a> which I still use when I need to look up a specific tag.<br />
Bookmark it well, as it will be something you will use often while learning HTML.</p>
<p>Now let&#8217;s get back to our first valid HTML page:</p>
<p><code>&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;Hello world!&lt;/title&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
Hello World!<br />
&lt;br /&gt;<br />
This is my first website.<br />
&lt;/body&gt;<br />
&lt;/html&gt;</code></p>
<p>Would you check this page with <a href="http://validator.w3.org/">the official W3.org HTML validator</a> you would get a big red error message, stating <strong>&#8220;This page is not Valid (no Doctype found)!&#8221;</strong>.</p>
<p>So, let&#8217;s add the doctype statement:</p>
<p><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;<br />
&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;Hello world!&lt;/title&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
Hello World!<br />
&lt;br /&gt;<br />
This is my first website.<br />
&lt;/body&gt;<br />
&lt;/html&gt;</code></p>
<p>Maybe you now think I made a mistake since I stated earlier that the HTML-Tag tells the browser that it shall display a HTML file and you believe the &#8220;doctype&#8221; is part of the HTML page. Well, the DocumentTypeDeclaration or DTD tells the browser which kind of HTML it shall interpret&#8230;or better, which kind of specification the browser shall use for interpreting the document. I guess this is a bit confusing&#8230;just don&#8217;t think too much about it <img src='http://www.ruelicke.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>There are 3 different types of the <abbr title="DocumentTypeDeclaration">DTD</abbr>: Strict, Transitional and FrameSet.<br />
As I don&#8217;t go into details of the differences I point you to <a href="http://www.w3schools.com/tags/tag_doctype.asp">the W3Schools page about the <abbr title="DocumentTypeDeclaration">DTD</abbr>s</a>.</p>
<p>The main difference between Strict, Transitional and FrameSet are that the first does not allow the use of frames and some attributes, the second one does allow some types of frames and all attributes and the FrameSet is like the Transitional except supports all frame types.</p>
<p>For this tutorial we will use the Transitional <abbr title="DocumentTypeDeclaration">DTD</abbr> although I will explain some differences to the Strict <abbr title="DocumentTypeDeclaration">DTD</abbr>. However, I will not talk about frames, as they are not used much anymore.</p>
<p>If you look back at the code I posted above, you see the DocType for Transitional. If we wanted to use the Strict one, it would be:</p>
<p><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;</code></p>
<p>Now run the code I posted above through the validator.<br />
Yes! <strong>&#8220;This Page Is Valid XHTML 1.0 Transitional!&#8221;</strong></p>
<p>Ok, we just got a valid XHTML page, so let&#8217;s keep it that way while we manipulate how it is displayed.<br />
Keep in mind, <a href="http://validator.w3.org/">the official W3.org HTML validator</a> is your best friend, so use it well (and often)!</p>
<p>Now let&#8217;s see how we can edit the style of the html page without using <abbr title="CascadingStyleSheet">CSS</abbr>.<br />
The following tags you can use to edit and structure your text:</p>
<p><strong>&lt;h1&gt;,&lt;h2&gt;,&lt;h3&gt;,&lt;h4&gt;,&lt;h5&gt;,&lt;h6&gt;</strong><br />
These tags describe a heading, &lt;h1&gt; being the top most heading and &lt;h6&gt; being the lowest heading.</p>
<p><strong>&lt;strong&gt;</strong><br />
Renders as strong emphasized text</p>
<p><strong>&lt;em&gt;</strong><br />
Renders as emphasized text</p>
<p><strong>&lt;dfn&gt;</strong><br />
Defines a definition term</p>
<p><strong>&lt;code&gt;</strong><br />
Defines computer code text</p>
<p><strong>&lt;samp&gt;</strong><br />
Defines sample computer code</p>
<p><strong>&lt;kbd&gt;</strong><br />
Defines keyboard text</p>
<p><strong>&lt;var&gt;</strong><br />
Defines a variable</p>
<p><strong>&lt;cite&gt;</strong><br />
Defines a citation</p>
<p><strong>&lt;q&gt;</strong><br />
Defines a short quotation</p>
<p><strong>&lt;blockquote&gt;</strong><br />
Defines a long quotation</p>
<p><strong>&lt;hr&gt;</strong><br />
creates a horizontal line</p>
<p><strong>&lt;del&gt;</strong><br />
Defines text that has been deleted in a document.</p>
<p><strong>&lt;tt&gt;</strong><br />
Renders as teletype or mono spaced text</p>
<p><strong>&lt;i&gt;</strong><br />
Renders as italic text</p>
<p><strong>&lt;b&gt;</strong><br />
Renders as bold text</p>
<p><strong>&lt;big&gt;</strong><br />
Renders as bigger text</p>
<p><strong>&lt;small&gt;</strong><br />
Renders as smaller text</p>
<p>I believe these tags should be enough for a start. So go ahead and play with these tags a bit. Make sure you also use <a href="http://validator.w3.org/">the official W3.org HTML validator</a> which helps you to find errors and ensures that your page stays valid.</p>
<p>I assume you now got used to those tags, so let me add one more tag, which is actually a very important one: the &lt;a&gt;-Tag (no, not the A-Team <img src='http://www.ruelicke.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  ).<br />
The &#8220;a&#8221; stands for anchor and is used to create links within your page and to other pages. Maybe you would like to refer to my tutorials on your website, so here is how you can do it easily:<br />
1. visit the tutorial page you would like to link to. Check the browser address field. Copy the URL in there (or write it down).<br />
2. go to your page code and add something like</p>
<p><code>&lt;a href="http://www.ruelicke.net/2007/04/html-tutorial-101-basics"&gt; Visit this great tutorial I'm currently using &lt;/a&gt;</code></p>
<p>As you see, the opening &lt;a&gt;-Tag is in front of a link text and has a &#8220;href&#8221; attribute. If you fill in a full URL, including &#8220;http://&#8221; it will link to an external page (although it could be your own website, just another page), if you only fill in something like &#8220;test.html&#8221; it will open said html-page within your website. So if your website is at &#8220;domain.com&#8221; it will open the file at &#8220;domain.com/test.html&#8221;</p>
<p>The &lt;a&gt;-Tag also allows you to link within your page, so if you have a link at the top of the page it could link to the bottom of the page, which will make the browser jump to the bottom of the page when used. To enable this, you just need to add an &#8220;id&#8221;-attribute to one of the tags at the bottom of the page, e.g.</p>
<p><code>&lt;h4 id="links"&gt;Links&lt;/h4&gt;</code></p>
<p>and give it an unique id. Meaning: you can&#8217;t use &#8220;links&#8221; as id again, at least not on the same page.</p>
<p>Now you need the internal link at the top of the page:</p>
<p><del datetime="2007-07-29T20:22:18+00:00"><code>&lt;a href="test.html#links"&gt;My Links&lt;/a&gt;</code></p>
<p>You noticed the &#8220;#links&#8221; after &#8220;test.html&#8221;?</del><br />
<ins datetime="2007-07-29T20:22:18+00:00">Correction:</ins><br />
I didn&#8217;t use these internal links, also known as hyperlinks, for a while so I made a mistake here.</p>
<p>If you have you want to link to the bottom of the same page, use <code>&lt;a href="#links"&gt;My Links&lt;/a&gt;</code> if it is on another page and you want to link to the bottom of that page use: <code>&lt;a href="page.html#links"&gt;My Links&lt;/a&gt;</code></p>
<p>The &#8220;#links&#8221; <del datetime="2007-07-29T20:22:18+00:00">after &#8220;test.html&#8221;</del> inside the href=&#8221;" <del datetime="2007-07-29T20:22:18+00:00">That</del> tells the browser to jump to the tag with the id &#8220;links&#8221; in the <del datetime="2007-07-29T20:22:18+00:00">test</del> page.</p>
<p><ins datetime="2007-07-29T20:22:18+00:00">Update:</ins> <a href="http://www.ruelicke.net/example/html/tutorial102.html">Here you can see an example page</a>.</p>
<p>Ok, I think we learned enough for today. <a href="http://www.ruelicke.net/2007/07/html-tutorial-103-design-tables-css/">In the next Tutorial I will talk about some more advanced manipulation of how the page is displayed.</a> (Yes, here will come the basic introduction to <abbr title="CascadingStyleSheet">CSS</abbr>)</p>
<p><ins datetime="2007-07-31T11:21:54+00:00"><strong>Important Update:</strong></ins><br />
After the <abbr title="Web3Consortium">W3C</abbr> updated their HTML validator, your website would not validate if you followed my tutorial so far.<br />
The validator now requires you to add one tag and one or two attributes to make the page validate. So let me tell you what you have to do&#8230;</p>
<p>1. you need to put the following attributes into the opening &lt;html&gt; tag:  xmlns=&#8221;http://www.w3.org/1999/xhtml&#8221; xml:lang=&#8221;en&#8221; lang=&#8221;en&#8221;<br />
so it looks like &lt;html  xmlns=&#8221;http://www.w3.org/1999/xhtml&#8221; xml:lang=&#8221;en&#8221; lang=&#8221;en&#8221;&gt;<br />
The xml:lang and the lang attribute represent the ISO language code, as example, the ISO for German is DE, for English EN and for French FR. For <a href="http://www.w3.org/International/O-charset-lang.html">a complete list of the language codes, visit this W3C page</a></p>
<p>2. you need to specify an encoding type. There are many different types, but in my tutorials I&#8217;m using the UTF-8 encoding. Add the following code after the closing &lt;/title&gt; tag, inside the head tags:<br />
&lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text/html; charset=UTF-8&#8243; /&gt;</p>
<p>Now your website should validate properly <img src='http://www.ruelicke.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ruelicke.net/2007/04/25/html-tutorial-102-tags-validation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML Tutorial 101: Basics</title>
		<link>http://www.ruelicke.net/2007/04/24/html-tutorial-101-basics/</link>
		<comments>http://www.ruelicke.net/2007/04/24/html-tutorial-101-basics/#comments</comments>
		<pubDate>Tue, 24 Apr 2007 14:46:23 +0000</pubDate>
		<dc:creator>Marco</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://blog.ruelicke.net/2007/04/24/html-tutorial-101-basics/</guid>
		<description><![CDATA[Requirements for the HTML Tutorials: - a good freeware HTML editor or at least Notepad (not recommended though) - a place to upload your files, although you can also test your HTML pages on your PC &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; What is HTML? HTML stands for HyperText Markup Language and it is the code which is used to [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.ruelicke.net/wp-content/themes/ruelicke/images/icon-html.png" alt="HTML - HyperText Markup Language" title="HTML - HyperText Markup Language" class="alignleft" />Requirements for the HTML Tutorials:<br />
- a good <a href="http://www.google.com/search?hl=en&#038;q=freeware+html+editor&#038;meta=&#038;aq=t&#038;oq=freeware+html">freeware HTML editor</a> or at least Notepad (not recommended though)<br />
- a <a href="http://www.007ihost.com/">place to upload your files</a>, although you can also test your HTML pages on your PC<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p><strong>What is HTML?</strong><br />
HTML stands for <strong>H</strong>yper<strong>T</strong>ext <strong>M</strong>arkup <strong>L</strong>anguage and it is the code which is used to create the websites you see.</p>
<p>Since HTML4.01 is less used these days, I will only talk about XHTML1.0 from now on. For a HTML4.01 Tutorial I can only advise you to <a href="http://www.w3schools.com/html/default.asp">visit the W3Schools website</a></p>
<p><strong>So&#8230;then what is XHTML?</strong><br />
Basically it is like HTML4.01 although the &#8220;X&#8221; stands for &#8220;E<strong>X</strong>tensible&#8221;.<br />
XHTML is the latest HTML standard and consists of HTML4.01 which was reformulated in XML.</p>
<p><strong>Hey, I know HTML4.01 and I love it! Why should I use XHTML?</strong><br />
My personal opinion:<br />
XHTML is the future of webcoding and it is easier to write valid HTML code. I&#8217;m sure you know the famous info texts on older webpages, stating &#8220;Optimized for IE&#8221; or any other browser. You have less problems to write valid code as all current browsers treat XHTML the same way.<br />
No more &#8220;browser-optimizing&#8221;!<br />
Even better, XHTML is backwards compatible, meaning the page is displayed the same in IE7 and IE5 or older.</p>
<p>So switch to XHTML, it is really easy <img src='http://www.ruelicke.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Well, what are the basics you should know about XHTML. Let me explain it two ways:<span id="more-6"></span></p>
<p><strong>1. HTML4.01 experienced coder</strong><br />
good (valid) code would look like this:</p>
<p><code>&lt;h3&gt;Heading&lt;/h3&gt;<br />
some text<br />
&lt;br /&gt;<br />
some more &lt;b&gt;text&lt;/b&gt;</code></p>
<p>wrong (invalid) code could look like this:</p>
<p><code>&lt;H3&gt;Heading<br />
some text<br />
&lt;br&gt;<br />
some more &lt;B&gt;text&lt;/B&gt;</code></p>
<p>So what is the difference? You can say that all tags have to be closed; the &#8220;h3&#8243; needs its closing &#8220;/h3&#8243; and tags without a closing tag, like &#8220;br&#8221; or &#8220;img&#8221; are now auto-closing, so the old &lt;br&gt; turns into &lt;br /&gt;.<br />
Also all the code is written in non-capitals. There is no &#8220;H3&#8243; or so, only &#8220;h3&#8243;.</p>
<p>That&#8217;s basically everything which is changing. Have a look at the <a href="http://www.w3schools.com/tags/default.asp">W3schools XHTML1.0 Reference</a> for more details.</p>
<p><strong>2. readers without experience with HTML</strong><br />
These tutorials are the right thing for you&#8230;I hope&#8230;so let&#8217;s get started! <img src='http://www.ruelicke.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>A website consists of a four basic tags which cannot be left out or the page would not validate.<br />
These tags are:<br />
- &lt;html&gt;<br />
- &lt;head&gt;<br />
- &lt;title&gt;<br />
- &lt;body&gt;</p>
<p>Now let&#8217;s build our first website!</p>
<p><code>&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;Hello world!&lt;/title&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
Hello World!<br />
&lt;br /&gt;<br />
This is my first website.<br />
&lt;/body&gt;<br />
&lt;/html&gt;</code></p>
<p>Create a HTML file and copy the code into it, save it and open it in your browser (e.g. Firefox)<br />
If you don&#8217;t have a HTML editor, create a new txt-file and open it with Notepad. Copy the code, save the file, then rename it to foo.html (or a name you prefere).<br />
Congratulation, you just wrote your first website!</p>
<p>So, let&#8217;s explain each tag <img src='http://www.ruelicke.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The &lt;html&gt; let the browser know that you are opening a HTML file, so it interprets the code and displays your content.<br />
The &lt;head&gt; is the place where you will later add meta, link and style tags/content. I will get into more detail in another tutorial.<br />
In the &lt;head&gt; you also have the &lt;title&gt; tag. This tag allows you to give your page a title which is displayed at the upper left of your browser. Feel free to edit the &#8220;Hello World&#8221; title to something else <img src='http://www.ruelicke.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Last but not least we have the &lt;body&gt; tag. Inside the the body-tags you will write whatever you want to have on your website.<br />
If you are wondering what the  &lt;br /&gt; means, it just creates a line break, so the &#8220;Hello World!&#8221; and the &#8220;This is my first website.&#8221; are on different lines. The more &#8220;br&#8221;s you add, the more space you will get between the lines.</p>
<p>Now feel free to play with the HTML code you just learned&#8230;</p>
<p>WAIT, I almost forgot one important thing!<br />
Please make sure your code is properly nested. The html-tag is the first tag and its closing tag the last tag in the code (see the example above). After the opening html-tag follows the head-tag, with the title-tag inside. After the closing head-tag follows the body tag. Inside of it you have all your website content. Please also check the &lt;br /&gt; if it really looks like this &lt;br /&gt;.<br />
<del datetime="2007-04-25T16:34:23+00:00">I will tell you the reason for this with the next tutorial</del>, where I will talk about other common html-tags and their usage/function.<br />
I will talk about the reason in a later tutorial.</p>
<p><ins datetime="2007-07-29T20:06:52+00:00">Update:</ins> <a href="http://www.ruelicke.net/example/html/tutorial101.html">Example of the final result</a></p>
<p>Continue to: <a href="http://www.ruelicke.net/2007/04/html-tutorial-102-tags-validation/">HTML Tutorial 102: Tags and Validation</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ruelicke.net/2007/04/24/html-tutorial-101-basics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
