Everything that you find online is copyrighted by default, unless explicitly stated otherwise. You may not copy anything, neither content, nor design, including all imagery, pages markup and css.
You may however read code samples to understand how to do the tricks and then integrate it into your application. By integration I mean not copy/pasting but using the technique. Since most techniques are defined by a respective technology, its implied ways of use and its limitations, it is hardly possible to copyright them.
For example you can't copyright "your way of creating a 1px black solid border for a div container" since css with all its bells and whistles is offered to everyone. The same likely goes for more complicated techniques since they're just application of various css features.
From the technical point, you should definitely understand how a certain code piece works. If you do not, you're likely not be able to adapt it to your project. If it is coincidentally workable without any changes it is a matter of luck.
I know there are some people who really copy and insert things into a project because they're incapable of understanding or learning even quite simple things (even IT graduates with diplomas), but I do not believe such an occasional person would survive for long in the development branch (if it manages in at all).