How to Write Source Code
- 1). Open up your text editor and begin writing code in the language of your choice. While specific syntax varies from language to language, all languages have statements. For example, in HTML you could write:
<html>
<p>Hello World!</p> - This statement is denoted by the <p>...</p> tags.
</html>
In Java, the syntax would be:
System.out.println("Hello!"); The end of statement is denoted by a semicolon. - 2). Save the file in the proper format. In this example, save the file as "hello.html."
- 3). Open the file in the appropriate program. You can open the example file with any web browser. You have successfully written source code.
- 4). Right click and select "View page source" on many web pages to view the source code.
Source...