I explain to my design clients over and over how to create a button code, so I thought I would write a post about it.
So you just got a blog makeover and with it came this nifty little button. (Or you got industrious and made your own using my tutorial.) But you aren’t entirely sure what to do with it.
The Code
First, let me explain the basic button code. Here is the code to my Musings of a Housewife button.
<a href=”http://www.musingsofahousewife.com”><img src=”http://i268.photobucket.com/albums/jj12/dcrdesign/SMB.gif”>
Now let’s break it down. There are basically two parts:
Hyperlink Reference: <a href=”http://www.musingsofahousewife.com”>
The hyperlink reference is defined by href. This determines the web page that the button will link to — in this case, Musings of a Housewife.
Image Source: <img src=”http://i268.photobucket.com/albums/jj12/dcrdesign/SMB.gif”>
The image source is defined by img src. This calls up the image from where it is hosted online.
So, let’s use this generic example, and I’ll show you how to create your own working button code. You will replace the parts in bold. Make sure you end the code with </a> because that is how you close the code so that nothing else picks up the hyperlink reference.
<a href=”Web Page URL”><img src=”Image URL”></a>
1) Create the Hyperlink Reference
Replace “Web Page URL” in the hyperlink reference above with the URL of the web page you want your button to link to. Make sure to enclose it in quotes.
2) Create the Image Source Code
Host your image somewhere online. I use Photobucket. Once you’ve uploaded your image, replace “Image URL” in the sample code above with the URL to your image.
3) Insert your new Button Code into the vessel of your choice!
Paste the entire button code into a blog post (in the HTML view, of course) or into a sidebar widget! And you’re good to go.
Troubleshooting
If you have trouble with the button code working, check your quotation marks. You MUST have quotes around the URLs to the web page reference and the image source.
If you do, and it’s still not working, your quotes may have been changed to “smart quotes”. Smart quotes are the curved quotation marks that distinguish an open quote from a close quote. Of course your keyboard does not differentiate, but some computers convert them automatically. HTML does not like smart quotes. HTML wants straight quotes. Because smart quotes are not always so smart and sometimes turn the wrong way, which gets the HTML all befuddled. So. You may need to take the code and put into a TextEdit program and then save it in HTML format, which should make the quotes straight, and then copy and paste the code into your widget. I KNOW. Life is full of inconveniences, though, so get over it.
Now you may be saying, okay, that’s cool. But what’s a button for?
Blog buttons are basically a way to promote a website.
Other uses for buttons are:
1) Blog carnivals. (Like the What I Learned This Week button on my sidebar).
2) Button ads. (See the square ads on my sidebar.)
3) Buttons are used to display that you are a member of a group. (Such as the Frigidaire Test Drive Team button on my sidebar.)
4) Buttons often promote another blog that you write for. (Such as my Chic Critique and Philadelphia Moms Blog buttons.)
5) Design credits. (Such as my DCR Design button.)
See? A myriad of possibilities! Got questions? Leave ‘em in the comments!
If you want to know how to put a button with the code beneath for others to grab, feel free to email me. I have tried to put the code in this post, and the post keeps reading the code and not displaying it properly. :-(
If you liked this post, you may want to subscribe to Musings of a Housewife.
Follow me on Twitter. I'm JoLynneMusings.















{ 3 trackbacks }
{ 35 comments… read them below or add one }
This is awesome! Thanks!
THANK YOU for this. I don’t even have a button and I’m in great need of a blog makeover, so I’m sure this will come in handy.
Why do you use photobucket when you could upload the picture to your own website and not have to rely on a 3rd party. I would think having links to photobucket would slow down the site rendering.
Actually, I was told to host off site so as to not overload my server. This is where I wave a white flag. I don’t understand all that jazz.
Great tutorial! I will have to add this to my list of things to do. See you Saturday!
I think I’ve got all this, but maybe you could do a part two with how to make the little scroll box for the code to share with others. And why do some of them automatically select all when you click on them and others don’t?
I’m sure I could track down the info somewhere but just thought I’d ask in case you were thinking of more posts along this line.
thank you thank you thank you!!!!
I can’t believe I actually did it!!!!
Starting a small biz and had desperately wanted to include buttons to our social networking pages. Your quick and easy ‘how to’ was EXACTLY what I was looking for!!! Thank you!
Are men even allowed in here?… Well I proudly say I have been checking your site for the incredibly useful-yet-easy-to-apply tips!
Your site is both eye and mind pleasing (yep! even a guy can learn here!)…
kudos to a job well done!
Sicerely,
Carlos
Miami, Florida
Dec-2009
Thank you so much for the information on how to create a button and the code.
If I change my template, how much do you think I should change my button? I’d think buttons are another branding tool so am I wrong for thinking that it would be OK to change the colors of my button but not the specific design. Am I way off on this?
Thank you so much, this was really helpful! I am such a dummy when it comes to technical issues, haha:)
Thanks so much!!! I googled, found you, and made my own button with linking code and all!!
Help!!!!! I have been working all weekend on trying to create abutton for my blog and I can’t seem to get it to link back to my blog it opens to photobucket?
Below are my two HTML posts?
AND -
I was hoping you might see where I made my mistake? Or direct me somewhere else.
Thank you, Thank you, Thank you!!!!!!
Debbie
Thank Thank
This was so great and easy to follow. It helped me a ton. This was my first attempt at creating a button and I did it with ease, so thank you very much!
thank you so much for the button info and this article too – they were really helpful and much appreciated. your instructions were clear and simple (perfect for me LOL) now all i need is for someone to see if it works!!! i’m going to try and create a new background now!
Your directions were perfect! Thanks!
I’m looking for a tutorial that puts the code to the right of the button as opposed to under it. Any advice?
Try taking out the paragraph breaks in the middle, between the two sets of code, if that makes sense.
Oi! I can not figure this out! You explained it perfect english and I am completely lost! I sat here for almost an hour going back and forth between my photobucket and blog and your page!!! I just don’t know what to do! How would I take a picture and put fun writing on it? I must not be meant to have a button
…
Are you trying to make a button or the code to put under it? If you are looking to make a button, you need a different post.
Try this one. http://www.musingsofahousewife.com/2009/03/how-to-design-a-blog-button.html
I am getting this error.
Page not found
Sorry, the page you were looking for in the blog Christy’s Coupon Corner does not exist.
The page is the home page. I put in my url in quotes.
http://christyscouponcorner.blogspot.com/
But it still isn’t working! Help!
And how do you put the html under the button to let other people grab your button?
Thanks for your help
I LOVE YOU!
Ok, I’m getting a little carried away. THANK YOU for explaining this in ENGLISH so that I could finally understand- I have been trying to figure out how to do this, but everything I read was like a foreign language! I was almost in tears over it yesterday! I now have a working button and I am SO PSYCHED. Thank you for this awesome tutorial!!!
Thank YOU!!!!!! SO! MUCH!!! Newbie at this blogging stuff but so excited about it! This was extremely helpful! THANK YOU A THOUSAND TIMES OVER!
Thank you so much! I’ve been scouring the internet for information to build my own header & button. I came to the right place & I am so excited. Thank you so much. I’m now subscribed.
Where exactly in the html code should the information go? Also, many buttons have html script to copy & paste in a box so that other users can repost their button. Do you know how to get that? Thanks for your help!!!
Thank you for info!
Here’s the code i’m trying to use…it’s not working…all I get is that little symbol that shows there is supposed to be an image there…not the image. I’m using photobucket’s direct link. I actually want it to link to a different blog, but for now I’m testing it on mine. Help!
Nevermind!! I figured it out! But I would LOVE the code to add the code for others to grab!!
Thank you so much for your page! It helped me create a couple blog buttons and select the one I like best!
Here’s the final product!
you have an awesome blog! I’d love to link it to mine
oops I guess it didn’t post my button jargan …
this doesn’t seem CRazy hard!?!? going to try it this week! you may have an email headed your way with questions!!
thanks!!! !
I am much too right brained for this!! I am getting simlar error messages as the ones mentioned above….also wanting the right coding info for others to get my blog button…I am not sure what to do next…..ugh
Hey- my answer woman to the blogging world! I want to put the code under my button on my blog page so that people can download it and put it on their pages…. how do I get the code to show without actually turning into the button?
Thanks! you’re so awesome and have been such a help! hope you don’t mind all my silly questions
Hello other Jo Lynne! It is rare to find someone who shares my name and its spelling (although I don’t have a dash between the two names. I get called Joy Lynne or Jolene all the time, though, like the name is DIFFICULT or something. Spanish speakers in our area (Utah) can’t say their “j’s” and sometimes I get called “HO” (so embarrassing!). How about you?
Thanks for the tutorial. I have such difficulty with the technical aspects of blogging. This will be a great help. Drop by my blog anytime. Jo
Thank you! Thank you! I finally am able to make buttons for my sidebars in my wordpress blogs!! So exciting!