{"id":957,"date":"2014-05-28T11:51:13","date_gmt":"2014-05-28T15:51:13","guid":{"rendered":"http:\/\/novicenolonger.com\/?p=957"},"modified":"2014-05-28T13:34:15","modified_gmt":"2014-05-28T17:34:15","slug":"always-use-the-img-tag-alt-attribute","status":"publish","type":"post","link":"https:\/\/novicenolonger.com\/always-use-the-img-tag-alt-attribute\/","title":{"rendered":"Why you should always use the alt attribute"},"content":{"rendered":"

\"Google<\/p>\n

I noticed something strange this week when I was looking at my blog stats: I was getting traffic through direct referral from BuzzFeed.<\/p>\n

How odd, I thought. What on Novice No Longer could possibly be relevant to BuzzFeed?<\/p>\n

It wasn’t my homepage that was linked, but a specific article: Getting a busy and being social for the socially awkward<\/a>.<\/p>\n

The link was from an article titled\u00a028 Problems Every Type-A Person Will Understand<\/a>. It wasn’t until I viewed the article and got to number 18 that I realized the relevance \u2014 they weren’t linking to my article exactly, but to an image<\/em> that I used in the article. They just wanted a picture of a busy calendar, which I included in my post.<\/p>\n

I headed over to Google (using incognito) and did an image search for the words “busy calendar.” The picture from my blog that BuzzFeed used in its post\u00a0was the first\u00a0result<\/strong>.<\/p>\n

So how did I get a picture for my blog to be the top image search\u00a0result for a fairly common phrase (which ultimately resulted in\u00a0a link from BuzzFeed)?<\/p>\n

The answer is simple: alt attributes.<\/p>\n

The alt\u00a0attribute<\/h2>\n

The alt attribute\u00a0is part of an img\u00a0tag that allows you to tell a\u00a0search engine the exact contents of your image. It’s also important for users who use\u00a0accessibility features to browse the internet, and is thus required in proper HTML5. Despite these requirements, however, img tags still work perfectly fine without an alt attribute and a vast majority of online publishers don’t bother writing an alt description.<\/p>\n

This is fantastic news for us. Their bad practices mean fantastic opportunities for everyone else.<\/p>\n

It may be hard to get on\u00a0the first page of a traditional Google search, but it’s still fairly easy to rank high for image searches. Just make sure every image you post has both a brief descriptive file name and a proper alt attribute.<\/p>\n

Using the alt attribute<\/h2>\n

In order to insert an image into a webpage, you need to use the img\u00a0tag.\u00a0The img\u00a0tag works perfectly fine without an alt attribute, and looks something like this:<\/p>\n

<img src=\"\/busy-calendar.jpg\" \/><\/code><\/p>\n

Assuming you have a jpg file titled busy-calendar at the appropriate directory, this image will display\u00a0just fine. You’ll also notice that the file is titled “busy-calendar,” which briefly describes exactly what the image is. This is key.<\/p>\n

But the alt attribute lets us take this a step further. Let’s look at the same img\u00a0tag with an appropriate alt attribute:<\/p>\n

<img src=\"\/busy-calendar.jpg\" alt=\"Dann's busy Google calendar\" \/><\/code><\/p>\n

The file name is short and sweet, but the alt attribute allows us to go into a little bit more detail. We’re able to include who’s calendar we’re looking at (mine) as well as what calendar application is displayed (Google Calendar).<\/p>\n

It would be unnecessary and bad practice to make the file dann-busy-google-calendar.jpg, even though all the information is relevant. You should keep the file name as short as possible, and then use the alt attribute to flesh out the description\u00a0a bit.<\/p>\n

It seems simple, but so many people omit the alt attribute that it can prove extremely valuable when used correctly. You’ll be surprised how much traffic you’ll get from Google’s image search, and you never know when you’ll get a valuable link from a high authority domain simply for posting\u00a0a great image.<\/p>\n\n

<\/div>","protected":false},"excerpt":{"rendered":"

I noticed something strange this week when I was looking at my blog stats: I was getting traffic through direct referral from BuzzFeed. How odd, I thought. What on Novice No Longer could possibly be relevant to BuzzFeed? It wasn’t my homepage that was linked, but a specific article: Getting a busy and being social […]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[24],"tags":[189,109,40,85,45,134,84,188,43],"jetpack_publicize_connections":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p46r0N-fr","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/novicenolonger.com\/wp-json\/wp\/v2\/posts\/957"}],"collection":[{"href":"https:\/\/novicenolonger.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/novicenolonger.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/novicenolonger.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/novicenolonger.com\/wp-json\/wp\/v2\/comments?post=957"}],"version-history":[{"count":7,"href":"https:\/\/novicenolonger.com\/wp-json\/wp\/v2\/posts\/957\/revisions"}],"predecessor-version":[{"id":967,"href":"https:\/\/novicenolonger.com\/wp-json\/wp\/v2\/posts\/957\/revisions\/967"}],"wp:attachment":[{"href":"https:\/\/novicenolonger.com\/wp-json\/wp\/v2\/media?parent=957"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/novicenolonger.com\/wp-json\/wp\/v2\/categories?post=957"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/novicenolonger.com\/wp-json\/wp\/v2\/tags?post=957"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}