Updated: 07/06/2021 by Computer Hope

Source may refer to any of the following:

1. In general, a source is the location from which information is gathered. For example, if you copied CD (compact disc) information to a computer the CD is considered the source and the computer is the destination.

2. With computer programming or software, source or source code refers to the code used to create the program. See our code definition for full information on this term and related links.

The file containing the source code is sometimes called a source file.

3. With hardware, the source is a part of a transistor where an electrical current flows when the transistor is closed.

View source code

4. With a website, the source or HTML source code is the HTML (hypertext markup language) or other code used to generate a web page on a browser. Any code that is not server-side can be viewed by anyone who visits your site.


The source code for server-side scripts written in languages like Perl and PHP (PHP: Hypertext Preprocessor) cannot be viewed. When you look at the source of a script, you are only able to see the HTML generated by the script, not the script itself.


When viewing the source code of a web page "view-source:" is shown in front of the URL (uniform resource locator).

5. Source can also be abbreviated as src, and is an attribute used with many HTML tags. The following example shows it in use with the <img> element.

<img src="">

6. With an HTML tag, the <source> tag designate additional media resources for the <video> and <audio> elements.

7. In the bash shell, the source builtin command loads and executes a shell configuration file. For more information, see our source bash builtin command reference.

Computer abbreviations, Destination, Electronics terms, Program listing, Programming terms, Trusted source