<?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>gHacks Technology News &#124; Latest Tech News, Software And Tutorials &#187; html</title> <atom:link href="http://www.ghacks.net/tag/html/feed/" rel="self" type="application/rss+xml" /><link>http://www.ghacks.net</link> <description>A technology news blog covering software, mobile phones, gadgets, security, the Internet and other relevant areas.</description> <lastBuildDate>Fri, 10 Feb 2012 09:07:37 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/> <item><title>Convert Text To HTML Documents</title><link>http://www.ghacks.net/2011/10/10/convert-text-to-html-documents/</link> <comments>http://www.ghacks.net/2011/10/10/convert-text-to-html-documents/#comments</comments> <pubDate>Mon, 10 Oct 2011 08:07:49 +0000</pubDate> <dc:creator>Martin Brinkmann</dc:creator> <category><![CDATA[Software]]></category> <category><![CDATA[Windows]]></category> <category><![CDATA[html]]></category> <category><![CDATA[html editor]]></category> <category><![CDATA[portable sofware]]></category> <category><![CDATA[text to html]]></category> <category><![CDATA[windows software]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=51337</guid> <description><![CDATA[While it is possible to publish plain text files on the Internet, it is often not the most suitable option considering that HTML documents are more versatile. HTML files support links, different colors and font types as well as other text formatting options and interactive elements. But what can you do if you do not [...]]]></description> <content:encoded><![CDATA[<p>While it is possible to publish plain text files on the Internet, it is often not the most suitable option considering that HTML documents are more versatile. HTML files support links, different colors and font types as well as other text formatting options and interactive elements.</p><p>But what can you do if you do not know how to create a HTML document? You could use an HTML editor or, if you just need to turn a plain text file into HTML, use the free software Text2HTML.</p><p>You should not expect wonders though. Text2HTML is as basic as it gets. More about that later.</p><p>When you start the portable software you will notice several configuration options at the top of the window. Here you can change the background and text color and the font size of the HTML document. And that&#8217;s it.</p><p><img
src="http://www.ghacks.net/wp-content/uploads/2011/10/text-to-html.jpg" alt="text to html" title="text to html" width="518" height="363" class="alignnone size-full wp-image-51338" /></p><p>No title, headings, images or other features are supported by the application. The program displays a preview of how the text will look like in the HTML document.</p><p> To convert text documents all you need to do is to drag and drop files or entire folders with files into the program interface.</p><p>Text2HTML will list all files in its interface. All that&#8217;s left to do now is to click on the Make HTML button to turn all listed text documents into HTML documents. The file is created in the same directory as its source text document.</p><p>Please note that the program supports HTML tags in those documents. If you know your way around HTML you could add formatting options directly to the documents. The more you work on the documents this way the less helpful the software becomes on the other hand.</p><p>Text2HTML is a handy program for users who do not know HTML but need to create HTML documents, for instance to publish them in the company Intranet or on the Internet. If the provided options are not sufficient you could look at free HTML editors such as <a
href="http://www.ghacks.net/2010/12/31/bluegriffon-html-editor/">BlueGriffon</a> or <a
href="http://www.ghacks.net/2010/10/29/use-bluefish-as-your-html-editor/">Bluefish</a> (Linux) instead which offer more functionality but are more complex to work with at the same time.</p><p>Interested users can download the portable software Text2HTML <a
href="http://www.karmenug.mysite.maltanet.net/mytools.html#CG%20Txt2html">from the</a> developer website. The application is compatible with 32-bit and 64-bit editions of the Microsoft Windows operating system.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2011/10/10/convert-text-to-html-documents/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Does HTML5 Really Need a Logo?</title><link>http://www.ghacks.net/2011/01/19/does-html5-really-need-a-logo/</link> <comments>http://www.ghacks.net/2011/01/19/does-html5-really-need-a-logo/#comments</comments> <pubDate>Wed, 19 Jan 2011 08:46:04 +0000</pubDate> <dc:creator>Mike Halsey MVP</dc:creator> <category><![CDATA[The Web]]></category> <category><![CDATA[html]]></category> <category><![CDATA[html 5]]></category> <category><![CDATA[html5]]></category> <category><![CDATA[w3c]]></category> <category><![CDATA[worldwide web consortium]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=39083</guid> <description><![CDATA[The W3C consortium has unveiled the new logo for the HTML5 web scripting language, but why have they done this and is it really necessary? This has come as a surprise to many people as it&#8217;s the first version of the HTML language to have a logo.  This is no ordinary version of HTML though [...]]]></description> <content:encoded><![CDATA[<p>The W3C consortium has unveiled the new logo for the HTML5 web scripting language, but why have they done this and is it really necessary?</p><p>This has come as a surprise to many people as it&#8217;s the first version of the HTML language to have a logo.  This is no ordinary version of HTML though and the reasoning behind the new marketing campaign is both sensible and practical.</p><p>In a press-release the World Wide Web Consortium said&#8230;</p><blockquote><blockquote><div>&#8220;It stands strong and true, resilient and universal as the markup you write. It shines as bright and as bold as the forward-thinking, dedicated web developers you are. It&#8217;s the standard&#8217;s standard, a pennant for progress. And it certainly doesn&#8217;t use tables for layout.&#8221;</div></blockquote></blockquote><p><img
class="aligncenter size-full wp-image-39084" src="http://www.ghacks.net/wp-content/uploads/2011/01/11x0118bu2217.jpg" alt="html5 logo" width="320" height="400" /><br
/> We&#8217;re moving into an area of computing when we&#8217;re breaking free of the legacy shackles of old.  HTML 5 is an important step forward with this but many web-based companies and even individuals with their smaller websites might be hesitant to embrace the new standard.</p><p>People and companies naturally want the maximum number of people to be able to visit their website and today that&#8217;s easy.  I can remember only ten years ago though people shying away from the use of Flash because there simply weren&#8217;t enough people with the Flash player software installed on their computers.</p><p>These days the Flash player is everywhere but HTML5 browsers aren&#8217;t.  There will be huge numbers of websites and companies watching the uptake of compatible browsers with a keen eye, and this will be one of the biggest ongoing stories for the next few years.</p><p>So it&#8217;s reasonable and rational that the W3C should launch a logo and try to kick-start a marketing campaign to get HTML5 adopted early.  We can only hope that they succeed.  Here&#8217;s to the HTML5 version of gHacks.net!</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2011/01/19/does-html5-really-need-a-logo/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>BlueGriffon HTML Editor</title><link>http://www.ghacks.net/2010/12/31/bluegriffon-html-editor/</link> <comments>http://www.ghacks.net/2010/12/31/bluegriffon-html-editor/#comments</comments> <pubDate>Fri, 31 Dec 2010 09:28:51 +0000</pubDate> <dc:creator>Martin Brinkmann</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Windows]]></category> <category><![CDATA[bluegriffon]]></category> <category><![CDATA[Firefox]]></category> <category><![CDATA[html]]></category> <category><![CDATA[html editor]]></category> <category><![CDATA[linux software]]></category> <category><![CDATA[windows software]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=38549</guid> <description><![CDATA[When I have to create a new website I usually rely on scripts like WordPress that offer the core framework and are setup in a few minutes tops. The beauty of it is that I can then concentrate on the content after I have made some theme and plugin modifications. Very easy to to and [...]]]></description> <content:encoded><![CDATA[<p>When I have to create a new website I usually rely on scripts like WordPress that offer the core framework and are setup in a few minutes tops. The beauty of it is that I can then concentrate on the content after I have made some theme and plugin modifications. Very easy to to and done in less than 30 minutes with some experience in setting up WordPress blogs.</p><p>Sometimes though WordPress is not an option, which is for instance the case if no database is available which the blogging platform requires. Plain HTML sites or pages are then an option. I usually hack them right into notepad but some users may prefer an HTML editor for that.</p><p>BlueGriffon is a free portable HTML editor for Linux and the Windows operating system that can be used to create websites in a graphical user interface.</p><p><img
src="http://www.ghacks.net/wp-content/uploads/2010/12/html-editor-bluegriffon-550x326.jpg" alt="html editor bluegriffon" title="html editor bluegriffon" width="550" height="326" class="alignnone size-medium wp-image-38550" /></p><p>The HTML editor uses Firefox rendering engine and an option to display any website directly in its interface. That&#8217;s great for testing HTML code on the site or &#8220;borrowing&#8221; contents from it.</p><p>The editor comes with the usual features and options one would expect. A lot of HTML elements are selectable from top including tables, links, images, forms, text formatting options, media. Stylesheets are supported as well and it is always possible to switch between the what you see is what you get editor and the source editor.</p><p>The editor does not seem to support projects with multiple pages at this point in time which means that users who need to create several pages for the same web project need to do some extensive copying and pasting to do so.</p><p>The use requires knowledge of HTML elements even if they are selected from the menu in the WYSIWYG editor as the program offers no explanation of their functionality. Adventurous users can use trial and error to find that out but it definitely helps to know the majority of HTML elements to avoid this situation.</p><p><a
href="http://bluegriffon.org/">BlueGriffon</a> is available from the project website for Linux and Windows.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/12/31/bluegriffon-html-editor/feed/</wfw:commentRss> <slash:comments>7</slash:comments> </item> <item><title>Validome, Web Page Validator</title><link>http://www.ghacks.net/2010/11/25/validome-web-page-validator/</link> <comments>http://www.ghacks.net/2010/11/25/validome-web-page-validator/#comments</comments> <pubDate>Thu, 25 Nov 2010 10:39:08 +0000</pubDate> <dc:creator>Martin Brinkmann</dc:creator> <category><![CDATA[Online Services]]></category> <category><![CDATA[Web Development]]></category> <category><![CDATA[html]]></category> <category><![CDATA[online server]]></category> <category><![CDATA[validation service]]></category> <category><![CDATA[validome]]></category> <category><![CDATA[web development]]></category> <category><![CDATA[webmaster]]></category> <category><![CDATA[xml]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=37268</guid> <description><![CDATA[One of the aspects of being a webmaster is to make sure that your web pages are compatible with the most popular web browsers. This requires some tweaking and hacks, especially if Internet Explorer 6 comes into the picture. Validating web pages is just one aspect of this. Most browsers handle invalid elements well so [...]]]></description> <content:encoded><![CDATA[<p>One of the aspects of being a webmaster is to make sure that your web pages are compatible with the most popular web browsers. This requires some tweaking and hacks, especially if Internet Explorer 6 comes into the picture. Validating web pages is just one aspect of this. Most browsers handle invalid elements well so that the page is displayed to the user even though it may not be displayed exactly as the web developer has intended.</p><p>Website validators like the <a
href="http://validator.w3.org/">W3C</a> Markup Validation Service check a web page for validation errors. Webmasters use these services to correct validation errors on their websites.</p><p>Here is an example why validation is important. About a year ago I noticed that the RSS feed of Ghacks was <a
href="http://www.ghacks.net/2009/04/14/internet-explorer-8-and-feeds-the-xml-page-cannot-be-displayed/">throwing</a> an XML error in Internet Explorer 8. This was caused by a single character in one of the latest articles that was not escaped (meaning instead of writing the  character &amp; directly one would have to use <code>&amp;amp;</code> instead.</p><p>That single character caused problems in the feed delivery, and I had to work longer than usual to get it fixed. Consequences of invalid code are not always that drastic, but it exemplifies the impact that it can have on a website.</p><p>Validome is another website validation service. It is a bit stricter when it comes to validating pages. It can happen that a page passes as a XHTML 1.0 Transitional document in the W3C validation, and fails in the Validome validation.</p><p>Another difference between the two validation engines is that Validome supports verifications of local and remote documents. Users can either enter an url in the form on the site, or upload a document from their local computer system.</p><p><img
src="http://www.ghacks.net/wp-content/uploads/2010/11/validome-550x265.jpg" alt="validome" title="validome" width="550" height="265" class="alignnone size-medium wp-image-37271" /></p><p>Extended settings are offered to check the document with a specific user agent or language.</p><p>A click on Validate performs the validation of the document. Errors are displayed directly.</p><p><img
src="http://www.ghacks.net/wp-content/uploads/2010/11/validation-error-550x430.jpg" alt="validation error" title="validation error" width="550" height="430" class="alignnone size-medium wp-image-37272" /></p><p>The service lists the line and column of the validation error, the error position and an explanation of the error. This is often enough to fix the issue in the document.</p><p><a
href="http://www.validome.org/validate">Validome</a> is an excellent alternative to the W3C validation service. It is usually enough to use Validome since it appears to be stricter in the validation. Most webmasters on the other hand will probably use both services anyway.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/11/25/validome-web-page-validator/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Use Bluefish as your HTML editor</title><link>http://www.ghacks.net/2010/10/29/use-bluefish-as-your-html-editor/</link> <comments>http://www.ghacks.net/2010/10/29/use-bluefish-as-your-html-editor/#comments</comments> <pubDate>Fri, 29 Oct 2010 19:33:41 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Mac]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[The Web]]></category> <category><![CDATA[Windows]]></category> <category><![CDATA[html]]></category> <category><![CDATA[html editor]]></category> <category><![CDATA[text editor]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=36353</guid> <description><![CDATA[Do people still code HTML by hand? Of course they do. And when they do, what tools do they use? Some use a simple text editor like nano or vi. Some prefer a little more GUI-goodness like Gedit or Kate. Still, some others prefer an application dedicated to the task at hand. For those Linux [...]]]></description> <content:encoded><![CDATA[<p>Do people still code HTML by hand? Of course they do. And when they do, what tools do they use? Some use a simple text editor like nano or vi. Some prefer a little more GUI-goodness like Gedit or Kate. Still, some others prefer an application dedicated to the task at hand.</p><p>For those Linux (and BSD, and Mac, and Windows) users, the tool by which most measure the standard is <a
title="Bluefish" href="http://bluefish.openoffice.nl/index.html" target="_blank">Bluefish</a>. Bluefish is a GPL software that was started in 1997 to facilitate web development on the Linux platform. Although the programmers and the name has changed over time, the intent has not. Bluefish was and is a fantastic HTML editor.</p><p><span
id="more-36353"></span> <strong>Features</strong></p><ul><li>Lightweight</li><li>Fast</li><li>WYSIWYG interface</li><li>Multiple document interface. Opens 500+ documents simultaneously.</li><li>Project support.</li><li>Multi-threaded support for remote files using gvfs.</li><li>Powerful search and replace.</li><li>Open files recursively.</li><li>Snippets sidebar.</li><li>Integrate external programs.</li><li>Integrate external filters.</li><li>Unlimited undo/redo functionality.</li><li>Program-language aware in-line spell checker.</li><li>Auto-recovery of changes.</li><li>Character map of all unicode characters.</li><li>Upload / download synchronisation.</li><li>Full screen editing.</li><li>Customizable programming language support.</li><li>Multiple encodings support.</li><li>Bookmarks functionality</li><li>HTML toolbar and tearable menu&#8217;s.</li><li>Compliance with the Gnome and KDE.</li><li>Translations into ten languages.</li></ul><p><strong>Installation</strong></p><p>The installation of Bluefish is simple:</p><p>Open up your Add/Remove Software tool.</p><p>Search for &#8220;bluefish&#8221; (no quotes).</p><p>Mark Bluefish for installation.</p><p>Click Apply to install.</p><div
id="attachment_36355" class="wp-caption alignleft" style="width: 310px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/10/bluefish1.png"><img
class="size-medium wp-image-36355 " src="http://www.ghacks.net/wp-content/uploads/2010/10/bluefish1-500x338.png" alt="" width="300" height="203" /></a><p
class="wp-caption-text">Figure 1</p></div><p>You will have to enter your administrative password and accept any dependencies that might be necessary. When Bluefish has completed installation you will find the application in <strong>Applications &gt; Programming</strong>. When the tool starts up you will notice a ton of features quickly available (see Figure 1).</p><p>Once you start working with the editor you will want to start immediately using the syntax highlighting. In order to do this you will first select the type of document you are working with (click <strong>Document &gt; Document Type &gt; HTML </strong>if you are working with an HTML document). Once you have selected the type of document, update the highlighting by either clicking F5 or clicking <strong>Document &gt; Update Highlighting</strong>.</p><p>You will also notice all of the toolbars in Bluefish. There is a Main toolbar, a custom toolbar, an HTML toolbar, and a sidebar. The HTML toolbar is exactly what you would expect &#8211; it contains all of the icons for adding tags to your document. The sidebar allows you to navigate your directory hierarchy as well as check reference materials for different styles or types.</p><p>Also included with Bluefish is the ability to preview your code in a browser. As any good HTML editor, you can view your code in multiple browsers &#8211; and even add new browsers from within the Preferences window. To add a new browser click<strong> </strong>the Preferences icon on the main window and then select the External Programs tab. Here click the Add button near the middle of the right pane and then double click under the Name column (and enter the name of your browser) and then double click under the command column (and enter the command necessary for the new browser).</p><p>After you add a new browser it will show up in the <strong>External </strong>menu.</p><p><strong>Final thoughts</strong></p><p>If you prefer to do your HTML work by hand, in an HTML-specific text editor, you can not go wrong with Bluefish.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/10/29/use-bluefish-as-your-html-editor/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Switch Between HTML And Plain Text Emails In Thunderbird</title><link>http://www.ghacks.net/2010/08/16/switch-between-html-and-plain-text-emails-in-thunderbird/</link> <comments>http://www.ghacks.net/2010/08/16/switch-between-html-and-plain-text-emails-in-thunderbird/#comments</comments> <pubDate>Mon, 16 Aug 2010 09:46:12 +0000</pubDate> <dc:creator>Martin Brinkmann</dc:creator> <category><![CDATA[Email]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[html]]></category> <category><![CDATA[html email]]></category> <category><![CDATA[plain text]]></category> <category><![CDATA[plain text email]]></category> <category><![CDATA[thunderbird]]></category> <category><![CDATA[thunderbird tips]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=33063</guid> <description><![CDATA[Emails can be composed as HTML or plain text messages. HTML emails mainly offer the advantage of better formatting options over plain text emails. It is for instance possible to add bold or underlined text, lists or images. HTML emails on the other hand are considered a security and privacy risk. It is for instance [...]]]></description> <content:encoded><![CDATA[<p>Emails can be composed as HTML or plain text messages. HTML emails mainly offer the advantage of better formatting options over plain text emails. It is for instance possible to add bold or underlined text, lists or images. HTML emails on the other hand are considered a security and privacy risk. It is for instance possible to embed an &#8211; often 1&#215;1 pixel image &#8211; in the HTML email to track if the recipient has read the email. There have also been cases where maliciously modified objects were included in emails.</p><p>The Thunderbird email client supports both plain text and HTML emails. The account settings hold the default preference for each email account in the mail client. This only affects email messages that are created in Thunderbird, not messages that are received.</p><p><span
id="more-33063"></span><div
id="attachment_33064" class="wp-caption alignnone" style="width: 441px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/08/html-emails.png"><img
src="http://www.ghacks.net/wp-content/uploads/2010/08/html-emails.png" alt="html emails" title="html emails" width="431" height="179" class="size-full wp-image-33064" /></a><p
class="wp-caption-text">html emails</p></div></p><p>The preference for incoming emails is found under View > Message Body As. Here it is possible to switch from the default Original HTML to Simple HTML or Plain Text.</p><div
id="attachment_33065" class="wp-caption alignnone" style="width: 372px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/08/incoming-emails-plain-text.png"><img
src="http://www.ghacks.net/wp-content/uploads/2010/08/incoming-emails-plain-text.png" alt="incoming emails plain text" title="incoming emails plain text" width="362" height="356" class="size-full wp-image-33065" /></a><p
class="wp-caption-text">incoming emails plain text</p></div><p>This preference is valid for all incoming emails, regardless of the email address they have been sent to.</p><blockquote><h3>Original HTML</h3><p>If you choose View – Message Body As – Original HTML, then you see HTML messages in their original form, except that:</p><p> * For privacy reasons you can choose not to allow messages to run JavaScript code.<br
/> * For privacy reasons you can choose not to allow messages to download remote images.<br
/> * Some messages might contain non-standard HTML that Thunderbird does not support.</p><p>For privacy settings, choose: Options (Preferences) – Privacy – General</p><p>Note:  There are normally no security issues when you read a message in Thunderbird. It is not normally possible for hostile code to attack your computer just because you read a message. But if you open an attachment, then Thunderbird passes the attachment to your operating system or to some other application. Your operating system or the other application might allow the attachment to attack your computer.</p><h3>Simple HTML</h3><p>If you choose View – Message Body As – Simple HTML, then you see HTML messages in a simplified form. Thunderbird does not run JavaScript code, and does not download remote images. Simple HTML preserves basic HTML formatting.</p><h3>Plain text</h3><p>If the message is plain text, then you always see plain text.</p><p>If you choose View – Message Body As – Plain Text, then you see plain text even if the message is really HTML. If the message is multipart, then you see the plain text part. Otherwise Thunderbird converts the HTML message to plain text.</p><p>Thunderbird normally enhances plain text by supporting certain HTML-like features:</p><ul><li>Bold, italic and underlined text.</li><li>Smileys displayed as images.</li><li>Attached images displayed in the body of the message.</li><li>Links displayed in blue, and underlined.</li><li>Flowed paragraphs (if the message was sent using flowed paragraphs)</li><li>Quoted paragraphs outlined with colored bars (if the message was sent using flowed paragraphs)</li><li> Signatures displayed in gray.</li></ul><p>The supported smileys are:<br
/> <code>:-) 	:) 	smile<br
/> :-D 	 	laughing<br
/> :-( 	:( 	frown<br
/> :-[ 	 	embarassed<br
/> ;-) 	;) 	wink<br
/> :-\ 	 	undecided<br
/> :-P 	;-P 	tongue<br
/> =-O 	 	surprise</p><p>:-* 	 	kiss<br
/> >:o 	>:-o 	yell<br
/> 8-) 	 	cool<br
/> :-$ 	 	money<br
/> :-! 	 	foot<br
/> O:-) 	 	innocent<br
/> :'( 	 	cry<br
/> :-X 	 	sealed </code></p></blockquote><p>It sometimes may be necessary to write HTML emails and plain text emails, depending on the recipient. While it is possible to switch the format in the account settings, it is possible to make a temporary switch when composing emails.</p><p>Holding down the Shift key before clicking on create a new message, or one of the reply options, switches from the default writing mode to the other.</p><p>Thunderbird will automatically display the plain text email editor if HTML emails are the default, and vice verse if the Shift key is pressed.</p><p>The composition window will display HTML elements like bold or underline if an HTML message is composed, or no text formatting options if it is a plain text email.</p><h3>HTML Email composition window</h3><div
id="attachment_33066" class="wp-caption alignnone" style="width: 510px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/08/html-email.png"><img
src="http://www.ghacks.net/wp-content/uploads/2010/08/html-email-500x218.png" alt="html email" title="html email" width="500" height="218" class="size-medium wp-image-33066" /></a><p
class="wp-caption-text">html email</p></div><h3>Plain Text composition window</h3><div
id="attachment_33067" class="wp-caption alignnone" style="width: 444px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/08/plain-text-email.png"><img
src="http://www.ghacks.net/wp-content/uploads/2010/08/plain-text-email.png" alt="plain text email" title="plain text email" width="434" height="240" class="size-full wp-image-33067" /></a><p
class="wp-caption-text">plain text email</p></div><p>Holding down the shift key is the fastest way of switching between HTML and plain text composition windows.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/08/16/switch-between-html-and-plain-text-emails-in-thunderbird/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>XML Escape Tool</title><link>http://www.ghacks.net/2009/08/30/xml-escape-tool/</link> <comments>http://www.ghacks.net/2009/08/30/xml-escape-tool/#comments</comments> <pubDate>Sun, 30 Aug 2009 19:15:31 +0000</pubDate> <dc:creator>Martin Brinkmann</dc:creator> <category><![CDATA[Software]]></category> <category><![CDATA[Windows]]></category> <category><![CDATA[html]]></category> <category><![CDATA[webmaster]]></category> <category><![CDATA[windows software]]></category> <category><![CDATA[xhtml]]></category> <category><![CDATA[xml]]></category> <category><![CDATA[xml escape tool]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=15840</guid> <description><![CDATA[Webmasters have to make sure that the code of their website is excaping several characters correctly. Failure to do so can lead to all kinds of problems from display errors to functions that are not working correctly because of this (check out The XML Page Cannot Be Displayed article for an example of things that [...]]]></description> <content:encoded><![CDATA[<p><img
src="http://www.ghacks.net/wp-content/uploads/2009/08/xml.png" alt="xml" title="xml" width="158" height="94" class="alignleft size-full wp-image-15841" />Webmasters have to make sure that the code of their website is excaping several characters correctly. Failure to do so can lead to all kinds of problems from display errors to functions that are not working correctly because of this (check out <a
href="http://www.ghacks.net/2009/04/14/internet-explorer-8-and-feeds-the-xml-page-cannot-be-displayed/">The XML Page Cannot Be Displayed</a> article for an example of things that can happen if characters are not escaped properly).</p><p>The relevant characters that need to be escaped are &apos;, &quot;, &amp;, &lt; and &gt;. (I had to escape them while writing this article to avoid xml errors on the page. Webmasters have several options to escape these characters. They can escape them manually, use an online tool to convert them (see <a
href="http://www.ghacks.net/2009/05/07/how-to-display-valid-markup-code-in-websites/">How To Display Valid Markup Code In Websites</a>) or a software program like the XML Escape Tool.</p><p><span
id="more-15840"></span><img
src="http://www.ghacks.net/wp-content/uploads/2009/08/xml_escape_tool-500x384.jpg" alt="xml escape tool" title="xml escape tool" width="500" height="384" class="alignnone size-medium wp-image-15843" /></p><p>Source code has to be pasted into the first form field in the application window. The tool can then escape the source code if the user clicks on the Escape button or unescape the source if the Unescape button is pressed.</p><p>The resulting code can be copied automatically to the Windows clipboard. The benefit of using a desktop software program to escape the characters is that it works if no Internet connection is available. Users who want to try the software can <a
href="http://www.myxmltools.com/xml-escape-tool.shtml">download</a> it from the developer&#8217;s website.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/08/30/xml-escape-tool/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Log in to websites with your site&#8217;s URL as your OpenID</title><link>http://www.ghacks.net/2009/07/17/log-into-websites-with-your-sites-url-and-openid/</link> <comments>http://www.ghacks.net/2009/07/17/log-into-websites-with-your-sites-url-and-openid/#comments</comments> <pubDate>Fri, 17 Jul 2009 11:12:56 +0000</pubDate> <dc:creator>Joe</dc:creator> <category><![CDATA[The Web]]></category> <category><![CDATA[authentication]]></category> <category><![CDATA[authorisation]]></category> <category><![CDATA[html]]></category> <category><![CDATA[id]]></category> <category><![CDATA[my open id]]></category> <category><![CDATA[myopenid]]></category> <category><![CDATA[openid]]></category> <category><![CDATA[passwords]]></category> <category><![CDATA[Security]]></category> <category><![CDATA[username]]></category> <category><![CDATA[web]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=14457</guid> <description><![CDATA[A few years ago, Martin covered OpenID, an open authentication system. Since then, it has become increasingly popular and a wide range of sites, from AOL to LiveJournal provide OpenIDs, and OpenID login is also quite common. OpenID is particularly popular for blog comments, with Blogger now integrating support for it. An OpenID is an [...]]]></description> <content:encoded><![CDATA[<p><img
src="http://www.ghacks.net/wp-content/uploads/2009/07/openid-300x267.gif" alt="OpenID" width="300" height="267" class="alignleft size-thumbnail wp-image-14481" /><a
href="http://www.ghacks.net/2007/05/30/avoid-multiple-login-names-with-openid/">A few years ago, Martin covered OpenID,</a> an open authentication system. Since then, it has become increasingly popular and a wide range of sites, from AOL to LiveJournal provide OpenIDs, and OpenID login is also quite common. OpenID is particularly popular for blog comments, with Blogger now integrating support for it.</p><p>An OpenID is an URL. However, using an URL like http://computerjoe.myopenid.com/ to log-in and post comments with just doesn&#8217;t look sophisticated. I much prefer to use my own blog&#8217;s URL to post comments and log-in; it pumps traffic to my blog and frankly just looks better.</p><p>Whilst you could run your own OpenID identity server to do this, this takes quite a bit of expertise to set-up and whilst it is probably more secure, it isn&#8217;t needed in my opinion.</p><p><span
id="more-14457"></span>It is possible to use a any identity server with your website&#8217;s URL. I personally use <a
href="http://www.myopenid.com/">MyOpenID</a>, but I log in to sites with joeanderson.co.uk/blog; not  with computerjoe.myopenid.com.</p><p>This can be done by simply adding a few lines of HTML to your website&#8217;s &lt;head&gt;.</p><p>For example, I put</p><p>&lt;link rel=”openid.server” href=”http://www.myopenid.com/server” /&gt;<br
/> &lt;link rel=”openid.delegate” href=”http://computerjoe.myopenid.com” /&gt;</p><p>Naturally, these have to be modified depending on your username and server, but the provider should provider the information.</p><p>There are several benefits using this type of OpenID identificatin. The main one is that it just looks better but the most practical one is probably that it allows you to change provider whilst keeping the same log on. So, if I suddenly decide not to use MyOpenID, I can change to any other provider but my URL remains the same.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/07/17/log-into-websites-with-your-sites-url-and-openid/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>A standard compliant web browser and editor: Amaya</title><link>http://www.ghacks.net/2009/07/11/a-standard-compliant-web-browser-and-editor-amaya/</link> <comments>http://www.ghacks.net/2009/07/11/a-standard-compliant-web-browser-and-editor-amaya/#comments</comments> <pubDate>Sat, 11 Jul 2009 18:18:57 +0000</pubDate> <dc:creator>Joe</dc:creator> <category><![CDATA[Software]]></category> <category><![CDATA[Web Development]]></category> <category><![CDATA[html]]></category> <category><![CDATA[html editor]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[mac]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[w3c]]></category> <category><![CDATA[web design]]></category> <category><![CDATA[web development]]></category> <category><![CDATA[Windows]]></category> <category><![CDATA[xml]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=14311</guid> <description><![CDATA[Some web browsers don&#8217;t fully respect web standards and many WYSIWYG HTML editors produce absolutely revolting code. W3C set out standards as to how HTML (and XHTML etc) should appear and whilst some choose to ignore these, some are devoted to the following of these standards. Sticking to standards can therefore lead to issues with [...]]]></description> <content:encoded><![CDATA[<p>Some web browsers don&#8217;t fully respect web standards and many WYSIWYG HTML editors produce absolutely revolting code. <a
href="http://www.w3.org/">W3C</a> set out standards as to how HTML (and XHTML etc) should appear and whilst some choose to ignore these, some are devoted to the following of these standards.</p><p>Sticking to standards can therefore lead to issues with certain web browsers, which lack support for the latest tags or render pages wrong.</p><p>The W3C therefore has its own web browser and editor which adheres to standards more than many browsers and supports certain new technologies others don&#8217;t, such as RDF annotation. This browser is <a
href="http://www.w3.org/Amaya/">Amaya</a>, an open-source and cross-platform browser.</p><p><span
id="more-14311"></span>Amaya can handle a wide-range of open file formats, including HTML, CSS, XHTML, SVG and MathML.</p><p><a
href="http://www.ghacks.net/wp-content/uploads/2009/07/Amaya-html-editor.png"><img
src="http://www.ghacks.net/wp-content/uploads/2009/07/Amaya-html-editor.png" alt="Amaya html editor" title="Amaya html editor" width="600" height="480" class="alignnone size-full wp-image-54086" /></a></p><p>The software integrates the browser and web editor: when you go to a web page, it can be edited inside the browser. It also instantly displays syntactic errors.</p><p>It also integrates the mark-up languages. For example, in a web page, one can write formula utilising MathML or add SVG shapes inside the software.</p><p>Amaya is a reasonable WYSIWYG editor and a good web browser for developmental purposes. It is also good to produce rich web-pages, which include other pieces of mark-up than HTML.</p><p><strong>Update:</strong> Amaya has not been updated in the last two years. While it is still possible to use the cross-platform HTML editor it needs to be noted that it does not support recent technology advancements. This includes no support for HTML5 or CSS3 in the last release.</p><p>Windows and Linux users find in <a
href="http://www.ghacks.net/2010/12/31/bluegriffon-html-editor/">Blue Griffon</a> a suitable alternative. Blue Griffon user however need to know HTML to work with the program, as it does not display information about elements that can be selected in the editor. Users who know their HTML elements will find it to be a suitable alternative for Amaya.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/07/11/a-standard-compliant-web-browser-and-editor-amaya/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Check HTML With CSE HTML Validator Lite</title><link>http://www.ghacks.net/2009/07/09/check-html-with-cse-html-validator-lite/</link> <comments>http://www.ghacks.net/2009/07/09/check-html-with-cse-html-validator-lite/#comments</comments> <pubDate>Thu, 09 Jul 2009 16:39:03 +0000</pubDate> <dc:creator>Martin Brinkmann</dc:creator> <category><![CDATA[Software]]></category> <category><![CDATA[Windows]]></category> <category><![CDATA[check html]]></category> <category><![CDATA[htm]]></category> <category><![CDATA[html]]></category> <category><![CDATA[html validator]]></category> <category><![CDATA[markup validation]]></category> <category><![CDATA[webmasters]]></category> <category><![CDATA[websites]]></category> <category><![CDATA[windows software]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=14290</guid> <description><![CDATA[It is very important that webmasters validate their websites by checking the html code that is produced on the front end of the site. This can be done with online tools like the markup validation tool of the W3C website or offline tools such as the CSE HTML Validator Lite. The HTML validator can be [...]]]></description> <content:encoded><![CDATA[<p><img
src="http://www.ghacks.net/wp-content/uploads/2009/04/microsoft_windows.jpg" alt="microsoft windows" title="microsoft windows" width="128" height="128" class="alignleft size-full wp-image-11907" />It is very important that webmasters validate their websites by checking the html code that is produced on the front end of the site. This can be done with online tools like the markup validation tool of the <a
href="http://validator.w3.org/">W3C</a> website or offline tools such as the CSE HTML Validator Lite. The HTML validator can be installed on a computer system running the Windows operating system to check html pages for errors and other problems.</p><p>Webmasters need a local html file so that it can be loaded into the software program. The easiest way to achieve this is to go to the website that should be validated, view the source code of it and save it as html on the computer system.</p><p><span
id="more-14290"></span>This html file can then be loaded and analyzed in the software. The html code will then be validated by the software. It will immediately jump to the first error in the code and link it to the errors and comments in the footer area. This makes it very easy to understand (in most cases) why something is not right with the code. It is possible to edit the html code right in the HTML Validator to correct the errors that have been discovered. It is still necessary to correct the error on the web as well obviously if the html code has been downloaded from the web.</p><p>The program comes with a few additional functions that help in certain cases. It is for example possible to convert all tags of the html document to lowercase, find and replace code in the html file or to use a spell checker.</p><p>CSE HTML Validator Lite can be downloaded <a
href="http://www.freehtmlvalidator.com/">from</a> the developer&#8217;s website. It is available for all Windows operating systems including Windows XP, Windows Vista and Windows 7.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/07/09/check-html-with-cse-html-validator-lite/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Fix Outlook 2010</title><link>http://www.ghacks.net/2009/06/24/fix-outlook-2010/</link> <comments>http://www.ghacks.net/2009/06/24/fix-outlook-2010/#comments</comments> <pubDate>Wed, 24 Jun 2009 16:35:35 +0000</pubDate> <dc:creator>Martin Brinkmann</dc:creator> <category><![CDATA[Email]]></category> <category><![CDATA[email client]]></category> <category><![CDATA[html]]></category> <category><![CDATA[html emails]]></category> <category><![CDATA[microsoft outlook]]></category> <category><![CDATA[outlook 2000]]></category> <category><![CDATA[outlook 2010]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=13832</guid> <description><![CDATA[Microsoft&#8217;s plans to use the Word HTML rendering engine to display HTML emails in the upcoming email software program Microsoft Outlook 2010 has created quite a few protest websites that try to convince Microsoft to change their plans. Outlook 2010 is still in the beta stage and Microsoft is encouraging users to submit feedback to [...]]]></description> <content:encoded><![CDATA[<p>Microsoft&#8217;s plans to use the Word HTML rendering engine to display HTML emails in the upcoming email software program Microsoft Outlook 2010 has created quite a few protest websites that try to convince Microsoft to change their plans. Outlook 2010 is still in the beta stage and Microsoft is encouraging users to submit feedback to improve the email client before the release candidate and final release are released.</p><p>The main problem that arises when using the Word HTML rendering engine is that Microsoft Outlook 2010 will not support web standards like CSS or background images. This could very well mean that Outlook 2010 users will be stuck with broken HTML emails for the next years after the release. Below is an image that is showing a HTML email in both Microsoft Outlook 2000 and Outlook 2010:</p><p><span
id="more-13832"></span><img
src="http://www.ghacks.net/wp-content/uploads/2009/06/microsoft_outlook_2010-500x355.jpg" alt="microsoft outlook 2010" title="microsoft outlook 2010" width="500" height="355" class="alignnone size-medium wp-image-13833" /></p><p>Microsoft Outlook 2000 was using the Internet Explorer rendering engine to display HTML emails. Microsoft mentions benefits that Outlook users gain by using Microsoft Word as their email authoring tool which include automatic styles and templates and SmartArt among other benefits. It would also not be in the best interest performance wise to use a different rendering engine for the display of HTML emails. (via <a
href="http://www.email-standards.org/blog/entry/microsoft-to-ignore-web-standards/">Email Standards</a>)</p><p>The initiators of the Fix Outlook protest website are making use of Twitter to rally protesters from all over the world. Every Twitter user that mentions fixoutlook.org in their tweets will automatically partake in the protest. The avatar icons of users will be displayed on the <a
href="http://fixoutlook.org/">Fix Outlook</a> website. Currently more than 15500 users have already joined the protest.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/06/24/fix-outlook-2010/feed/</wfw:commentRss> <slash:comments>10</slash:comments> </item> <item><title>How To Display Valid Markup Code In Websites</title><link>http://www.ghacks.net/2009/05/07/how-to-display-valid-markup-code-in-websites/</link> <comments>http://www.ghacks.net/2009/05/07/how-to-display-valid-markup-code-in-websites/#comments</comments> <pubDate>Thu, 07 May 2009 13:19:48 +0000</pubDate> <dc:creator>Martin Brinkmann</dc:creator> <category><![CDATA[Web Development]]></category> <category><![CDATA[code]]></category> <category><![CDATA[html]]></category> <category><![CDATA[html entities]]></category> <category><![CDATA[html entities converter]]></category> <category><![CDATA[markup code]]></category> <category><![CDATA[php]]></category> <category><![CDATA[valid code]]></category> <category><![CDATA[w3c]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=12644</guid> <description><![CDATA[There are two difficulties or problems that Internet users encounter when they want to paste code into forms to display these on the Internet. The first problem that can be encountered is that the website will interpret part or all of the code instead of displaying it. A basic example would be to display the [...]]]></description> <content:encoded><![CDATA[<p><img
src="http://www.ghacks.net/wp-content/uploads/2009/05/w3c.jpg" alt="w3c" title="w3c" width="100" height="86" class="alignleft size-full wp-image-12647" />There are two difficulties or problems that Internet users encounter when they want to paste code into forms to display these on the Internet. The first problem that can be encountered is that the website will interpret part or all of the code instead of displaying it. A basic example would be to display the html code needed to make text linkable on a website. These codes are interpreted by most forms automatically if the user just pastes the code into the form. The second problem that can arise is that the website will not validate because of the way it has been pasted into the form. Displaying the &amp; char will for example return an error when validating the code. This can lead to all kinds of troubles including broken RSS feeds (read: <a
href="http://www.ghacks.net/2009/04/14/internet-explorer-8-and-feeds-the-xml-page-cannot-be-displayed/">The XML Feed Cannot Be Displayed</a>).</p><p><span
id="more-12644"></span>Displaying valid markup code in websites, forums, blogs and any other page is not difficulty. The only thing that needs to be done to achieve this is to convert all entities before pasting the code. This can be done manually or by using a script like that offered at <a
href="http://www.spacefem.com/tutorials/makecode.php">Spacefem</a>.</p><p>All that needs to be done is to paste the code into the form and click on the Make Code button at the bottom. To display the following code on a website</p><p><code>&lt;a href=&quot;http://www.ghacks.net/&quot;&gt;Ghacks&lt;/a&gt;</code></p><p>one would have to paste the following code into the form on the website where the code should be displayed</p><p><code>&amp;lt;a href=&amp;quot;http://www.ghacks.net/&amp;quot;&amp;gt;Ghacks&amp;lt;/a&amp;gt;</code></p><p><img
src="http://www.ghacks.net/wp-content/uploads/2009/05/html_entities_converter-500x273.jpg" alt="html entities converter" title="html entities converter" width="500" height="273" class="alignnone size-medium wp-image-12646" /></p><p>This is actually the easiest way to ensure that the website will not interpret the code and that the code will be valid markup code.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/05/07/how-to-display-valid-markup-code-in-websites/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>How to style your page using CSS</title><link>http://www.ghacks.net/2009/03/23/how-to-style-your-page-using-css/</link> <comments>http://www.ghacks.net/2009/03/23/how-to-style-your-page-using-css/#comments</comments> <pubDate>Mon, 23 Mar 2009 16:44:08 +0000</pubDate> <dc:creator>Daniel Pataki</dc:creator> <category><![CDATA[Web Development]]></category> <category><![CDATA[css]]></category> <category><![CDATA[html]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=11400</guid> <description><![CDATA[Beginner article coming up, it&#8217;s time to get to know the wonderful world of CSS! Cascading Style Sheets, or css, is the standard method of styling a webpage. In fact, you should have no styling in HTML whatsoever. HTML was not designed to be a presentation language, it&#8217;s more of a structural-semantic language. In other [...]]]></description> <content:encoded><![CDATA[<p>Beginner article coming up, it&#8217;s time to get to know the wonderful world of CSS! Cascading Style Sheets, or css, is the standard method of styling a webpage. In fact, you should have no styling in HTML whatsoever. HTML was not designed to be a presentation language, it&#8217;s more of a structural-semantic language. In other words, HTML should give your content structurem while CSS should control the actual presentation.</p><p>It&#8217;s a bit difficult to describe this all in one article, but CSS is actually not that hard to get into. Basically, your HTML code has three types of &#8220;hooks&#8221;. You probably already know one of them, this is your common, everyday tag. You can also give a unique ID to any element, or a class, which can be applied to any amount of elements. CSS can grab on to these &#8220;hooks&#8221; (this is not a technical term), and style the element you are refering to.</p><p>Let&#8217;s take a side-step and look at how to implement CSS first. Right now let&#8217;s just use the following syntax inside the file, in the header section (there are many other ways, you can also call CSS from an external file) &#8220;<em>&lt;style type=&#8221;text/css&#8221;&gt; &lt;/style&gt;</em>&#8220;. You can write your CSS code in between the start and end tag. CSS code is also very simple syntax wise. You have to specify a selector, and then some properties and values. The selector will be one of those &#8220;hooks&#8221; we looked at, it will let you specify what you want to change the style of. The property will let you specify what property of that element you want to change (text size, color, etc), and the value will specify what you want to change it to. The correct syntax is &#8220;<strong>selector {property:value; property:value}</strong>&#8221;<br
/> <span
id="more-11400"></span><br
/> With that knowledge safely in our head, let&#8217;s take a more detailed look at our &#8220;hooks&#8221;, which will become our selectors. As I said, a tag can be a hook. Say you want the color of the font in all paragraphs to be orange. You can do this by applying the following CSS code: &#8220;<em>p {color:#ff9900;}</em>&#8220;. The selector is &#8220;p&#8221; the actual tag in html, the property is &#8220;color&#8221;, which controls text color, and the value is &#8220;#ff9900&#8243; which is a color code. You could also write &#8220;orange&#8221;, but color codes give you more control (more on this in another article).</p><p>That&#8217;s not too hard is it? Ok, so now all our paragraph&#8217;s have orange text color, but what if we want one to be different? You could put them in a div instead of a paragraph, since we only specified that paragraphs should have orange text. This is a very bad approach, but it does display how CSS works. You should not do this for many reasons, first of all because you loose some semantics, that piece of text is a paragraph, so should be in a paragraph tag. Second of all, with this approach you will very quickly run out of tags to use. So in this case we apply the other &#8220;hooks&#8221;, we can specify a unique id, or a class. Let&#8217;s apply an id, since we just want a change for this one paragraph.</p><p>In your HTML the id is applied as an attribute to the tag like so: &#8220;<em>&lt;p id=&#8221;example&#8221;&gt;</em>&#8220;. What the actual id is, is not important, but try not to start it with a number, and don&#8217;t have special characters in it a lot (underscore is fine). We can use the id in our CSS code by applying the following in addition to the rule we already have: &#8220;<em>p#example {color:black;}</em>&#8220;. The selector now points specifically to that one paragraph, where we have specified the id &#8220;example&#8221;.</p><p>If we would have applied a class we would have &#8220;<em>&lt;p class=&#8221;example&#8221;&gt;</em>&#8221; in our HTML and &#8220;<em>p.example {color:black;}</em>&#8220;. If you try it out, you can see that there is no difference. The difference is in the fact that id should only be applied to one element only, while class can be applied to as many as you like. You can apply it to a paragraph and a div for example. In this case you could write the following: &#8220;<em>p.example {color:black;}</em> <em>div.example {color:black;}</em>&#8220;. This would tell each paragraph and each div with the class of &#8220;example&#8221; to have a text color of black. There is a simpler way to do this though, you can just specify the class, like so:  &#8220;<em>.example {color:black;}</em>&#8220;. This shows how you should &#8220;read&#8221; the code. Whenever you see just a class you should read it as &#8220;change the text color of <strong>all elements</strong> with this class to black&#8221;. If you see a tag or even another id or class in front you should read it as (in case of a paragraph) &#8220;change the text color of <strong>all paragraphs</strong> with this class to black&#8221;.</p><p>Those are the very basics of CSS, you might find a <a
title="css properties" href="http://htmlhelp.com/reference/css/properties.html">list of properties</a> helpful, but there are many resources on the web to learn more about CSS, but I will be back with more info, and you can start reading <a
href="http://www.bluehost.com/cgi/suspended?d=scriptastique.com">Scriptastique</a> for more info on CSS.</p><p>&lt;img class=&#8221;alignleft size-full wp-image-10878&#8243; src=&#8221;http://www.ghacks.net/wp-content/uploads/2009/03/scrip_twitter.gif&#8221; alt=&#8221;Script&#8221; width=&#8221;53&#8243; height=&#8221;53&#8243; /&gt;&lt;strong&gt;If you&#8217;d like to read some similar articles, take a look at &lt;a title=&#8221;Web development blog&#8221; href=&#8221;http://scriptastique.com&#8221;&gt;Scriptastique&lt;/a&gt;, a blog all about web development and coding, with great tips on CSS, HTML, PHP, MySQL and Javasctipt and tutorials and screencasts coming soon! You can follow us on our &lt;a title=&#8221;Scriptastique RSS feed&#8221; href=&#8221;http://feeds2.feedburner.com/scriptastique&#8221;&gt;RSS feed&lt;/a&gt;, or &lt;a title=&#8221;Scriptastique on Twitter&#8221; href=&#8221;http://twitter.com/scriptastique&#8221;&gt;Twitter&lt;/a&gt; and &lt;a title=&#8221;Scriptastique on Facebook&#8221; href=&#8221;http://www.facebook.com/home.php?#/profile.php?id=1470106953&amp;amp;ref=profile&#8221;&gt;Facebook&lt;/a&gt;! &lt;/strong&gt;</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/03/23/how-to-style-your-page-using-css/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Scriptastique web development roundup</title><link>http://www.ghacks.net/2009/03/09/scriptastique-web-development-roundup/</link> <comments>http://www.ghacks.net/2009/03/09/scriptastique-web-development-roundup/#comments</comments> <pubDate>Mon, 09 Mar 2009 12:55:01 +0000</pubDate> <dc:creator>Daniel Pataki</dc:creator> <category><![CDATA[Web Development]]></category> <category><![CDATA[coding]]></category> <category><![CDATA[html]]></category> <category><![CDATA[php]]></category> <category><![CDATA[scriptastique]]></category> <category><![CDATA[web design]]></category> <category><![CDATA[web development]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=11035</guid> <description><![CDATA[As you all know, we started a web development section here on gHacks. After asking for your opinion and talking about it with Martin, we decided to keep writing 1-2 posts a week here, but move most of the material into a new site called Scriptastique. Right now we only have the blog, but tutorial [...]]]></description> <content:encoded><![CDATA[<p>As you all know, we started a web development section here on gHacks. After asking for your opinion and talking about it with Martin, we decided to keep writing 1-2 posts a week here, but move most of the material into a new site called <a
title="Web development" href="http://www.bluehost.com/cgi/suspended?d=scriptastique.com">Scriptastique</a>.</p><p>Right now we only have the blog, but tutorial sections and screencasts are on their way! To keep gHacks readers in the know, I will be doing a weekly short roundup of posts, if you like some of them, head on over to the site, take a look and participate in all the fun! So let&#8217;s jump to it, here&#8217;s what we covered on week 1.</p><ul><li>Checking MySQL queries for errors</li><li>Creating your first function in PHP</li><li>How the internet works &#8211; domains and hosting</li><li>Create cool icons in a flash for your website</li><li>Creating rounded corners using only CSS</li></ul><p>We have a few more up there, and you can follow us on Twitter and our RSS feed or join us on Facebook. If you have any questions or comments feel free to let me know!</p><p><span
id="more-11035"></span></p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/03/09/scriptastique-web-development-roundup/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>How echo works in PHP</title><link>http://www.ghacks.net/2009/03/04/how-echo-works-in-php/</link> <comments>http://www.ghacks.net/2009/03/04/how-echo-works-in-php/#comments</comments> <pubDate>Wed, 04 Mar 2009 09:22:52 +0000</pubDate> <dc:creator>Daniel Pataki</dc:creator> <category><![CDATA[Web Development]]></category> <category><![CDATA[coding]]></category> <category><![CDATA[echo]]></category> <category><![CDATA[html]]></category> <category><![CDATA[php]]></category> <category><![CDATA[web development]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=10874</guid> <description><![CDATA[The most basic command, and probably the first you&#8217;ll learn when taking a look at PHP is &#8220;echo&#8221;. The first example in many books and online tutorials is the following. Create a file, give it an extension of &#8220;.php&#8221;, upload it to your server, and edit it like so: &#60;?php echo &#8216;Hello World&#8217;; ?&#62; I [...]]]></description> <content:encoded><![CDATA[<p>The most basic command, and probably the first you&#8217;ll learn when taking a look at PHP is &#8220;echo&#8221;. The first example in many books and online tutorials is the following. Create a file, give it an extension of &#8220;.php&#8221;, upload it to your server, and edit it like so:</p><p>&lt;?php<br
/> echo &#8216;Hello World&#8217;;<br
/> ?&gt;</p><p>I hate Hello World examples, but this shows what we are doing pretty well. Basically the echo command will write out that phrase &#8220;Hello World&#8221; (the quotes will not be shown, the single quotes above are part of the code), so if you open that file using Firefox for example you should simply see the phrase.</p><p>This seems straightforward, but to really understand what&#8217;s happening, and to be able to work with PHP efficiently we need to dig a bit deeper to see what really happens when we echo something.</p><p><span
id="more-10874"></span>The most important thing you need to understand is that PHP is a server side language. This means that whatever code you write is never sent directly to the client (the viewer of your site for example). When someone opens a PHP file form the next the file is first processed by the server, and <strong>only the result</strong> is shown to the user. This is why you will never see PHP code if you view the source of a page.</p><p>You also need to know that once the server has processed the file it retruns pure browser readable code. I would say pure HTML, but obviously your PHP file can contain inline javascript, just like your HTML files. Now echoing something tells the server that whatever is echoed should be placed as is into the HTML file. This means that whenever you want to put HTML tags when you are echoing you can do so by writing them as you would in an HTML file itself, like this:</p><p>&lt;?php<br
/> echo &#8216;&lt;strong&gt;Hello World&lt;/strong&gt;&#8217;;<br
/> ?&gt;</p><p>Once the server has returned its result, this is downloaded by the browser and processed like usual, so your &#8220;strong&#8221; tags wil be taken into account and will indeed bold text.</p><p>So what&#8217;s the point of sending the server that bit of code if all it does is just put it in like it was HTML? Well, the answer lies further down the road, but basically this is helpful because you can prevent/enable specific of section of code reaching the client, so the viewer only downloads what he/she needs, not the whole file. A simple example:</p><p>&lt;?php<br
/> $random = rand(0, 99);</p><p>if ($random &gt; 50)<br
/> echo &#8216;Number is above fifty&#8217;;<br
/> else<br
/> &amp;nbsp; &amp;nbsp; echo &#8216;Number is equal to or less than fifty&#8217;;<br
/> ?&gt;</p><p>Without really understanding what&#8217;d going on I can still explain. We create a variable, the value of it will be a randomly generated number between 0 and 99. If this number which we just generated is above 50 then we should echo that it is above fifty, in all other cases (it is below or equal to fifty), we should echo the other statement.</p><p>This is processed whenever someone loads (or reloads) a page, so the variable &#8220;$random&#8221; will always be different, generated &#8220;on the fly&#8221;. The script then checks the number, and only the relevant piece of code is returned, so if the number generated is 55 the only piece of code that you will see in the source will be:</p><p>The number is above fifty</p><p>Obviously this is a bit over-simplified, but in real life this is basically what happens. You can also use this to generate different pieces of code for different days of the week, and the change will be automatic, you only need to program once. You can also use it to create one file to display all your posts (like in WordPress), so you don1t have to code a page for each post you write. PHP is awesome, start lovin&#8217; it!</p><p><img
class="alignleft size-full wp-image-10878" src="http://www.ghacks.net/wp-content/uploads/2009/03/scrip_twitter.gif" alt="Script" width="54" height="54" /><em>If you would like to read more articles like this, take a look at <a
title="Coding and web development blog" href="http://www.bluehost.com/cgi/suspended?d=scriptastique.com" target="_blank">Scriptastique</a>, a new blog by the writer, Daniel Pataki. The site will contain different articles from the ones published here, and will eventually have complete tutorials for numerous programming languages.</em></p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/03/04/how-echo-works-in-php/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>PHP &#8211; what it does and what it doesn&#8217;t</title><link>http://www.ghacks.net/2009/02/16/php-what-it-does-and-what-it-doesnt/</link> <comments>http://www.ghacks.net/2009/02/16/php-what-it-does-and-what-it-doesnt/#comments</comments> <pubDate>Mon, 16 Feb 2009 19:28:22 +0000</pubDate> <dc:creator>Jeremiah</dc:creator> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[Web Development]]></category> <category><![CDATA[css]]></category> <category><![CDATA[html]]></category> <category><![CDATA[LAMP]]></category> <category><![CDATA[mysql]]></category> <category><![CDATA[php]]></category> <category><![CDATA[web dev]]></category> <category><![CDATA[web development]]></category> <category><![CDATA[website development]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=10600</guid> <description><![CDATA[PHP is a Server side scripting language. Its primary competitors are ASP (Microsoft), JSP (Sun), CFM (Adobe), and Perl (often called cgi by hosting companies, although it is not the only cgi language). PHP was originally created in 1995, so as a technology it is fairly mature. Version 5.x is the latest stable version and [...]]]></description> <content:encoded><![CDATA[<p>PHP is a Server side scripting language. Its primary competitors are ASP (Microsoft), JSP (Sun), CFM (Adobe), and Perl (often called cgi by hosting companies, although it is not the only cgi language).<br
/> PHP was originally created in 1995, so as a technology it is fairly mature. Version 5.x is the latest stable version and 6 is under development. It is currently running almost 20 million websites including big names like Facebook.</p><p>The most common server architecture on which PHP is found is called LAMP (for Linux + Apache + MySQL + PHP). All of the elements of LAMP are open source, meaning that the source code of the application is freely available. This means that the cost of setting up a server running LAMP is reduced (No License Fees), so LAMP based web hosting tends to be the least expensive solution available.</p><p>The Internet is built on a client-server architecture. On the client side we have the user and the browser. One the server side we have the server and its script interpreter (In our case, Apache and PHP).<br
/> Because PHP runs on the server side, we cannot use it for flashy client side effects, things like animations and auto-complete cannot be performed by php because php is only running on the server. For client side programming we could use javascript, Flash/Flex, Silverlight, or JavaFX.</p><p><span
id="more-10600"></span>What we can do with PHP is access a database, connect to other websites/services for information, and build a page out of smaller pieces, which we then deliver to the client for rendering.</p><p>I think it is important to indicate at this time that there are four levels at which you can work with PHP.</p><ol><li>Scripting &#8211; this is where you take a small script and add it (integrate) into an existing page.</li><li>Coding &#8211; this is where you write scripts as needed to add basic functionality to your site.</li><li>Development &#8211; this is where you write an full application in PHP.</li><li>Architect &#8211; this is where you properly design an application that develop it into an application. Like development but puts a lot more thought into a good foundation.</li></ol><p>Depending on your actual needs, several of these layers could be overkill for your task. The following articles will mainly be focused on the first two levels &#8211; scripting, and coding. In Scripting and coding we have two primary tasks we accomplish. One makes your job as webmaster easier. The second adds new functionality to your site.</p><p>Jeremiah Stover is a Software Engineer and a Business IT Consultant at <a
href="http://www.pragmatic-development.com">Pragmatic Development</a>. He has hands on experience and regularly provides practical advice in Business, Marketing, IT equipment and software. His Specialties include interpersonal communications, design skills, teaching and instruction. Right now he spends most of his time developing web applications in PHP and MySQL.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/02/16/php-what-it-does-and-what-it-doesnt/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>Ghacks Web Development PDF Article Compilation January 09</title><link>http://www.ghacks.net/2009/02/02/ghacks-web-development-pdf-article-compilation-january-09/</link> <comments>http://www.ghacks.net/2009/02/02/ghacks-web-development-pdf-article-compilation-january-09/#comments</comments> <pubDate>Mon, 02 Feb 2009 09:26:56 +0000</pubDate> <dc:creator>Martin Brinkmann</dc:creator> <category><![CDATA[Compilations]]></category> <category><![CDATA[Web Development]]></category> <category><![CDATA[article compilation]]></category> <category><![CDATA[coding]]></category> <category><![CDATA[ghacks]]></category> <category><![CDATA[html]]></category> <category><![CDATA[php]]></category> <category><![CDATA[web development]]></category> <category><![CDATA[webmaster]]></category> <category><![CDATA[website development]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=10279</guid> <description><![CDATA[The following article contains all web development articles that have been published in January 09. The articles are provided in PDF format to make them readable on most operating systems and devices. We are providing article compilations to give you the chance to read the articles offline and keep them as reference without having to [...]]]></description> <content:encoded><![CDATA[<p>The following article contains all web development articles that have been published in January 09. The articles are provided in PDF format to make them readable on most operating systems and devices. We are providing article compilations to give you the chance to read the articles offline and keep them as reference without having to hop back at our site whenever you want to look something up.</p><p>The following web development articles have been published in January 2009 at Ghacks:</p><p><span
id="more-10279"></span><a
href="http://www.ghacks.net/2009/01/08/web-development-how-does-php-work/">How does PHP work?</a><br
/> <a
href="http://www.ghacks.net/2009/01/31/web-development-html-playground/">HTML Playground</a><br
/> <a
href="http://www.ghacks.net/2009/02/01/web-development-php-what-role-does-it-fill/">PHP &#8211; what role does it fill</a><br
/> <a
href="http://www.ghacks.net/2009/01/02/web-development-standardizing-variables-to-code-faster/">Standardizing variables to code faster</a><br
/> <a
href="http://www.ghacks.net/2009/01/05/web-development-a-brief-history-of-time/">Web Development: A brief history of time()</a></p><p>You can download the pdf document by clicking on the link below.</p><p><a
href='http://www.ghacks.net/wp-content/uploads/2009/02/ghacks_web_january_09.pdf'>ghacks web development january 09</a></p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/02/02/ghacks-web-development-pdf-article-compilation-january-09/feed/</wfw:commentRss> <slash:comments>6</slash:comments> </item> <item><title>Web Development: PHP &#8211; what role does it fill</title><link>http://www.ghacks.net/2009/02/01/web-development-php-what-role-does-it-fill/</link> <comments>http://www.ghacks.net/2009/02/01/web-development-php-what-role-does-it-fill/#comments</comments> <pubDate>Sun, 01 Feb 2009 09:03:18 +0000</pubDate> <dc:creator>Jeremiah</dc:creator> <category><![CDATA[Web Development]]></category> <category><![CDATA[css]]></category> <category><![CDATA[html]]></category> <category><![CDATA[mysql]]></category> <category><![CDATA[php]]></category> <category><![CDATA[web dev]]></category> <category><![CDATA[web development]]></category> <category><![CDATA[website development]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=10259</guid> <description><![CDATA[Before we try to work with PHP we need understand the role it fills – what problem does it address. The World Wide Web is built on a client-server model. A client computer requests a page which is supplied by a Web Server. The browser then renders the page for the user to view. The [...]]]></description> <content:encoded><![CDATA[<p>Before we try to work with PHP we need understand the role it fills – what problem does it address. The World Wide Web is built on a client-server model.  A client computer requests a page which is supplied by a Web Server. The browser then renders the page for the user to view. The simplest type of pages contain static (unchanging) content. The server could serve plain text files, and the browser wouldn&#8217;t have any trouble rendering them.</p><p>HTML is a markup language that lets us describe attributes of the text and blocks on our pages. This works great for simple requests, making pages much more interesting than plain text. However it leaves us with a very simple structure. One page from One url (address) results in one rendered content (every time this url is requested, the output is the same).</p><p>To give us more options we have programming languages. Some like PHP run on the server side. They modify the content that will be displayed before it is sent to the client and on to the browser. Others like JavaScript run on the client side and allow changes to be made in the browser after the page has been rendered – usually for interactivity or for adding a feature not normally available in that browser.</p><p><span
id="more-10259"></span>The very first thing you _must_ do before getting started with PHP is get a good grasp of HTML (and CSS). Many webmasters use a tool like Dreamweaver, Expression Web or KompoZer. To<br
/> work with PHP it is important that you understand the underlying HTML code. You will be modifying this code so you need to be able to understand the HTML well enough to understand what you see.</p><p>If you like video training try Lynda.com or VTC.com. If you prefer reading a book try &#8220;Head First html with CSS &#038; Xhtml&#8221; or if you prefer free web instruction try <a
href="http://w3schools.com">w3schools.com</a> and <a
href="http://tizag.com">tizag.com</a>.</p><p>Now that you understand the markup language which is what is sent to the browser (HTML) you are ready to tackle the server side use of PHP.</p><p>Jeremiah Stover is a Software Developer at <a
href="http://www.pragmatic-development.com/">Pragmatic Development</a>. He specializes in client communications. While PD does offer a full range of IT services and consulting, they are currently specializing in website development in PHP/MySQL.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/02/01/web-development-php-what-role-does-it-fill/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Web Development: HTML Playground</title><link>http://www.ghacks.net/2009/01/31/web-development-html-playground/</link> <comments>http://www.ghacks.net/2009/01/31/web-development-html-playground/#comments</comments> <pubDate>Sat, 31 Jan 2009 08:28:44 +0000</pubDate> <dc:creator>Martin Brinkmann</dc:creator> <category><![CDATA[Web Development]]></category> <category><![CDATA[html]]></category> <category><![CDATA[html playground]]></category> <category><![CDATA[hypertext markup language]]></category> <category><![CDATA[learn html]]></category> <category><![CDATA[web development]]></category> <category><![CDATA[website development]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=10236</guid> <description><![CDATA[The first language that you need to learn if you want to start with web development is HTML. HTML stands for HyperText Markup Language, a set of tags and attributes that can be used to create websites. HTML comes with a limited amount of tags and a basic form that is always the same. It [...]]]></description> <content:encoded><![CDATA[<p>The first language that you need to learn if you want to start with web development is HTML. HTML stands for HyperText Markup Language, a set of tags and attributes that can be used to create websites. HTML comes with a limited amount of tags and a basic form that is always the same. It basically comes down to learning the general layout of a HTML document and the tags that can be used to create the website.</p><p>HTML Playground provides the means to play around with all HTML tags (and a bit of CSS). It does not require any prior knowledge although that could be of an advantage. The website makes use of an interface that is divided into four columns. One holding all HTML tags, another that is displaying &#8220;live&#8221; examples of a selected tag and a third that is displaying valid HTML code used to create the example. Valid HTML code meaning a full html page making use of that code. Each HTML and CSS tag is clickable in the example code leading directly to an example page of that tag.</p><p>It would not really be a HTML Playground if the website would not offer the means to edit the example code. This is excellent to test changes to the code to see how the tags work.</p><p><span
id="more-10236"></span><img
src="http://www.ghacks.net/wp-content/uploads/2009/01/html_playground-499x273.jpg" alt="html playground" title="html playground" width="499" height="273" class="alignnone size-medium wp-image-10237" /></p><p>Beginners might find it a lit difficulty to start and it is recommended to have read at least one article about learning HTML before playing around with the various elements. It is best for users who know the basic of HTML and want to start playing around with code.</p><p><strong>Update:</strong> The HTML Playground is no longer available. There does not seem to be a comparable web service available.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/01/31/web-development-html-playground/feed/</wfw:commentRss> <slash:comments>7</slash:comments> </item> <item><title>Web Development: How does PHP work?</title><link>http://www.ghacks.net/2009/01/08/web-development-how-does-php-work/</link> <comments>http://www.ghacks.net/2009/01/08/web-development-how-does-php-work/#comments</comments> <pubDate>Thu, 08 Jan 2009 19:56:42 +0000</pubDate> <dc:creator>Daniel Pataki</dc:creator> <category><![CDATA[Web Development]]></category> <category><![CDATA[html]]></category> <category><![CDATA[php]]></category> <category><![CDATA[wordpress]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=9687</guid> <description><![CDATA[When someone starts learning web development they usually start with HTML and CSS, and many people get stuck there without ever experiencing the wonderful workd of server side scripting like PHP or ASP. I&#8217;ll be talking about PHP here, but the basic rules for ASP and others are the same though. The most important thing [...]]]></description> <content:encoded><![CDATA[<p>When someone starts learning web development they usually start with HTML and CSS, and many people get stuck there without ever experiencing the wonderful workd of server side scripting like PHP or ASP. I&#8217;ll be talking about PHP here, but the basic rules for ASP and others are the same though.</p><p>The most important thing to understand is the difference between HTML and PHP. In HTML you write your code, upload it, and the user&#8217;s will subsequently download that page along with <strong>all the code</strong>. The user&#8217;s browser interprets this code and shows the user the page as you intended it (hopefully). In other words HTML is sort of what you see is what you get, in the sense that all the code goes to the user and is interpreted by the browser.</p><p>With PHP it works a bit differently because you don&#8217;t actually download the code the author wrote. What happens is that if you want to download a php page the code in that file is first processed by the server, and you download the <strong>output of the code</strong>, as opposed to the whole code as is. This in turn will be HTML just as before, this is why you never see PHP code in the source of a webpage. So what happens in processing? Turn the page to find out!</p><p><span
id="more-9687"></span>With PHP the goal is to use the processing powers of the server to build (usually) dynamic webpages. A very basic example is showing the correct greeting for the time of day on a webpage. In human terms you write a script with the directions to show &#8220;Good Morning&#8221; if it is before 10am but after 5am, &#8220;Good Afternoon&#8221; if it is after 10am but before 6pm and &#8220;Good Night&#8221; after 6pm, before 5am. Instead of receiving all the code for this and processing it in your browser, this all gets processed before you download it, and you only get the result of the process, the text &#8220;Good Night&#8221; for example if it is 9pm.</p><p>This is much quicker, since if you think of bigger sites, instead of having to download 300kb (or much more) of code, it is quickly processed on the server and you might get as little as 10kb or less. Obviously your PC could process the code quickly, but downloading and handling can take a while. In addition, the code may also have database queries which can not execute if processed on your PC, they have to be processed on the server which has the database.</p><p>If you would like a more real-life example, take a look at gHacks, which has almost 5,000 posts now. In HTML world we would have to have 5,000 posts which all have the whole site code, from header to footer with the article in between. PHP makes it possible to &#8220;compress&#8221; those 5,000 files into only 1!</p><p>When you view any gHacks post on a single post page you are actually viewing a file called single.php. This file also has some additional info in the url which will tell the script which post to show, so the file you are viewing would be single.php?p=234. This tells the script that the post with the ID of 234 needs to be shown. The script queries the database for the relevant post and pulls its details (like title and post body) from the database. So in the end all you are shown is one post. WordPress has some other stuff built in to make nicer URL&#8217;s and so on, but under the hood this is what is happening.</p><p>Likewise for the front page we don&#8217;t always go and modify the code when posting something. Martin would be coding all day, removing the last post on the page and pasting the code of the new one. Instead, in the php file you are viewing the code gets the latest 10 posts and puts their data on the page.</p><p>There is a lot more to learn in PHP, but those are the basic mechanics, the ability to create pages based on certain criteria, as opposed to static content on each page.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/01/08/web-development-how-does-php-work/feed/</wfw:commentRss> <slash:comments>23</slash:comments> </item> </channel> </rss>
