New book on WordPress Theme Development: WordPress Themes In Depth
attribute
Tag Archive

Targeting External Links Intelligently

In the beginning… In the time of the dinosaurs, HTML authors controlled the way anchors opened by adding target=”_blank” as an attribute on an anchor tag. Then the molten mass of Internet began to cool into the thin crust of Web 2.0, the continents began to separate and there came a great migration of pages from HTML to the shinier, new XHTML. Most authors didn’t know what that meant, but it had an “X” in it, so it must be cool, they thought. Alas, there came a great despair as the beloved target=”_blank” attribute was no longer looked kindly upon […] Read more »

How to Add Meta Noindex to Your Feeds

Want to make sure that your feeds are not indexed by Google and other compliant search engines? Add the following code to the channel element of your XML-based (RSS, etc.) feeds: <xhtml:meta xmlns:xhtml=”http://www.w3.org/1999/xhtml” name=”robots” content=”noindex”></xhtml:meta> Here is an example of how I use this tag for Perishable Press feeds (vertical spacing added for emphasis): Read more »

Open External Links as Blank Targets via Unobtrusive JavaScript

Beginning with this article, I am serving up a short series of unobtrusive JavaScript functions that I use to enhance the functionality of Perishable Press. In this post, I present a comprehensive JavaScript method of opening external links in new windows (or tabs, depending on the browser). One way of opening links in new windows is to insert the HTML target=”_blank” attribute into all necessary anchor elements (<a href=””></a>). This method works well, but generates validation errors when used with XHTML-Strict doctypes. A better solution is to employ some unobtrusive JavaScript to progressively enhance your documents with “blank-target” functionality. Using […] Read more »

Repenting of My Nofollow Sins

Hello, my name is Jeff and I am nofollow addict. When I first began Perishable Press two years ago, in August of 2005, WordPress quickly became my blogging platform of choice. Everything about WordPress was great, so I had no trouble overlooking a few seemingly insignificant quirks, such as the nofollow attributes that are automatically applied to all comment links. In fact, at first, I really had no idea what they were or how they affected my site. Eventually, as I began delving deeper into the Blogosphere, I realized that those harmless-looking nofollow tags were considered by many to be […] Read more »

The Friendliest Link Targets in the Neighborhood

The target attribute for anchor elements (<a></a>) specifies the location in which the referenced document should load. For example, to open a link in a new window, we would use a target value of _blank. Although this is a commonly employed technique, the target attribute has been deprecated by the W3C and is not valid (X)HTML. Regardless, the target element remains a useful tool for practicing designers and developers. Here, we present the attribute values for the target element: Read more »

Embed QuickTime Notes Plus

This post contains random notes for embedding QuickTime within web pages. QuickTime Embed Attributes via CSS <style> <!– embed, .embed { pluginspage: http://www.apple.com/quicktime/download/; controller: false; autoplay: true; bgcolor: #000; loop: true; } //–> </style> Read more »

Embed Flash and Video via the object Tag

Embed Windows Media Player via the object tag Here is the general format for including .wmv files in web pages: <object type=”video/x-ms-wmv” data=”http://www.domain.com/path/to/winmovie.wmv” width=”340″ height=”280″> <param name=”src” value=”http://www.domain.com/path/to/winmovie.wmv” /> <param name=”controller” value=”true” /> <param name=”autostart” value=”true” /> </object> Read more »

Firefox CSS Magic

Consider this post an evolving receptacle for Firefox-specific CSS tricks. Change the color of highlighted text *::-moz-selection { background: #FF3C00; /* the background color of the highlight */ color: #FFF; /* the color of the text within the highlight */ } Change the opacity of an element div#division { /* choose either attribute */ -moz-opacity: 0.99; /* possible values: 0-1 */ -moz-opacity: 99%; /* possible values: 0%-99% */ } Control item selection of an element div#division { /* choose one of the following values */ -moz-user-select: none; /* no content within the element may be selected */ -moz-user-select: all; /* […] Read more »

Exploring the (X)HTML Link Element

Most Web authors are familiar with the <link> element included within the <head> element of many (X)HTML documents. The <link> element enables authors to associate external resources to the (X)HTML document. <link> element references include various types of metadata, navigation, and styling information. This brief post provides examples of these and other important uses of the (X)HTML <link> element. <!– indicate the starting location –> <link rel=”start” href=”http://domain.com/directory/” /> <!– indicate the previous item –> <link rel=”prev” href=”http://domain.com/directory/prev/” /> <!– indicate the next item –> <link rel=”next” href=”http://domain.com/directory/next/” /> <!– indicates the index location –> <link rel=”contents” href=”http://domain.com/directory/index.html” /> <!– […] Read more »

A Complete CSS Template File

To help maintain consistency when developing new CSS-styled websites, we have created a complete CSS template file. The file contains every HTML/XHTML tag known to man. This includes tags such as BASEFONT and CENTER, which have been deprecated; tags such as COMMENT and MARQUEE, which are exclusive to Internet Explorer; tags such as SPACER and SERVER, which are exclusive to Netscape Navigator; and even tags such as !DOCTYPE and BASE, which are included merely for the sake of completeness. As CSS selectors, the tags are (almost all) empty, just waiting to be filled with declarations, properties, and values. Tags that […] Read more »

Title Attributes for WordPress Post Navigation

Improve accessibility by adding title attributes to your WordPress userspace. Note: This article applies specifically to WordPress 2.0.2, but may be generalized to any WP 2.0+ version. By default, WordPress navigation links omit the title attributes for both page and post views. Title attributes for links provide additional information that can improve the accessibility of your website. This is especially true when images or text symbols exclusively are used for navigation. To add title attributes to WordPress page-view links (e.g., links for index, archive, and category views), open the file wp-includes/template-functions-links.php and find the functions previous_posts_link (line #494) and next_posts_link […] Read more »

Death to NoFollow

Perishable Press vehemently opposes The great corporate/commercial campaign to implement the rel=”nofollow” anchor. The proposal suggests that use of nofollow will reduce spam and improve search engine results. This couldn’t be further from the truth, regardless of what the commercial giant$ may tell you. Examine these helpful references and see for yourself: The NoNoFollow Group (404 link removed 2012/07/26) Prepare for more comment spam, not less (404 link removed 2014/03/13) Repenting of my nofollow sins Comprehensive Reference for WordPress NoNofollow/Dofollow Plugins Read more »

Latest Tweets Taking some time at the end of the year to recharge, refresh, and renew. Gonna triple my efforts in 2015 :)