301 is permanent the permanent redirection. It is most effective and search engine friendly redirection.
A canonical tag is a way of informing search engines that a specific URL represents the master copy of a page. With the canonical tag you can prevent problems caused by identical or "duplicate" content appearing on multiple URLs.Example of canonical tag:
<link rel="canonical" href="a.href">
here rel and href are the attributes of this canonical tag.