Lets go through each steps, one at a time …
Step 1 : Fire Up A Code Editor
Source Code Editors or simply Code Editors are specially designed text editors used by software developers to simplify writing high quality code and speed up the development process.
(Displays only one color - black, supports only one font and has simple search-replace features)
Notepad++ is a code editor.
(Text editor with support for syntax highlighting, indentations, autocomplete and brace matching functionalities etc.)
Code Editors generally have the following features :
- Syntax highlighting : Display text in different colors and fonts according to the category of terms.
- Indentations : Format source code by adding up spaces at the beginning of a code block in a conventional way to signal the type of code in the block.
- Autocomplete : The application predicts the rest of the code that a user is typing.
- Brace Matching : A syntax highlighting feature that highlights matching sets of braces (square brackets, curly brackets, or parentheses).
There are others you can choose from : Atom, Notepad++, Sublime Text etc.
They are more powerful code editors with some robust features like
- Integrated Build Process
- Project Manager
- Performance Profile
- Deployment Tools
Examples: Visual Studio IDE, Netbeans, WebStorm
Step 2 : Paste In Some HTML
Create a new file with a proper name eg: index.html and paste in the below HTML code :
The scripts are generally placed within the ‘head‘ or the ‘body‘ tag or in both.
Some of its advantages are :
The script in the .js file cannot contain the script tags.