Web Pages as Text Files

Classic programmed-learning exercises, refreshed for modern Java and presented in the current MrStyner.com portfolio style.

Modern Java noteThis archive has been refreshed for Java 25 LTS. Core language concepts remain useful, while outdated setup instructions and browser-era Java are labeled or replaced. Java 26 is the current feature release; Java 25 is used here as the stable teaching baseline.
go to previous page   go to home page   go to next page        

Answer:

In the current standard, the tags are lower case. But browsers usually let you use upper case.

Web Pages as Text Files

The example Web pages such as the one below are not files on your hard disk. They exist only in the main memory being used by the browser. To save the sample page to a file, do the following:

  1. Start Notepad (or other text editor).
  2. Put the mouse at the top of the example (in the text box), hold the left mouse button down, and drag to the bottom of the example.
  3. The text you want should be highlighted.
  4. Click "Edit/Copy" in the browser menu to copy the text to the clipboard.
  5. In Notepad, click "Edit/Paste" to paste from the clipboard to the editor.
  6. Now (in Notepad) click "File/Save as" to save to a disk file.
  7. Give the disk file a name that ends in the extension .htm or .html

Once you have done this, you can look at the file with your browser (navigate to it using File/open or File/open page from the menu) or click on it in Windows explorer.

Click to see what this HTML does.

QUESTION 12:

Save the "Web page" in the text area to a disk file. Or not, if it all seems clear to you.