Swapping Formats

  • So far we have just created a page with one kind of look. Now things get a bit more interesting.
  • We will now re-create the page using a different format.
  • STEPS:
    • Open file 'hello4.hfl'.
    • Change the format file name in the 'applyFormat('sample1.hfmt')' statement at the top of the file to 'sample1.hfmt'.
    • Update the <nav> and <bottom_links> sections by adding in an <item> for 'hello5.html'.
    • Save as file 'hello5.hfl'.

      It should now look similar to this.

    • Compile file "hello5.hfl".

      The generated HTML file now has a completely different look. You can compare the different versions of the files by clicking on the various 'Hello' navigation bar items.

      If any of the paragraphs are joined to ones above them, you probably do not have a truly empty line between them.

      The generated HTML file should look similar to this.

      Notice that the HTML structure around the content in 'hello5.html' is different that that of 'hello4.html'. Changing the format not only changed the styles, it also completely changed how the page is constructed.