run
Last updated
Last updated
There are many methods to run example code. The common mission of those methods is saving example code to HTML file and then seeing how it looks in the web browser.
HTML can be created and modified by using any text editors. Follow the four steps below to create a HTML file with TextEdit.
Click on the menu: File -> New -> HTML.
Paste an example code in the edit area.
Save file ends with the “.html” extension.
Open this file to run the example.
Reference:
NotePad, is a common Windows accessory that saves documents only in text format, which makes it ideal for formatting HTML.
Open NotePad: Start, Programs, Accesories, NotePad. NotePad should launch with a new document open. From the File pull-down menu, Select "Save As," save the file to the Desktop, and name the file using the ".html" extension (e.g., "home.html"). You must be sure to save the file with the ".html" extension because NotePad will otherwise add the ".txt" extension which will confuse most Web browsers.
Paste an example code in the edit area.
Save file ends with the “.html” extension.
Open this file to run the example.
create a new HTML file by typing
where "example" is the name you wish to give the new file.
Paste the code in the new file.
To save the edits you have made, but leave vi running and your file open:
Press . Type :w Press . To quit vi, and discard any changes your have made since last saving:
Press . Type :q! Press .
Now navigate to wherever you chose to save your file (I recommend creating a new folder on your desktop to store all of your learning files) and double click “test.html.” This should open our page in a web browser and you should be greeted by a result of code running.