The Crafty Mummy

Crafts. Sewing. Quilting. Crochet. Tutorials.

  • Start Here
  • Welcome
    • Subscribe
    • About Me
      • Copyright
      • Disclosure
      • Privacy Policies
    • Advertise
    • Sharing
      • Recommendations
      • Shopping & Coupons
      • Books
  • Explore
    • Crafts
      • Beading
      • Kids
      • Paint
      • Storage
      • Christmas Crafts
    • Sewing
    • Quilting
    • Stitching
    • Crochet
      • Yarn
    • Life
      • Food
      • Organisation
    • Blogging
      • How To
      • Social Media
      • WordPress Plugins
      • Photography
  • Tutorials
    • Tips
  • Shop on Etsy
  • Shop on Redbubble

Let’s play with HTML

by Tonya Grant |Filed Under: Blogging, How To, Tutorials Tagged With: HTML Get a Weekly Update of all Articles

social media buttons

Do you have buttons in your blog sidebar? I recently added some new ones. If you do, then there is some code like this that puts them there:

<img
style=”border: 0px solid ; width: 30px; height: 30px;” img src=”http://thecraftymummy.com/wp-content/uploads/2012/05/facebook.png” />

Now I have pretty much taught myself everything I know about blogging, including HTML, by reading tutorials and other blogs. So I thought I’d share something I learnt about this HTML code recently.

First, let me break this down for you:

<a

href=”http://www.facebook.com/CraftyMummy”

target=”_blank”>

<img style=”border: 0px solid ; width: 30px; height: 30px;”

img src=”http://thecraftymummy.com/wp-content/uploads/2012/05/facebook.png” />

</a>

The Green Section is the code for what your button looks like and where it is stored online. The URL  is where I uploaded my Facebook icon – a cute freebie from Carrie Loves.

The Blue Section is the code for where you want people to go when they click on your button. So this piece of code is to send my readers to my Facebook page.

The Red Sections are the bits of code that show the beginning and end of the code block – kind of like the beginning and end of the paragraph. Without them, the whole thing won’t work!

What I learnt to add

I recently realised that I could change the size of the buttons with this code. For example, if I wanted to add my friend B’s button to my sidebar but it was bigger than all my other buttons, I can add some extra code that resizes it. So I can keep all my sidebar buttons in line and pretty!

I added some code in the Green Section above. You could just have this and it would grab the button and put it in place for you:

<img src=”http://thecraftymummy.com/wp-content/uploads/2012/05/facebook.png” />

But if you add this bit in, you control the size:

img style=”border: 0px solid ; width: 30px; height: 30px;”

You then create:

  • a border – in my case it is set to 0 so there’s no border, but you could change the number
  • width – in my case 30px (for my little social media icons)
  • height – in my case also 30px to make them square

In my sidebar, all my sponsor buttons are 125 x 125 pixels because my sidebar is 250 pixels wide.

Keep in mind, it is better to make the size smaller than the original. If you make them too much larger, the image could become distorted.

So there you have it – a snippet of code that resizes your buttons or images when you want to add them to your blog sidebar.

 

Filed Under: Blogging, How To, Tutorials Tagged With: HTML

« Sharing Sunday
Quick Baby Gift – Sheets & Singlet Tutorial »
Disclosure: There are affiliate links in this post.  This just means that if you click through and choose to purchase something I may get a small commission - at no extra cost to you, of course.  This helps me keep the content here at The Crafty Mummy free for everyone.

I love to chat so please leave me a comment or ask a question.

Don't stress if your comment doesn't appear immediately - sometimes I have to moderate comments thanks to spam visitors, but the comments from real readers will always get published. Scroll down to add your thoughts or ask a question.

Comments

  1. Lean says

    May 22, 2012 at 7:56 AM

    Now if only I knew where to add this code onto the new wordpress platform I’d be set. I’m new too. Thanks so much for your info =)

    • CraftyMummy says

      May 22, 2012 at 9:10 AM

      Hi Lean On WordPress you can add this code as a widget to your sidebar. In your dashboard go to Appearance > Widgets. Find a text widget in the centre section and drag it into the sidebar area in the right. Paste the HTML into that box and save.

      If you’re familiar with Blogger, widgets are like gadgets.

      Hope that helps!

      • CraftyMummy says

        May 22, 2012 at 12:24 PM

        Sorry! “Leana”!

  2. Cassandra says

    May 22, 2012 at 8:54 AM

    This is fantastic! Thanks for sharing…. I used to be really good at html (about 10 years ago), but since then, having not used it for ages, I’ve been procrastinating about getting my head around it again! lol… You’ve explained it really well 🙂

    • CraftyMummy says

      May 22, 2012 at 9:11 AM

      You’re welcome. I wish I could say I was really good at it but I’m still learning.

      • Leana says

        May 22, 2012 at 9:53 AM

        Well I’m here to tell you, that your page looks great. You’re way ahead of me and I’m learning from you. So thank you!!

  3. Lean says

    May 22, 2012 at 9:14 AM

    Thank you so much!

  4. Leana says

    May 22, 2012 at 11:15 AM

    Do you offer tutorials in connecting WordPress blogs to update automatically on Facebook? Thanks again.

    • CraftyMummy says

      May 22, 2012 at 12:23 PM

      I used to use NetworkedBlogs to post to Facebook automatically, but I found that often the update got grouped in the FB stream with everyone else who had used the same thing, so your readers may not actually see your update. Now I try to post myself each time I post a new post or use BufferApp to post for me at a certain time.

      You can find NetworkedBlogs if you search on FB.

      You can BufferApp here: http://bufferapp.com/r/4f817

  5. Denyse Whelan says

    May 22, 2012 at 6:29 PM

    is it OK if I say that I LOVED the colour coding..but I went completely AWOL with the words…I am sorry. it’s not you, it’s me. I get my web guy to do mine. I am so not into this code stuff. YOU are though, and good for you.
    I am bowing to your awesome work.
    Popped in from #TeamIbot today
    Denyse

    • CraftyMummy says

      May 23, 2012 at 10:33 AM

      Thanks Denyse. I sometimes wonder whether I should have studied something related to computers… I kind of like it!

  6. Jess says

    May 22, 2012 at 8:13 PM

    And you have resized my button to prove it! 😉
    I’m self taught in HTML too and kind of love it. I use it predominantly to align text and pictures.
    It’s good to have someone break it done for you though.

    • CraftyMummy says

      May 23, 2012 at 10:34 AM

      I did, Jess. I love that I’ve worked out how to make all my linky buttons line up!

  7. tahlia - the parenting files says

    May 22, 2012 at 8:58 PM

    thanks so much for sharing. HTML is something i definitely want to learn

  8. Catherine Rodie Blagg @CoTaaB says

    May 23, 2012 at 12:58 PM

    I’m dyslexic so for me HTML may as well be Chinese! I tried to add follow me buttons recently and it took hours and they still don’t look quite right. I like the way you’ve broken it down.. maybe i’ll be brave and give it another go! Thanks for visiting Cup of Tea and a Blog too 🙂

    • CraftyMummy says

      May 25, 2012 at 2:30 PM

      Go on, Catherine. One you get one right, you can copy the code and just change the URLs for the next one

  9. Lauren says

    May 23, 2012 at 1:55 PM

    I can tell I will be coming back to this sometime soon! Buttons are hard work for me at the moment!

    • CraftyMummy says

      May 25, 2012 at 2:29 PM

      It took me ages to feel I knew what I was doing! Hang in there, Lauren

  10. Sonia @ Life Love and Hiccups says

    May 26, 2012 at 3:12 PM

    OMG thank you so much – I have been looking for info like this. Thank you again 🙂

    • CraftyMummy says

      May 27, 2012 at 4:49 PM

      You’re welcome!

  11. Lisa Barton-Collins says

    May 31, 2012 at 8:59 PM

    I love when you share info like this, I find it so useful! html is not my native tongue at all, but you almost make it seem easy.
    xx

    • CraftyMummy says

      May 31, 2012 at 10:48 PM

      Thanks, Lisa. I need a “HTML for Dummies” book, but since I haven’t found one yet, I have had to work things out for myself and I’m happy to share.

  12. Amanda @ Cooker and a Looker says

    December 14, 2012 at 2:22 PM

    More HTML gold! Thank you, thank you, thank you!

    • CraftyMummy says

      December 14, 2012 at 9:03 PM

      You’re welcome!

Hi! I’m the CraftyMummy

Tonya is the voice behind The Crafty Mummy. She dabbles in lots of different crafts – patchwork, quilting, cross-stitch, scrapbooking, knitting, crochet and sewing. This is the record of projects she has done, and the projects she dreams of getting to! Read More…

Search

  • Email
  • Facebook
  • Instagram
  • Pinterest
  • Twitter
  • YouTube
Shop my Affiliate Favourites

Fat Quarter Shop for Fabric and More

Grab the Sew Sampler Box Here

AccuQuilt for Cutting Machines and Dies

QuiltyBox for Monthly Treats in the Mail

CreativeBug for Craft Classes

Pretty Darn Cute for Blog Designs like mine

Creative Market for Fonts, Images, Themes and More

OzGameShop for All the Games

Adrift for Fashion you’ll Love

Kindle Unlimited Membership Plans

Kindle Book List

Click to shop my kindle book list
Shop my Amazon Influencer Shop
Join the CrochetU and learn to crochet
New to TheCraftyMummy.com? Click here to see more
Blog Tools I use for TheCraftyMummy.com

Grammarly

Aweber for email newsletter

CoSchedule to stay organised and share

Milotree for social media

Genesis for blog framework

FoodiePro is my theme

Hosting with WPEngine

Powered by

Recent Articles

Disclosure: There are affiliate links on this site. This means that I may get a commission if you choose to purchase after browsing via these links - at absolutely no extra cost to you, of course. I only recommend products which I use and love, or that I think will be quality products that will be useful to my readers. It is the affiliate links in this site that help me keep my tutorials free of charge. Thank you!

Looking for something? Search here:

Copyright 2015 The Crafty Mummy · Built using Genesis Framework & Foodie Pro Theme