How to give a credit to the sources on the Internet in an acceptable way?
How should you cite?
There is a format for citing web references for nearly any citation style.
In the MLA format

Last, First M. “Article Title.”Website Title. Website Publisher, Date Month Year Published. Web. Date Month Year Accessed.

In APA style

Author, A. (date). Title of document [Format description]. Retrieved from Website

You may leave out the author field when it is not possible to retrace the original author (as described here)
When should you cite?
If you were to refer a material that has sufficient information to be given credit for your work, then by all means you ought to cite it. But first, try to find the roots of the idea, if such idea has been published elsewhere before this web-page was published. On-line content is highly susceptible to contain plagiarized content. See if you could locate the original source. If found, cite the original source instead.