Posts Tagged ‘html’

Use your HTML tags properly

Thursday, December 20th, 2007

The myriad of tags that HTML offers are for far more than just styling up a page. Infact, styling up a page should be the farthest thing from your mind when deciding which tag to use for a particular instance. Far too often, I see tags abused and misused, and this misuse of tags can do nothing but harm your search engine placement, especially for a young site that doesn’t have the weight of years to boost it’s placement.

Here are some tips to get the most out of your elements and help the search engines properly identify and categorize your content:

  • Never use <h1>-<h6> elements, unless you are making a header element. If you want large text, use a <span> or <div> and give it a ‘class’ element with some associated CSS stylings to make it big. Using the header tags makes a spider think that is a header and gives it greater weight. Do you really want a site about dog breeding to be categorized under the title ‘Now serving 4 states in the southwest United States!’ when you just wanted that text to be large? If you need help figuring out if your use of headers makes sense, try this experiment…remove everything from your page, except the header elements. Does the page look like a proper table of contents? If the answer is no, then consider changing some out into <div> or <span> tags.
  • Avoid tables! I can’t stress this enough. Let me repeat that a few times…tables are bad. Tables should not be used. Tables are not proper search engine optimization. A table does not tell a search engine how data relates to other pieces of the document. There are exceptions to this rule, but they are often self apparent. If you can’t take the table and put it into a spreadsheet and have it still make sense, it’s no good. The top row should be header elements and each row after should be a record of data with each column matching its header element. The use of <div> based layouts with a heavy reliance on CSS is not only far more coherent for search engines, but also far more flexible for design changes. If you contact a company to build a website for you, make sure to ask if they use table based designs. If so, run to the hills. Or better yet, run to USA SEO Pros, a company that I can confirm does not use table based designs.
  • The <label> tag is an underused element that helps spiders figure out what a form is all about. Each<label> is tied to a single form element through the ‘for’ attribute on the label and the ‘id’ attribute on the form element. You can get quite attractive forms by placing a <label> and <input> inside of a <span> and using some CSS on each element. The span will define the overall size and placement of the <label>/<input> combo, and the CSS on the <label> and <input> can be used to align those properly within the <span>.
  • Another underused set of elements is the <dl>/<dt>/<dd> tags. These are used for defining objects on the page..
    • <dl> is the definition list, which will be the wrapper around the <dt> and <dd>
    • <dt> is definition term. It is usually something short and sweet, like “Name” or “Address”.
    • <dd> is the definition definition. The <dd> that immediately follows the <dt> is assumed to be it’s definition. For instance…<dt>Username</dt><dd>devsteve</dd> would be used to define the username as devsteve.
  • Try to avoid the <br /> tag as much as possible. The break tag is merely used to jump to the next line, which should never be needed if these other tags are properly used with good CSS. <p> tags wrap a paragraph and do an automatic line break at the end, <div> tags have an automatic line break. Any element with the CSS value ‘display:block;’ has a line break. The <br /> tag is forcing an action that should be smooth and automatic.
  • Do not touch the <font> tag! Unlike my advice against using <table>, this one is absolute. There is no exception to this rule. There is no ‘but sometimes its okay’. There is nothing but a slap on the wrist over this one. The <font> tag never should’ve existed in the first place. HTML is not about defining how something looks. The aesthetic qualities of HTML, such as the large font sizes for an <h1> or the bulleted attributes of an <li> were put in place as mere placeholders. CSS is about styling HTML, the HTML itself is defining data. A <ul> tag with its accompanying <li> tags merely says it is a list of items that are not particularly ordered. The font tag tries to place style attributes into the HTML, and that is bad. That is very bad. Anytime you plan to use a <font> tag to style up some text, use <span> instead. Give this span a class, give this class some style. You’ll have more options than <font> and you won’t have people scoff at your work.

I rampantly mention CSS through this list, so for those of you unaware of what CSS is, I highly recommend W3Schools to learn the basics. This site also provides good info on the HTML tags I’ve listed above.

SEO, PHP and RSS

Friday, October 12th, 2007

Developing a site with PHP offers a number of SEO advantages over pure HTML. One of the most major advantages of using a dynamically scripting website is in updating without having to manually write in new content. This can be achieved through something as simple as an RSS feed or as complex as a news site scraper. Search engines notice new content to a page and an RSS feed is a hands-off way to enhance your content and keep it constantly fresh.

RSS stands for Really Simply Syndication, and it is nothing more than a specially formatted XML(eXtensible Markup Language) document. An RSS feed contains updated information from an external site(for instance, the latest news articles from a news website), and an RSS reader parses this XML document into an attractive list of news links that updates as the news site updates. This electronic syndication makes it ultra easy for one website to broadcast information for another website to post snippets of onto it’s own page.

Here are some tips on getting the most out of RSS feeds on your website:

  • Be careful of where you are getting your feeds and what keywords are being used in your feeds. Acronyms are generally a bad idea, because you never know what else the acronym might stand for. For instance, while MLM may mean multi-level marketing to some, others may have less appealing connotations. The RSS feed may pull in some pretty unappetizing links off of an acronym.
  • The more varied of feeds you have, the better, but only so long as they are all inter-related and tie into the page that displays them. Having a single news feed from a single site is too limiting, since all of their articles(or at least, the vast majority) will link you to the same domain - theirs. If you mix and match feeds (and with a solid PHP developer on hand, taking several feeds and blending them into one stream of data is a walk in the park), the greater variety of links will give you a nice boost. Alternatively, you can find a news source that is an aggregate source, that is, someone who merely links all over the place. Google News is one such news source, and when properly formatted into HTML, it’s virtually impossible for a search engine to recognize they all came from the same place.
  • Don’t go overboard with RSS feeds. They are not the be-all-end-all of search engine work. Search engines strive to put the most relevant page on top, not the page that jumps through all of their arbitrary hoops in the goal of being #1. SEO is a balance between tricking the engine into thinking you’re extremely relevant…and actually being as relevant as you can. Static content is a good balance to a dynamic feed. The content is recognized as the central pillar of your page, and the dynamic feed is recognized as shifting data on current stories. If you run a feed on real estate in Alabama, it’s probably a good idea to actually write content on real estate in Alabama to supplement it.
  • Put the RSS output into organized HTML tags. The <h1>-<h6>, <p>, <ul>/<ol>/<li>, and <dl>/<dt>/<dd> tags are there for more than just formatting. Those all mean something. Header 1(most important tag on a page, equivalent to the title of a book) through Header 6(deep subheading, six levels deep of categorization) mean just that. Using these tags for no reason other than their look is not only bad SEO practice, but also misuse of HTML and CSS(use the almighty CSS to do your page styling, not the data-defining HTML). Likewise, a paragraph tag means the search engine expects a paragraph of data, not just something you wanted on it’s own line with a gap above and below. The same goes with unordered lists, ordered lists, list items, definition lists, definition terms and definition definitions. Used properly with your RSS, these tags help the search engine make sense of your content, it knows what’s more important, it knows what the headers are, it knows how to categorize your site.
  • Keep an eye on your feeds to make sure they are still pulling the data you want. This is especially important for a news feed. Let’s say you run a company called Thomas’ Jammies and you sell pajamas. This seems simple enough. You set up your RSS feeds and decide to run your company name through one in case an article ever gets pulled up mentioning you. Well, a small problem arises right around now (mid Oct 07) as Jammie Thomas gets plastered on the news for being convicted of copyright infringement and fined $222,000 in a major case for online file sharing. Now, your feeds are flooded with news articles about the RIAA, Kazaa, Jammie Thomas, and U.S. copyright laws…yet there is not a word on the site about pajamas. If you check up on the feeds about once every other day, you would’ve seen this trickle of news and cut out that link before it became a torrent of completely unrelated content. Most search engine spiders hit about once a week, and you’d really hate if that once a week came during that time period.

With these tips on how to handle an RSS feed onto your site, you should be able to springboard into using RSS effectively. Balance out RSS vs. static content, watch your feeds, output the RSS into appropriate HTML tags, be careful of where you get your feeds, and be careful of what keywords you use in your feeds. Take these pieces of advice to  heart, and you’re halfway to solid, search engine friendly Really Simple Syndication.

Once you’ve got this down, the next step is learning to do more than display another site’s RSS feed in an effective way, and learn to broadcast your own RSS. Any dynamic website can do it, and any PHP developer worth their salt can pull it off fairly easily.