<?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>Webmaster-Source &#187; (x)html</title>
	<atom:link href="https://www.webmaster-source.com/tag/xhtml/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.webmaster-source.com</link>
	<description>Useful Resources For Webmasters</description>
	<lastBuildDate>Thu, 24 Aug 2017 02:01:18 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.42</generator>
	<item>
		<title>Illustrating Keyboard Shortcuts with the &lt;kbd&gt; Tag and a Bit of CSS</title>
		<link>https://www.webmaster-source.com/2013/12/27/illustrating-keyboard-shortcuts-kbd-tag/</link>
		<comments>https://www.webmaster-source.com/2013/12/27/illustrating-keyboard-shortcuts-kbd-tag/#comments</comments>
		<pubDate>Fri, 27 Dec 2013 13:16:27 +0000</pubDate>
		<dc:creator><![CDATA[Matt]]></dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[(x)html]]></category>
		<category><![CDATA[HTML5]]></category>

		<guid isPermaLink="false">http://www.webmaster-source.com/?p=5259</guid>
		<description><![CDATA[The HTML spec has long had a (much underutilized) tag called kbd, which is intended to be used for marking up user input. For example, you could write something like this: The browser (by default) renders the kbd tags in a monotype font, just like code and pre. But if you&#8217;re already going to mark [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>The HTML spec has long had a (much underutilized) tag called <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/kbd">kbd</a>, which is intended to be used for marking up user input. For example, you could write something like this:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;p&gt;The most famous keyboard shortcut is probably &lt;kbd&gt;ctrl&lt;/kbd&gt;+&lt;kbd&gt;alt&lt;/kbd&gt;+&lt;kbd&gt;del&lt;/kbd&gt;.&lt;/p&gt;
</pre>
<p>The browser (by default) renders the <code>kbd</code> tags in a monotype font, just like <code>code</code> and <code>pre</code>. But if you&#8217;re already going to mark up keys like that for semantic reasons, why not apply a little styling and make it fancy? (I&#8217;ve seen a few sites do this, Stack Overflow being one of them.)</p>
<p><img style=' display: block; margin-right: auto; margin-left: auto;'  src="//www.webmaster-source.com/wp-content/uploads/2013/12/kbd-tag.png" alt=" Tag" width="491" height="44" class="aligncenter size-full wp-image-5260" /></p>
<pre class="brush: css; title: ; notranslate">
kbd {
	display: inline-block;
	border: 1px solid #ccc;
	border-radius: 3px;
	padding: 0.1em 0.5em;
	margin: 0 0.2em;
	box-shadow: 0 1px 0px rgba(0, 0, 0, 0.2), 0 0 0 2px #ffffff inset;
	background-color: #f7f7f7;
}

</pre>
<p>While the tag isn&#8217;t solely meant for this use case—it can also be used for any user input, such as something you intend the reader to search on Google—I think it&#8217;s a great use. The <code>code</code> element tends to be used for the latter case more often, whether it&#8217;s considered appropriate or not, so styling it like so shouldn&#8217;t get in the way in most cases.</p>
<p>If you have need to display keyboard shortcuts periodically, it&#8217;s definitely a nice touch.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.webmaster-source.com/2013/12/27/illustrating-keyboard-shortcuts-kbd-tag/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>List.js: Table and List Sorting in 5kb of JavaScript</title>
		<link>https://www.webmaster-source.com/2013/12/11/list-js-table-and-list-sorting-in-5kb-of-javascript/</link>
		<comments>https://www.webmaster-source.com/2013/12/11/list-js-table-and-list-sorting-in-5kb-of-javascript/#comments</comments>
		<pubDate>Wed, 11 Dec 2013 13:52:43 +0000</pubDate>
		<dc:creator><![CDATA[Matt]]></dc:creator>
				<category><![CDATA[Software & Scripts]]></category>
		<category><![CDATA[(x)html]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.webmaster-source.com/?p=5252</guid>
		<description><![CDATA[List.js is a tiny (five kilobytes!) library that can add dynamic sorting, searching and pagination to HTML lists and tables. It requires no dependencies, and claims to be able to handle lists with &#8220;thousands of items.&#8221; It also includes a templating system that makes it possible to allow the addition and editing of items, a [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><a href="http://listjs.com/">List.js</a> is a tiny (five kilobytes!) library that can add dynamic sorting, searching and pagination to HTML lists and tables. It requires no dependencies, and claims to be able to handle lists with &#8220;thousands of items.&#8221;</p>
<p>It also includes a templating system that makes it possible to allow the addition and editing of items, a pagination plugin, and a plugin that adds <a href="http://listjs.com/examples/fuzzy-search">fuzzy search</a>. (Also, they get bonus points for using characters from <a href="http://en.wikipedia.org/wiki/The_Secret_of_Monkey_Island"><em>The Secret of Monkey Island</em></a> as an example.)</p>
<p>The script looks very promising, though there is one caveat about the file size claim: the minified version is 5kb when served with gzip compression. If, for whatever reason, your server is not configured to do so, then it&#8217;s more to the order of 15kb. Still small, but not quite as amazingly so.</p>
<p><a href="http://listjs.com">List.js</a> [listjs.com]</p>
]]></content:encoded>
			<wfw:commentRss>https://www.webmaster-source.com/2013/12/11/list-js-table-and-list-sorting-in-5kb-of-javascript/feed/</wfw:commentRss>
		<slash:comments>52</slash:comments>
		</item>
		<item>
		<title>HTML and CSS: Develop with Tomorrow&#8217;s Standards Today by Brian P. Hogan</title>
		<link>https://www.webmaster-source.com/2013/04/03/html-and-css-develop-with-tomorrows-standards-today-by-brian-p-hogan/</link>
		<comments>https://www.webmaster-source.com/2013/04/03/html-and-css-develop-with-tomorrows-standards-today-by-brian-p-hogan/#comments</comments>
		<pubDate>Wed, 03 Apr 2013 11:04:49 +0000</pubDate>
		<dc:creator><![CDATA[Matt]]></dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[(x)html]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[review]]></category>

		<guid isPermaLink="false">http://www.webmaster-source.com/?p=5045</guid>
		<description><![CDATA[I recently unearthed a review copy of a book that somehow got lost in the shuffle a couple of years ago, HTML5 and CSS3: Develop with Tomorrow&#8217;s Standards Today by Brian P. Hogan, which is too bad, since it&#8217;s one of the better books I&#8217;ve seen on the subject. It&#8217;s a comprehensive primer on the [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><img style=' float: right; padding: 4px; margin: 0 0 2px 7px;'  class="alignright size-full wp-image-5046" alt="HTML5 and CSS3: Develop with Tomorrow's Standards Today" src="//www.webmaster-source.com/wp-content/uploads/2013/03/brianhogan-html5css3book.png" width="200" height="240" />I recently unearthed a review copy of a book that somehow got lost in the shuffle a couple of years ago,<a href="http://www.amazon.com/gp/product/1934356689/webmasterso0d-20"><em> HTML5 and CSS3: Develop with Tomorrow&#8217;s Standards Today</em></a> by Brian P. Hogan, which is too bad, since it&#8217;s one of the better books I&#8217;ve seen on the subject. It&#8217;s a comprehensive primer on the changes in HTML5 and CSS3. I enjoyed reading through the book after I unburied it last week.</p>
<p>It features a chapter on logically marking up page structure with the new semantic tags (<code>header</code>, <code>nav</code>, <code>section</code>, <code>article</code>, etc.), which explains the contexts they should be used in with a hands-on example of restructuring a blog without excessive divs. A lot of online tutorials make the error of suggesting the <code>aside</code> element for a blog sidebar, which the book helpfully points out as wrong. The <code>section</code> element is the proper tag for the job, as it denotes an arbitrary section of the page, whereas <code>aside</code> is for broken-out sections of your article content, such as pullquotes or diagrams.</p>
<p>From there the author moves on to some CSS3 tricks using newly-added selectors. He shows some simple methods to add zebra-striping to tables with pseudo-classes and add visible URLs to links via a print stylesheet with <code>:after</code>. There&#8217;s a brief section demonstrating media queries, as well some on the new JavaScript APIs—localStorage and history pushState, for example. There&#8217;s even a bit on using cache manifests to set up offline access.</p>
<p>Oh, and the deprecations. HTML5 deprecates a good many tags and attributes. There is a section listing those, as well as some modern alternatives, such as opening links in new windows without the deprecated <code>target</code> attribute. It can be done cleanly and semantically by using JavaScript, without impacting the user&#8217;s ability to middle-click a link and open a new tab&#8230;which far too many sites <em>still</em> do today. If you do that, you need to read this book just for that reason.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.webmaster-source.com/2013/04/03/html-and-css-develop-with-tomorrows-standards-today-by-brian-p-hogan/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Handling File Uploads with PHP</title>
		<link>https://www.webmaster-source.com/2012/07/17/handling-file-uploads-with-php/</link>
		<comments>https://www.webmaster-source.com/2012/07/17/handling-file-uploads-with-php/#comments</comments>
		<pubDate>Tue, 17 Jul 2012 11:54:31 +0000</pubDate>
		<dc:creator><![CDATA[Matt]]></dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[(x)html]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.webmaster-source.com/?p=4747</guid>
		<description><![CDATA[So you want to add a file uploader to your site. It&#8217;s quite easy to do with PHP, but first you must understand the inherent risks. You&#8217;re going to allow just anyone to take a file and put it on your server. That file could be anything. It could be an image like you may [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><img style=' float: right; padding: 4px; margin: 0 0 2px 7px;'  src="//www.webmaster-source.com/wp-content/uploads/2012/07/file_upload_sketch_icon.png" alt="" title="File Upload" width="128" height="128" class="alignright size-full wp-image-4752" />So you want to add a file uploader to your site. It&#8217;s quite easy to do with PHP, but first you must understand the inherent risks. You&#8217;re going to allow just anyone to take a file and put it on your server. That file could be anything. It could be an image like you may intend, or someone could get clever and try to upload a malicious PHP script, which could then be run when called by the appropriate URL. Or a user could upload larger files than you intended and waste your server&#8217;s storage space. (This is assuming you intend to have a public-facing uploader, of course. It&#8217;s less of an issue if its a back-end feature.)</p>
<p>Let&#8217;s start with the basics of setting up the form, and handling the uploaded file. Then we can tackle some of the security issues.</p>
<p>For the upload to work, you must add <code>enctype="multipart/form-data"</code> to your <code>form</code> tag. This signals that the POST request will contain upload data as well as the form field values.</p>
<p>Among fields you&#8217;ll need are a hidden field named <code>MAX_FILE_SIZE</code>, which tells the client not to accept a file over a certain number of bytes (300000, or 300 kilobytes, in this example) as well as the file upload field itself.<span id="more-4747"></span></p>
<pre class="brush: xml; title: ; notranslate">
&lt;form method=&quot;post&quot; enctype=&quot;multipart/form-data&quot;&gt;
	&lt;input type=&quot;hidden&quot; name=&quot;MAX_FILE_SIZE&quot; value=&quot;300000&quot; /&gt;
	&lt;input type=&quot;file&quot; id=&quot;myupload&quot; name=&quot;myupload&quot; /&gt;
	&lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;Submit&quot; /&gt;
&lt;/form&gt;
</pre>
<p>This form is going to submit to itself (that is, the PHP file that outputs the form is also the script that processes the data) so it is unnecessary to specify an <code>action</code> value for the form.</p>
<p>The code that processes the upload is actually just a couple lines. The rest is error-checking.</p>
<pre class="brush: php; title: ; notranslate">
if ($_POST['submit']) { //If the form was submitted, commence doing stuff

	if ($_FILES['myupload']['error'] != 0) {
		//The upload failed for some reason, so output a human-friendly error message for the corresponding error number.
		$errcode = array(
			&quot;No errors&quot;,
			&quot;File exceeded the PHP INI upload_max_filesize value.&quot;,
			&quot;File exceeded the maximum allowed size.&quot;,
			&quot;Partial upload.&quot;,
			&quot;No file uploaded.&quot;,
			&quot;UPLOAD_ERR_NO_TMP_DIR&quot;,
			&quot;UPLOAD_ERR_CANT_WRITE&quot;,
			&quot;UPLOAD_ERR_EXTENSION&quot;,
			&quot;UPLOAD_ERR_EMPTY&quot;
		);
		$error = $errcode[$_FILES['myupload']['error']];
		echo &quot;Error: &quot; . $error;
	}
	else {
		//No errors, so we can move the uploaded file to our uploads directory
		move_uploaded_file($_FILES['myupload']['tmp_name'], &quot;./uploads/&quot;.$_FILES['myupload']['name']);
		unset($_FILES);
	}

}
</pre>
<p>The most important part here is the <a href="http://php.net/manual/en/function.move-uploaded-file.php"><code>move_uploaded_file()</code></a> function, which does what it says on the box. The first argument is the temporary path of the uploaded file (which $_FILES[&#8216;myupload&#8217;][&#8216;tmp_name&#8217;] contains) and the second is the destination. In the example, I set it to use the name of the uploaded file (you may want to rename it) and put it in <code>./uploads</code>.</p>
<p>That should be enough for a basic file uploader, but it does absolutely nothing to check that the uploaded data is what you&#8217;re expecting. It could be exploited terribly easily.</p>
<p>To combat abuse, you should add some checks. A couple of good things to look for are:</p>
<ul>
<li>The MIME type. Inspect the uploaded file and make sure it&#8217;s an image file (or whatever kind of document you&#8217;re wanting).</li>
<li>The existence of &#8220;.php&#8221; in the filename.</li>
</ul>
<p>It&#8217;s also a good idea for you to set the permissions of your uploads folder to disallow execution of shell scripts.</p>
<p><a href="http://www.webmaster-source.com/2012/07/10/find-an-images-dimensions-and-mime-type-with-php/">Checking the MIME type</a> of an image is surprisingly easy, since there&#8217;s a handy function built-in to retrieve that information from a valid image file.</p>
<pre class="brush: php; title: ; notranslate">
$imgdata = getimagesize($_FILES['myupload']['tmp_name']);
if (!in_array($imgdata['mime'], array( 'image/gif', 'image/png', 'image/jpeg', 'image/pjpeg' ))) {
	//This isn't an image file. Better display an error and NOT move the image to its permanent spot. The temp file will be deleted automatically.
}
</pre>
<p>Preventing PHP files from being uploaded, fortunately, doesn&#8217;t require a scary Regular Expression. You can just use <code>strpos()</code> to check for the presence of a substring.</p>
<pre class="brush: php; title: ; notranslate">
if (strpos(strtolower($_FILES['ad_img']['name']), '.php') !== false) {
	//Stop right there. Why does an image file have '.php' in it?
}
</pre>
<p>That&#8217;s enough to discourage your average script kiddie, though someone with real skill might be able to find a way to get around such checks. If anybody has something to add, I&#8217;d like to hear it.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.webmaster-source.com/2012/07/17/handling-file-uploads-with-php/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Pure CSS Blockquote Styling</title>
		<link>https://www.webmaster-source.com/2012/04/24/pure-css-blockquote-styling/</link>
		<comments>https://www.webmaster-source.com/2012/04/24/pure-css-blockquote-styling/#comments</comments>
		<pubDate>Tue, 24 Apr 2012 11:53:50 +0000</pubDate>
		<dc:creator><![CDATA[Matt]]></dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[(x)html]]></category>
		<category><![CDATA[blockquote]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[CSS3]]></category>

		<guid isPermaLink="false">http://www.webmaster-source.com/?p=4604</guid>
		<description><![CDATA[Ever since the days of print, it has been common to style quotations and cover blurbs with oversized quotation marks floating along the left side. The practice is alive and well in the internet age, though the technique usually used is a background image. It&#8217;s 2012, already! Why are we still relying on pictures of [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Ever since the days of print, it has been common to style quotations and cover blurbs with oversized quotation marks floating along the left side. The practice is alive and well in the internet age, though the technique usually used is a background image.</p>
<p>It&#8217;s 2012, already! Why are we still relying on pictures of typographical symbols? Let&#8217;s do it with the power of CSS!</p>
<p><a href="http://www.webmaster-source.com/static/demos/pure-css-blockquotes.php"><img style=' display: block; margin-right: auto; margin-left: auto;'  class="aligncenter  wp-image-4605" title="Yep, this is 100% CSS-styled text...that I took a screenshot of. Not ironic at all. ;)" src="//www.webmaster-source.com/wp-content/uploads/2012/04/pure-css-blockquotes.png" alt="" width="614" height="249" /></a>Let&#8217;s start with some simple HTML. Before we can style anything, we need to create our blockquote. While we&#8217;re at it, a <code>cite</code> element is a nice, semantic way to attribute the quote to its originator.<span id="more-4604"></span></p>
<pre class="brush: xml; title: ; notranslate">
&lt;blockquote&gt;
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris eget leo nunc, nec tempus mi? Curabitur id nisl mi, ut vulputate urna. Quisque porta facilisis tortor, vitae bibendum velit fringilla vitae! Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris eget leo nunc, nec tempus mi? Curabitur id nisl mi, ut vulputate urna. Quisque porta facilisis tortor, vitae bibendum velit fringilla vitae!
&lt;cite&gt;Somebody famous&lt;/cite&gt;
&lt;/blockquote&gt;
</pre>
<p>Now some CSS to provide some basic styling for the blockquote. Leaving the default browser style isn&#8217;t going to look great, so we&#8217;ll use a largish serif font with a little extra line spacing. And a slightly lighter color. Extra-dark grey adds a subtle variation from your main body text.</p>
<pre class="brush: css; title: ; notranslate">
blockquote {
font-family: Georgia, serif;
font-size: 18px;
font-style: italic;
width: 500px;
margin: 0.25em 0;
padding: 0.25em 40px;
line-height: 1.45;
position: relative;
color: #383838;
}
</pre>
<p>Now for the fun part: the giant quotation mark. The <code>:before</code> pseudo-element can be used to dynamically insert content before the text of the element, and style the content you insert. This is great for decorative text, like stylistic curly-quotes. The trick is to use an escaped hexadecimal representation of the desired character, and a little bit of fiddly positioning stuff to make it sit in the right position.</p>
<pre class="brush: css; title: ; notranslate">
blockquote:before {
display: block;
content: &quot;\201C&quot;;
font-size: 80px;
position: absolute;
left: -20px;
top: -20px;
color: #7a7a7a;
}
</pre>
<p>That&#8217;s the most difficult part. You may have to experiment with the size and positioning until it looks right, though. Once everything looks nice, you can apply the same technique to style the citation. Using the <code>:before</code> pseudo-element, you can insert an em dash and a space before the text.</p>
<pre class="brush: css; title: ; notranslate">
blockquote cite {
color: #999999;
font-size: 14px;
display: block;
margin-top: 5px;
}

blockquote cite:before {
content: &quot;\2014 \2009&quot;;
}
</pre>
<p>Easy, isn&#8217;t it? The effect should work in all modern browsers, and IE8. (IE8 will only process the pseudo-element if your document has a doctype declared, but you should have one of those already&#8230;) In browsers that don&#8217;t support it, the added content simply won&#8217;t appear, leaving the main text of the blockquote (and the citation) intact. The other styling will remain, of course, so it should still look good enough.</p>
<p>You can <a href="http://www.webmaster-source.com/static/demos/pure-css-blockquotes.php">see a live demo here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.webmaster-source.com/2012/04/24/pure-css-blockquote-styling/feed/</wfw:commentRss>
		<slash:comments>56</slash:comments>
		</item>
		<item>
		<title>Thinking Async</title>
		<link>https://www.webmaster-source.com/2012/03/16/thinking-async/</link>
		<comments>https://www.webmaster-source.com/2012/03/16/thinking-async/#comments</comments>
		<pubDate>Fri, 16 Mar 2012 11:28:03 +0000</pubDate>
		<dc:creator><![CDATA[Matt]]></dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[(x)html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Optimization]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://www.webmaster-source.com/?p=4554</guid>
		<description><![CDATA[I&#8217;ve written about loading JavaScript asynchronously in the past, as it&#8217;s a great way to decrease load times and prevent hang-ups when third-party scripts don&#8217;t load properly. But Chris Coyier has went and compiled the definitive guide. It covers the basic concepts and reasons for doing it, as well as different methods for implementing it; [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve written about <a href="http://www.webmaster-source.com/2010/06/07/loading-javascript-asynchronously/">loading JavaScript asynchronously</a> in the past, as it&#8217;s a great way to decrease load times and prevent hang-ups when third-party scripts don&#8217;t load properly. But Chris Coyier has went and compiled <a href="http://css-tricks.com/thinking-async/">the definitive guide</a>. It covers the basic concepts and reasons for doing it, as well as different methods for implementing it; the easy HTML5 way and using embedded scripts to inject a non-blocking call to an external script.</p>
<p>Its a nice long and informative article, and worth a look if you&#8217;re looking to do some performance optimization of web site. (Be sure to <a href="http://www.webmaster-source.com/2009/11/06/learning-css-sprites/">look into sprites</a> after you&#8217;ve switched to loading JavaScript asynchronously!)</p>
<p><a href="http://css-tricks.com/thinking-async/">Thinking Async</a> [CSS-Tricks]</p>
]]></content:encoded>
			<wfw:commentRss>https://www.webmaster-source.com/2012/03/16/thinking-async/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JSFiddle: A Playground for Web Developers</title>
		<link>https://www.webmaster-source.com/2012/01/05/jsfiddle-a-playground-for-web-developers/</link>
		<comments>https://www.webmaster-source.com/2012/01/05/jsfiddle-a-playground-for-web-developers/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 12:01:33 +0000</pubDate>
		<dc:creator><![CDATA[Matt]]></dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[(x)html]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.webmaster-source.com/?p=4420</guid>
		<description><![CDATA[JSFiddle is a sort of interactive pastebin site that I&#8217;ve been finding useful lately. It features three panes for entering HTML, CSS and JavaScript, and a fourth where the resulting output is rendered. If you save the workspace, it generates a URL like http://jsfiddle.net/fLP64/ and will even save each revision as you update it. You [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><a href="http://jsfiddle.net/">JSFiddle</a> is a sort of interactive <a href="http://en.wikipedia.org/wiki/Pastebin">pastebin</a> site that I&#8217;ve been finding useful lately. It features three panes for entering HTML, CSS and JavaScript, and a fourth where the resulting output is rendered. If you save the workspace, it generates a URL like <code>http://jsfiddle.net/fLP64/</code> and will even save each revision as you update it. You can share the URL to show off the result, and the other user can play with the code as well.</p>
<p>This is great for two scenarios. You can use it to experiment with a bit of CSS or JavaScript for brainstorming purposes, or you can use it if you need to ask someone for help. (It&#8217;s a lot easier to figure out what&#8217;s going wrong with someone&#8217;s code or markup if you can jump right in and start messing with the code.) Chris Coyier (of <a href="http://css-tricks.com/">CSS-Tricks</a>) uses it all the time to show off CSS experiments that will likely be used in future posts of his.</p>
<p style="text-align: center;"><a href="http://jsfiddle.net/fLP64/"><img style=' display: block; margin-right: auto; margin-left: auto;'  class="aligncenter size-full wp-image-4421 imgborder" title="JSFiddle" src="//www.webmaster-source.com/wp-content/uploads/jsfiddle.png" alt="" width="600" height="288" /></a></p>
]]></content:encoded>
			<wfw:commentRss>https://www.webmaster-source.com/2012/01/05/jsfiddle-a-playground-for-web-developers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML5 Data Attributes</title>
		<link>https://www.webmaster-source.com/2011/11/21/html5-data-attributes/</link>
		<comments>https://www.webmaster-source.com/2011/11/21/html5-data-attributes/#comments</comments>
		<pubDate>Mon, 21 Nov 2011 11:31:38 +0000</pubDate>
		<dc:creator><![CDATA[Matt]]></dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[(x)html]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.webmaster-source.com/?p=4403</guid>
		<description><![CDATA[Have you ever looked at the HTML snippet for Twitter&#8217;s Tweet button and wondered what those data-something="loremipsum" attributes were? I did too, and after a bit of Google searching, I found a post by John Resig (the creator of jQuery) that explains that they&#8217;re something called data attributes. A new feature in HTML5, they provide [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Have you ever looked at the HTML snippet for Twitter&#8217;s <a href="https://twitter.com/about/resources/tweetbutton">Tweet button</a> and wondered what those <code>data-something="loremipsum"</code> attributes were?</p>
<pre class="brush: xml; title: ; notranslate">
&lt;a href=&quot;https://twitter.com/share&quot; data-count=&quot;vertical&quot; data-via=&quot;redwall_hp&quot;&gt;Tweet&lt;/a&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;//platform.twitter.com/widgets.js&quot;&gt;&lt;/script&gt;
</pre>
<p>I did too, and after a bit of Google searching, I found a post by John Resig (the creator of jQuery) that explains that they&#8217;re something <a href="http://ejohn.org/blog/html-5-data-attributes/">called data attributes</a>.</p>
<p>A new feature in HTML5, they provide a way to embed data in an element and access it from a script. (An accompanying JavaScript API makes it very easy to retrieve the data.)</p>
<p><a href="http://ejohn.org/blog/html-5-data-attributes/">HTML 5 data- Attributes</a> [John Resig]</p>
]]></content:encoded>
			<wfw:commentRss>https://www.webmaster-source.com/2011/11/21/html5-data-attributes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Awesome Firebug Tricks You May Have Missed</title>
		<link>https://www.webmaster-source.com/2011/11/14/awesome-firebug-tricks-you-may-have-missed/</link>
		<comments>https://www.webmaster-source.com/2011/11/14/awesome-firebug-tricks-you-may-have-missed/#comments</comments>
		<pubDate>Mon, 14 Nov 2011 12:18:01 +0000</pubDate>
		<dc:creator><![CDATA[Matt]]></dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[(x)html]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[Firebug]]></category>
		<category><![CDATA[firefox]]></category>

		<guid isPermaLink="false">http://www.webmaster-source.com/?p=4396</guid>
		<description><![CDATA[Firebug is probably the most invaluable tool in my web development arsenal. (Well, aside from Photoshop. But that has a value: freaking expensive.) I&#8217;m not terribly picky about my text editor—after all, I used Notepad for years—though BBEdit is my tool of choice. I still haven&#8217;t found anything that works nearly as well as Firebug, [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.webmaster-source.com/wp-content/uploads/firebug-logo.png"><img style=' float: right; padding: 4px; margin: 0 0 2px 7px;'  class="alignright size-full wp-image-4397 imgborder" title="Firebug" src="//www.webmaster-source.com/wp-content/uploads/firebug-logo.png" alt="" width="200" height="61" /></a><a href="http://getfirebug.com/">Firebug</a> is probably the most invaluable tool in my web development arsenal. (Well, aside from Photoshop. But that has a value: freaking expensive.) I&#8217;m not terribly picky about my text editor—after all, I used Notepad for years—though BBEdit is my tool of choice. I still haven&#8217;t found anything that works nearly as well as Firebug, and that&#8217;s probably the biggest reason why I couldn&#8217;t give up Firefox for Chrome.</p>
<p>Everyone who uses Firebug regularly knows the basics. They know how to inspect and edit HTML and CSS, analyze page loading times and the like. There are a few neat tricks, though, that aren&#8217;t quite immediately apparent, but are very handy.<span id="more-4396"></span></p>
<h3>Quickly Copy a Background URL</h3>
<p><img style=' float: right; padding: 4px; margin: 0 0 2px 7px;'  class="alignright size-full wp-image-4398 imgborder" title="Copying a background image in Firebug" src="//www.webmaster-source.com/wp-content/uploads/firebug-copybackground.png" alt="" width="167" height="132" />I like to play around with background images when I&#8217;m experimenting with a design or learning from someone else&#8217;s. This often involves copying the URL of a background image from one element and pasting it to another. It&#8217;s a pain to carefully select the URL portion of a shorthand background attribute, which is what I did until recently. As it turns out, you can just right-click the attribute and choose &#8220;Copy Image Location&#8221; or &#8220;Open Image in New Tab.&#8221; Palm, meet forehead.</p>
<h3>Specify a Pseudo-element</h3>
<p>If you hover over a link (or any element with a :hover pseudo-element) while Firebug is open, the right-hand pane updates to show the relevant CSS. Wouldn&#8217;t it be useful if it didn&#8217;t disappear as soon as you moved the mouse? Fortunately, you can lock the hover state with the little dropdown arrow on the Style tab. Just put a check mark next to the &#8220;:hover&#8221; option.</p>
<h3>See the <em>Exact</em> Style Applied to an Element</h3>
<p>Next to the Style tab in the right-hand pane is one labeled Computed. This is useful for working out cascading issues, or checking the exact dimensions of an element.</p>
<h3>Console Logging</h3>
<p>Instead of spamming alert() dialogs across your screen when you&#8217;re debugging JavaScript, you can use Firebug&#8217;s Console tab instead. Calling the console.log() function will output whatever you pass to it in the Console tab. e.g. console.log(&#8216;hi&#8217;). There&#8217;s <a href="http://getfirebug.com/logging">a page about it</a> on the Firebug website.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.webmaster-source.com/2011/11/14/awesome-firebug-tricks-you-may-have-missed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding and Tracking Social Buttons</title>
		<link>https://www.webmaster-source.com/2011/07/15/adding-and-tracking-social-buttons/</link>
		<comments>https://www.webmaster-source.com/2011/07/15/adding-and-tracking-social-buttons/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 11:24:36 +0000</pubDate>
		<dc:creator><![CDATA[Matt]]></dc:creator>
				<category><![CDATA[Social Media]]></category>
		<category><![CDATA[(x)html]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[widgets]]></category>

		<guid isPermaLink="false">http://www.webmaster-source.com/?p=4140</guid>
		<description><![CDATA[It seems like every website has social media buttons on them now. The ones leading the pack of late seem to be Twitter, Google +1 and the Facebook Like widget. This introduces one problem: loading times. Your pages are calling JavaScript files hosted on remote servers, bogging them down a bit. Joost de Valk has [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>It seems like every website has social media buttons on them now. The ones leading the pack of late seem to be Twitter, Google +1 and the Facebook Like widget. This introduces one problem: loading times. Your pages are calling JavaScript files hosted on remote servers, bogging them down a bit.</p>
<p>Joost de Valk has put together <a href="http://yoast.com/social-buttons/">a good tutorial on how to fix that issue</a>. It features code snippets that will load the widget JavaScript asynchronously, keeping the buttons from holding up the page loading. Also, it even adds Google Analytics and Clicky tracking so you can tell if people are actually using your buttons.</p>
<blockquote><p>When Google released +1, I quickly identified <a href="http://yoast.com/plus-one-google-analytics/">how to track interaction with that button</a>.  The obvious &#8220;follow up&#8221; was questions from people on how to track  interaction with other buttons. Not for each of these social buttons  tracking of interaction is actually possible. It depends on how the  button was designed whether this will work or not. I got it working for  Twitter and Facebook, so I&#8217;ll share the code for tracking interaction  with their respective social buttons below.</p></blockquote>
<p><a href="http://yoast.com/social-buttons/">Social Buttons: Adding them to your site &amp; Tracking them</a> [Yoast]</p>
]]></content:encoded>
			<wfw:commentRss>https://www.webmaster-source.com/2011/07/15/adding-and-tracking-social-buttons/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/


Served from: www.webmaster-source.com @ 2026-05-15 21:31:36 by W3 Total Cache
-->