I do have some experience with this, being a web designer, and can offer my opinion. :-)
Any code that you personally write, or obtain permission to use from another individual who wrote code, is automatically covered under copyright and assigned to you, just like writing a book, a letter, or...