"I have read the terms and conditions of almost all learning websites. I am totally confused because, after reading their terms, it seems they state that, copying any content from their website is not allowed.

I need to know that if there is any problem to learn , teach , or copying code for solving solutions from any e-learning website, for example, W3Schools, Stack Overflow, MDN. For my job purpose

Learning, teaching , copying code for solving from these resources is permissible

Should I need to give attribution, also how to give attribution on my project where to put attribution ?

2 Answers 2


Learning and teaching from these resources is permissible. Copying code is not permitted, without author permission, because code is protected by copyright, and if you don't have a license to copy, you cannot legally copy. My website could instruct you regarding how to write HTML background color code using this snippet:

 <body style="background-color:dARKgREEN;">
 <h2>Hello World</h2>
 <p style="background-color:tomato;">But this paragraph is different</p>

Most of this is "fact", not my creation (it's a language fact that the body is called "body", that you use quotes and =, and the color names are also part of the language). I "creatively" hit caps lock when I typed the conventional and unprotected color name DarkGreen. I did not "create" the phrase Hello, World, and that isn't part of the protected content.

Because of the syntax of the language, certain elements will seem to be "copied" from my original instructions. Typical instructive snippets are hyper-short and general, so that you can learn the "basic idea" and not need to do a verbatim copy (even if you need to return to the source to understand where the semicolon goes).


Copying things for your own personal use probably falls under fair use.

But using it in a program that you publish or in code for your employer is no longer personal use.

You are not meant to copy it. Copying is the opposite of learning. Not only is it illegal, it is hindering you from learning.

What you should do is study the example, then use what you have learned to write your own.

As long as you are studying it for your own use, you can make copies.

For the german explanation why see Are you allowed to solve an exercise from a book more than seven times?

To summarize: make copies for learning, so that when it counts, you can do it without copying anything.

Not the answer you're looking for? Browse other questions tagged .