If you're trying to decide on a design for your website, it can be a good idea to look at other websites for inspiration. The same can be true when you're trying to figure out how you should implement a certain feature in your code. Again, it's fine to look at others' solutions, but then you need to come up with your own. Often times, websites will include a copyright at the bottom of the page. But even without that claim, replicating the features of someone's design or copying and pasting their code violates their intellectual property rights.
Some coders include comments in their code declaring that the creation belongs to them, or they may add a useless section of code that they add to everything they make to prove it is theirs—sort of like personal identification.
Many designers and developers are willing to give advice and code solution samples on forums. And some will even create templates and widgets (small interactive applications) that they freely share for people to use, sometimes in hopes that people will help them improve upon it.
Resources and tutorials are available online for web designers new to the game. With web designs, copyright infringement usually becomes more of an issue when business and complex coding solutions are involved. Regardless, a designer's personal, hard work should not be misappropriated.
Question
Can code be considered intellectual property?
Yes, a developer's code is considered intellectual property. Much like handwriting, we all start with basic form in coding and then build on personalizing structure and style. The format and function of someone's code is unique to them, as is the time they put into creating it and structuring it. Since the finished code was a creation of the developer, this means it is intellectual property.