<?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>devexp &#187; Tips and Tricks</title>
	<atom:link href="http://www.devexp.eu/category/devexp/tips-and-tricks/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.devexp.eu</link>
	<description>DEVelopment EXPerience, shared with the world!</description>
	<lastBuildDate>Fri, 28 Oct 2011 12:07:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to use a symfony 1 layout from a different directory</title>
		<link>http://www.devexp.eu/2011/10/28/how-to-use-a-symfony-1-layout-from-a-different-directory/</link>
		<comments>http://www.devexp.eu/2011/10/28/how-to-use-a-symfony-1-layout-from-a-different-directory/#comments</comments>
		<pubDate>Fri, 28 Oct 2011 11:48:36 +0000</pubDate>
		<dc:creator>Van de Voorde Toni</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Layout]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://www.devexp.eu/?p=1042</guid>
		<description><![CDATA[In symfony 1 it is possible to have different layouts for an application. But they all have to be put into the directory &#8216;myproject/apps/frontend/templates/&#8217;. But what if you want to use a layout from another location? Assume you make a &#8230; <a href="http://www.devexp.eu/2011/10/28/how-to-use-a-symfony-1-layout-from-a-different-directory/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><a href="http://www.devexp.eu/wp-content/uploads/2009/04/symfony.jpg"><img src="http://www.devexp.eu/wp-content/uploads/2009/04/symfony.jpg" alt="" title="Symfony" width="127" height="35" class="alignright size-full wp-image-727" /></a>In symfony 1 it is possible to have different layouts for an application. But they all have to be put into the directory &#8216;myproject/apps/frontend/templates/&#8217;. But what if you want to use a layout from another location? </p>
<p>Assume you make a plugin with a specific layout, it would be nice to load the layout from the plugin directory, and not to have to copy the file to the global directory.</p>
<p>Here is how you can achieve this:</p>
<pre class="brush: php; title: ; notranslate">
$template = $this-&gt;getContext()-&gt;getConfiguration()-&gt;getTemplateDir('MODULE', 'LAYOUT_FILE.php');
$this-&gt;setLayout($template . '/LAYOUT_FILE');
</pre>
<p>Let&#8217;s say you have the following:</p>
<pre class="brush: plain; title: ; notranslate">
my_project/
  plugins/
    my_plugin/
      modules/
        MyUser/
          actions/
            actions.php
          templates/
            indexSuccess.php
            MyUserLayout.php
</pre>
<p>The actions.php class could be something like this:</p>
<pre class="brush: php; title: ; notranslate">
class MyUserAction extends sfActions {

  public function preExecute() {
    $template = $this-&gt;getContext()-&gt;getConfiguration()-&gt;getTemplateDir('MyUser', 'MyUserLayout.php');

    $this-&gt;setLayout($template . '/MyUserLayout');
  }

  public function executeIndex() {

  }
}
</pre>
<p>Have fun!</p>
<div class="shr-publisher-1042"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.devexp.eu/2011/10/28/how-to-use-a-symfony-1-layout-from-a-different-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Basic tips and tricks: 4.Css</title>
		<link>http://www.devexp.eu/2009/09/01/basic-tips-and-tricks-4-css/</link>
		<comments>http://www.devexp.eu/2009/09/01/basic-tips-and-tricks-4-css/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 11:42:12 +0000</pubDate>
		<dc:creator>van Rumste Kenneth</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[objects]]></category>
		<category><![CDATA[properties]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tricks]]></category>

		<guid isPermaLink="false">http://www.devexp.eu/?p=899</guid>
		<description><![CDATA[Hello everybody, I&#8217;m back with another version of basic tips and tricks. After having a talk with a client, about the basic on css, I thought it might be good to have an easy introduction. So let’s give it a &#8230; <a href="http://www.devexp.eu/2009/09/01/basic-tips-and-tricks-4-css/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Hello everybody, I&#8217;m back with another version of basic tips and tricks.</p>
<p>After having a talk with a client, about the basic on css, I thought it might be good to have an easy introduction.</p>
<p>So let’s give it a try. We&#8217;ll talk about:</p>
<ul>
<li> Why would you use css?</li>
<li>How to insert css in your html file</li>
<li>How css is written</li>
<li>Css on objects, classes and unique objects</li>
<li>Basic css properties and there values</li>
<li>The pseudo class</li>
<li>Where to find good information on css</li>
</ul>
<blockquote><p>Cascading Style Sheets (CSS) is a style sheet language used to describe the presentation (that is, the look and formatting) of a document written in a markup language.</p>
<p>CSS is designed primarily to enable the separation of document content (written in HTML or a similar markup language) from document presentation, including elements such as the colors, fonts, and layout.</p></blockquote>
<p><span id="more-899"></span></p>
<p><strong>Why would you use css?</strong></p>
<p>Whenever you create an html page without css, you will probably insert layout into it. But every object will have to get it&#8217;s layout specifications and that could be a hard time, especially if you have a lot of objects that need the same layout.<br />
You don&#8217;t know any examples of objects with the same layout?</p>
<ul>
<li> A menu with 4 or 5 buttons.</li>
<li>Buttons</li>
<li>A list</li>
<li>Different headings and titles</li>
<li>Paragraphs</li>
<li>&#8230;</li>
</ul>
<p>As you can see, I don&#8217;t need to think very hard to get different objects on which the same layout can be applied.</p>
<p>I guess you see my point why you could use the same css code over and over again, instead of rewriting it for each object in your page.<br />
And I&#8217;m not even talking about different pages or a whole website&#8230;</p>
<p><strong>How to insert css in your html file</strong></p>
<p>CSS is a file containing code you and that puts a layout on specific objects in your html file.</p>
<p>That code can be written in a html file within these tags</p>
<pre class="brush: xml; title: ; notranslate">
&lt;STYLE type=text/css&gt;                 &lt;/STYLE&gt;
</pre>
<p>Or in a css file that is included within the &lt;head&gt;&lt;/head&gt; tags.</p>
<p>Whatever css code you write in there will be applied to the code within that page.</p>
<p>If you are creating a website or more than one page, it might be more sufficient to use an include so you can reuse the same code over and over again.</p>
<p>In my opinion the only times you can or should use the &lt;style&gt; tags without an include is if you are sure you will never create another page with the same layout or for testing.</p>
<p>Just for readability alone, it might be better to separate it from your original html file and include it.</p>
<p><strong>How css is written</strong></p>
<p>The coding is quite simple, the only difficult thing to learn is: what properties are there? And on which object are they possible?</p>
<p>Css is always written in this way:</p>
<pre class="brush: css; title: ; notranslate">
selector [, selector2, ...]:pseudo-class { property: value; }
/* comment*/
</pre>
<p>This means:</p>
<p>Selector<br />
Is the object you are trying to set the layout for.  It&#8217;s possible to put more than one selector by separating them with a comma.<br />
Ex: paragraphs, header, etc&#8230;</p>
<p>Pseudo class<br />
The pseudo class is a bit tricky and I will talk about that at the end of my tutorial.<br />
Ex: hover, link, visited, etc&#8230;</p>
<p>Property<br />
This is the property you want to set for a specific selector.<br />
Ex: background-color, font-size, etc&#8230;</p>
<p>Value<br />
This is the value you set for the property.<br />
Ex: 1px, #f1f1f1, none, etc&#8230;</p>
<p>Comment<br />
Comment is written between /* */ tags and can be 1 or more lines in length.</p>
<p><strong>Css on objects, classes and unique objects</strong></p>
<p>The selector is actually more then only an id and can be defined in various ways. I guess the best way to show this is by using some examples.<br />
This will set all paragraphs in your page with the background color red.</p>
<pre class="brush: css; title: ; notranslate">
p { background-color: red;}
&lt;p&gt;blabla&lt;/p&gt;
</pre>
<p>This will set all paragraphs with the class nature with a background green.</p>
<pre class="brush: css; title: ; notranslate">
p.nature { background-color: green; }
&lt;p class=&quot;nature&quot;&gt;blabla&lt;/p&gt;
</pre>
<p>This will put a background color green on every paragraph and a brow background color on every font with class tree within the nature paragraph.</p>
<pre class="brush: css; title: ; notranslate">
p.nature { background-color: green; }
p.nature font.tree { background: brown; }
&lt;p class=&quot;nature&quot;&gt; blabla &lt;font class=&quot;tree&quot;&gt; more bla &lt;/font&gt;
&lt;/p&gt;
</pre>
<p>If you are willing to put a layout on 1 specific object you can do that by using the #. In this case, the paragraph sky will get a blue background.</p>
<pre class="brush: css; title: ; notranslate">
#sky { background-color: blue}
&lt;p id=&quot;sky&quot;&gt;blabla&lt;/p&gt;
</pre>
<p>This part is very important because you can save tons of time and code by using classes and ids.</p>
<p><strong>Basic css properties and there values</strong></p>
<p>There are quite a few different properties and not all properties can be used on any object.</p>
<p>It&#8217;s not very complex, but with some try and error you&#8217;ll find your way quite fast in the exciting world of properties. <img src='http://www.devexp.eu/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>I&#8217;ll give some examples first from simple to a bit more difficult and there possible values.</p>
<pre class="brush: css; title: ; notranslate">
background-color: #cccccc;
/* #cccccc is a grey color and can also be replaced by the string 'grey' */

margin: 5px;
/* this will put a margin of 5 pixels round the element */

font-size: normal;
/* The font size can also be replaced with number of px,em or % */

background: #FFFFFF url(image.jpg) repeat-x scroll left top;
/* As you can see it is also possible to add more than 1 value to some properties. */

#FFFFFF:          /* Is the default color the background has */
url(image.jpg)    /* is the image that will be displayed on the background*/
repeat-x          /*  is the way it will be repeated in. x is horizontal, y is vertical*/
scroll            /* sets if the image will be fixed or scroll with the rest of the page*/
left top          /* is where the background starts*/

/* Those are the more complex properties but can easily split up into different css properties if it's too complex.*/
background-color:  #FFFFFF;
background-image:  url(image.jpg);
background-repeat:  repeat-x;
background-attachment: scroll;
background-position: top left;
</pre>
<p>More properties are possible and you can find them other websites that I got lined up in the last part: &#8216;where to find good information on css&#8217;</p>
<p>&lt;strong&gt;The pseudo class&lt;/strong&gt;</p>
<p>These are used to add special effects to the object they are put on.</p>
<p>In this example you will add different text colors when the link is visited, hovered or active</p>
<pre class="brush: css; title: ; notranslate">
a:link {color:#FF0000}     /* unvisited link */
a:visited {color:#00FF00}  /* visited link */
a:hover {color:#FF00FF}    /* mouse over link */
a:active {color:#0000FF}   /* selected link */
</pre>
<p>Other pseudo-classes are possible like: first-child, focus, lang, etc&#8230;</p>
<p><strong>Where to find good information on css</strong></p>
<p><a href="http://en.wikipedia.org/wiki/Cascading_Style_Sheets" target="_blank">General information </a><br />
<a href="http://jigsaw.w3.org/css-validator/" target="_blank">Test your css</a><br />
<a href="http://www.w3.org/Style/CSS/" target="_blank">Official w3c website </a></p>
<p>Off course this doesn&#8217;t cover the whole story as this is only a basic guide.</p>
<p>I just hope you have some advantage from reading this.</p>
<p>C u next time. K.</p>
<div class="shr-publisher-899"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.devexp.eu/2009/09/01/basic-tips-and-tricks-4-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>basic tips and tricks: 3.Forgotten form attributes</title>
		<link>http://www.devexp.eu/2009/01/16/basic-tips-and-tricks-3forgotten-form-attributes/</link>
		<comments>http://www.devexp.eu/2009/01/16/basic-tips-and-tricks-3forgotten-form-attributes/#comments</comments>
		<pubDate>Fri, 16 Jan 2009 13:53:22 +0000</pubDate>
		<dc:creator>van Rumste Kenneth</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[attributes]]></category>
		<category><![CDATA[elements]]></category>
		<category><![CDATA[form]]></category>

		<guid isPermaLink="false">http://www.devexp.eu/?p=273</guid>
		<description><![CDATA[A lot of people create easy forms but don’t think it trough before designing the page. I listed 5 useful attributes/elements a lot of people intend to forget or simply don’t know why they are using it. Use get or &#8230; <a href="http://www.devexp.eu/2009/01/16/basic-tips-and-tricks-3forgotten-form-attributes/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>A lot of people create easy forms but don’t think it trough before designing the page. I listed 5 useful attributes/elements a lot of people intend to forget or simply don’t know why they are using it.</p>
<p>Use <strong>get or post</strong> to send a form</p>
<p>Get will append the form data to the URL that is set in the action attribute of the form and is used when the form is <a title="idempotent" href="http://en.wikipedia.org/wiki/Idempotent" target="_blank">idempotent</a>. For example on search forms.<br />
Post will not append it to the URL but sent it in the body of the form. It should be used when we are modifying a database or doing a subscription.</p>
<p>What is <strong>enctype</strong>?</p>
<p>This attribute is used to submit the form to the server; it is only needed when using post. Whenever you use a file field in your form you should set the enctype value to multipart/form-data, otherwise it uses the default value application/x-www-form-urlencoded.</p>
<p>Use <strong>tabindex</strong></p>
<p>This creates an order when going from one field to the next using your tab button. When creating complex forms, this might come in quite handy. It creates the opportunity for the developer to indicate the order the form needs to be completed. Every field in the form gets a ‘tabindex’ value starting from 0 with a maximum of 32767.</p>
<p>Connect a <strong>label to a field</strong></p>
<p>It’s always handy to have a label for each input field, so you can click on the label and the cursor automatically gets positioned in the input field. The only thing to do is put a ‘for’ attribute in the label and give it the id of the corresponding field as value. Easy and Handy for users</p>
<p><strong>Fieldset and legend</strong></p>
<p>This allows you to thematically group your form elements. The ‘legend’ element gives you the opportunity to create a title on each fieldset and has to be put in between the fieldset tags. Use css styling to create a nice design for the fieldset.</p>
<p>Greetings K.</p>
<div class="shr-publisher-273"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.devexp.eu/2009/01/16/basic-tips-and-tricks-3forgotten-form-attributes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>basic tips and tricks: 2. DIV vs. TABLE</title>
		<link>http://www.devexp.eu/2008/11/04/basic-tips-and-tricks-2-div-vs-table/</link>
		<comments>http://www.devexp.eu/2008/11/04/basic-tips-and-tricks-2-div-vs-table/#comments</comments>
		<pubDate>Tue, 04 Nov 2008 12:42:51 +0000</pubDate>
		<dc:creator>van Rumste Kenneth</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[div]]></category>
		<category><![CDATA[Layout]]></category>
		<category><![CDATA[table]]></category>
		<category><![CDATA[tag]]></category>

		<guid isPermaLink="false">http://www.devexp.eu/?p=238</guid>
		<description><![CDATA[A lot of people don&#8217;t really know when to use what kind of elements to build up an HTML page therefore I would like to take the time to explain tables and div elements. Tables are created to display data, &#8230; <a href="http://www.devexp.eu/2008/11/04/basic-tips-and-tricks-2-div-vs-table/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>A lot of people don&#8217;t really know when to use what kind of elements to build up an HTML page therefore I would like to take the time to explain tables and div elements.<br />
Tables are created to display data, they are built for it and that&#8217;s the only thing they are good for. To explain this we can take a look at the elements that a table can contain. Thead (again in tags &lt;thead&gt;&lt;/thead&gt;) contains the header row information of a table, tfoot contains the footer or bottom row of a table and tbody contains the body or data of a table. The easy thing about tables is that you can change them very easily without breaking out of the design, the height is fit automatically and data is displayed correctly the first time you show it. Off course with a little bit of CSS you get the layout just like you want it to. For more information on this you can take a look at my earlier post (<a href="../../../../../?p=50">http://www.devexp.eu/?p=50</a>)</p>
<p>Now what are div tags actually and why are they better to create a layout?</p>
<p>Div tags are nothing but logical divisions within the content of a page, they are built up with the &lt;div&gt; tag and make it easy to manage and style your HTML page just as you like. The cool thing about div tags is that you can name them individually, so you can affect them with CSS. As you can see the div will react a lot better with layout and give you all the possibilities you need.</p>
<p>The problem with tables is how unreadable and unusable they make your code. When you use a table as base to start from and create different rows and columns you will probably create other tables inside that table to display some content. And maybe you&#8217;ll end up with 3, 4 or even more tables within each other. When you have a page like that, please do take the time to look at the code and you&#8217;ll notice right away that it became very unreadable. When trying to change 1 column or 1 row you&#8217;ll see how complicated it gets. This method was very often used 3-4 years ago in web development but div tags are now getting the bigger hand in this now.</p>
<p>Let&#8217;s create a little example to illustrate this issue. This example will create data displayed like this:</p>
<div style="padding: 5px; background-color: #f1f1f1; width: auto;">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td colspan="2">This is a Title</td>
</tr>
<tr>
<td width="50%">aaa</td>
<td width="50%">bbb</td>
</tr>
<tr>
<td colspan="2">cccc</td>
</tr>
</tbody>
</table>
</div>
<pre class="brush: xml; title: ; notranslate">
&lt;table border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; width=&quot;100%&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td colspan=&quot;2&quot;&gt;This is a Title&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width=&quot;50%&quot;&gt;aaa&lt;/td&gt;
&lt;td width=&quot;50%&quot;&gt;bbb&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td colspan=&quot;2&quot;&gt;cccc&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
</pre>
<p>When we try to create this same view built up with div tags you will get:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;div style=&quot;width: 100%;&quot;&gt;This is a Title&lt;/div&gt;
&lt;div style=&quot;width: 50%; float: left;&quot;&gt;aaa&lt;/div&gt;
&lt;div style=&quot;width: 50%; float: right;&quot;&gt;bbb&lt;/div&gt;
&lt;div style=&quot;width: 100%;&quot;&gt;ccc&lt;/div&gt;
</pre>
<p>I guess the example makes it pretty clear, you write less code and you are very flexible while using the div tags and it makes it very readable.</p>
<p>When creating pages, be sure to think about your design before starting and think of tables as data displayers, not as design tools. It will ask a lot of exercising when you&#8217;re not used to work with div tags, but after a while, you&#8217;ll see all their advantages. These tags and tables are built with a cause, tag for creating divisions in your page, tables for displaying data. Don&#8217;t mix them up.</p>
<div class="shr-publisher-238"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.devexp.eu/2008/11/04/basic-tips-and-tricks-2-div-vs-table/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>basic tips and tricks: 1. Basic HTML</title>
		<link>http://www.devexp.eu/2008/11/03/basic-tips-and-tricks-1-basic-html/</link>
		<comments>http://www.devexp.eu/2008/11/03/basic-tips-and-tricks-1-basic-html/#comments</comments>
		<pubDate>Mon, 03 Nov 2008 18:02:52 +0000</pubDate>
		<dc:creator>van Rumste Kenneth</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[basic]]></category>
		<category><![CDATA[lessons]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.devexp.eu/?p=230</guid>
		<description><![CDATA[There seems to be a big lack of knowledge in the field of basic web design, therefore I decided to write a step-by-step web design tutorial. Every post will be a new chapter in development; I will try to give &#8230; <a href="http://www.devexp.eu/2008/11/03/basic-tips-and-tricks-1-basic-html/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>There seems to be a big lack of knowledge in the field of basic web design, therefore I decided to write a step-by-step web design tutorial. Every post will be a new chapter in development; I will try to give you a fresh view on what really matters and is interesting for starting users. We&#8217;ll start with the basics like tags in html and go on with CSS; the future will tell us how far we get. The point is to share my experience with you guys, not to teach you every detail, if you are completely fresh to HTML and CSS; you better take a look at w3schools first. (<a href="http://www.w3schools.com/">http://www.w3schools.com</a>)</p>
<p>So let&#8217;s start off with our first post: BASIC HTML</p>
<p>First off all, if you want to learn HTML and CSS, try not to use the design view of programs to often. It&#8217;s very easy to create simple pages with those design views, but you won&#8217;t learn the code, and that&#8217;s the important stuff you need to know. So let&#8217;s take a look at basic fresh html code generated by Dreamweaver:</p>
<pre class="brush: xml; title: ; notranslate">
&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;Untitled Document&lt;/title&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>So what is really important in this example?</p>
<p>As you can see, html is completely built up with tags and every tag is written inside the tag it is containing to. You can see that the head and body tag are within the html tag, because the html tag is the whole page and the header and body are in it.</p>
<p>The head tags are simply to give information like the name of the page (now ‘Untitled Document&#8217;) and include the necessary files (that&#8217;s for later). The real important one is the body tag because that is what the user will see. Whatever you will write within these tags, will be displayed on the screen of the person that visits your website.</p>
<p>So if we write &lt;body&gt;test&lt;/body&gt; the user will get an empty, blank screen with test written on it. Easy, isn&#8217;t it? So now you can write whatever you want in the page. The tricky part is the layout of the text.</p>
<p>Layout of a text is also done with the tags as they are written in the first example. So when you want to write for example this is <strong>bold</strong> this is <em>italic</em> and this is <span style="text-decoration: underline;">underlined</span>, you will have to write this:</p>
<p>This is &lt;b&gt;bold&lt;/b&gt; this is &lt;i&gt;italic&lt;/i&gt; and this is &lt;u&gt;underlined&lt;/u&gt;</p>
<p>As you can see every type of layout has its own specific layout tags b for bold, I for italic and u for underline. When using tags, be sure that you always close the tags just as in the example.</p>
<p>Like there are tags for text layout, there are also tags for line breaks and paragraphs. When you are writing long texts with paragraphs in it, always try to write your text within the &lt;p&gt;&lt;/p&gt; tags. Don&#8217;t use 2 &lt;br /&gt; tags instead; this is a very often made mistake. This is for the simple reason that &lt;br /&gt; isn&#8217;t the same as a paragraph, it doesn&#8217;t react the same way for every user, a paragraph tag does. So use your &lt;br /&gt; tags wisely within the &lt;p&gt; tags like so:</p>
<pre class="brush: xml; title: ; notranslate">

This is a long text and when we go to a new line within the paragraph we use a line break
So this will be displayed on a new line within the same paragraph

This is a second paragraph that will be displayed
</pre>
<p>This will result in:</p>
<p>This is a long text and when we go to a new line within the paragraph we use a line break<br />
So this will be displayed on a new line within the same paragraph</p>
<p>This is a second paragraph that will be displayed</p>
<p>The last thing for today is the headings which are used to display titles. Just like the paragraph tag you can use the heading tag: &lt;h1&gt;&lt;/h1&gt;&lt;h2&gt;&lt;/h2&gt;. H stands for heading and the numbers are the scale that the heading is displayed in, 1 being the biggest and 6 being the smallest.</p>
<p>That was it for today my friends, this was the easiest part, in next lessons we will talk about topics like:</p>
<p>DIV vs. Tables<br />
CSS and how to use it properly<br />
debugging and testing<br />
and much more</p>
<div class="shr-publisher-230"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.devexp.eu/2008/11/03/basic-tips-and-tricks-1-basic-html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

