Skip to Main Content

CSC 101: Intro to Computer Science

CSP Library APA Guide

For more information on how to use APA, see the Library's full APA guide:

Get Help Now


Or try these options:

Get help from additional services in the Library:

When to Use a Citation

Writing code is similar to writing a paper: when you use or adapt someone else's work in your own project, you must give credit to that source

See below for examples on how to properly cite code and images in your own work.

How to Cite: Source Code

Within your code, provide the URL of the original source and the date you found the code. If you adapted the code in your work, be sure to also indicate that ("Code adapted from" or "Based on").


// Code adapted from MSDN example:

(Source: retrieved June 2021.)

How to Cite: Images Found Online

Note: For Google Images, navigate to original website to attempt to locate author, title and date.  If the image does not have an identifiable author, date, or title, use the rules for citing sources with missing elements.

Internet Image With No Title

References Page Format In-Text Citation

Author, A. A. (Year, Month Day). [Description of image] [Image]. Website. URL

Amir_Foo. (2019, December 15). [Drawing of Al-Biruni] [Image]. Reddit.


(Amir_Foo, 2019, December 15)

Image With No Author or Date

References Page Format In-Text Citation

Title [Image]. (Year). Website. URL

Philosoraptor [Image]. (n.d.). Knowyourmeme.


(Philosoraptor, n.d.)

News Website


References Page Format In-Text Citation

Author (Year, Month Day). Title. Website Name. URL

Guo, H., Luo, G., & Gao, S. (2020, January 23). Snakes could be the source of the Wuhan coronavirus outbreak. CNN.

With paragraph number:

(Guo et al., 2020, January 23, para. 5)

Without paragraph number:

(Guo, et al., 2020, January 23)

NOTE: There is no period after "et". 

Website with Group Author


References Page Format In-Text Citation

Author (Year, Month Day). Title. Website Name. URL


Mayo Clinic. (2019, July 19). Arthritis.


Lippincott Advisor. (2020, July 10). Alopecia. 



-If the resource was written by a group or organization, use the name of the group/organization as the author. Additionally, if the author and site name are the same, omit the site name from the citation.**

-Date may include original published date or last updated/revised date


(Mayo Clinic, 2019). 


Lippincott Advisor (2020).