Practice with Headings

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:

Sure.

Practice with Headings

Usually an author tries to have just a few level 1 headings, and divides the text between level 1 headings with level 2 headings. Long documents might use more levels of headings. For example, a book-length document would use level 1 headings for chapter titles, level 2 headings for the main sections within a chapter, and perhaps level 3 headings for fine divisions of a section.

Here is a Web page with some headings in it. Click on the button to see how your browser displays them. Change the level of some of the headings to see what happens.

Then click to see what this HTML does.

QUESTION 9:

Play with the Web page:

  1. Change the level of some of the headings in the Web page.
  2. Remove the ending </h1> tag and observe the effect.
  3. Change the <h1> tags to a level that does not exist (such as 7).
  4. Notice that the title of the Web page and its headings are not related.