Your problem is that link (“a”) is an INLINE element and you cannot set margin to inlines elements. In order to make it work, you have to declare it as BLOCK element, by adding:
a{
display: block;
}
however be aware then it will reserve as default whole width. You might want later to add something like
a{
float: left;
margin-left: 3px;
}
If you do so, you can delete display: block; because by setting float: left; you already declare it as a block element
In your particular example, you might want to simple set padding for your parent “p” element. Both approaches are possible (setting display: block or setting padding), however the second one is more elegant. You don’t really need to make it block element. Usually you use the first approach when you want to make a link image.