Khamis, April 25

Chapter 1: Getting Started With HTML

Chapter 1: Getting Started With HTML

Using Tags

Tags aren't the only things that make a good Web page. As you continue through the chapters in this tutorial, you'll discover that while HTML was very forgiving, XHTML must conform to the rules. Though current versions of the most popular browsers will recognize your intentions even if you use incorrect tags or enter the correct tags in the wrong order, later versions will not. You'll want to move beyond the novice level now and follow some basic Web coding principles to conform to XHTML's standards. Following is a brief list of those principles, but you'll learn more in later chapters:
  • Include all the required XHTML elements that you learned in this chapter You might want to create a template for yourself that already includes these tags. You can use the XHTML document created in theChapter 1.3,"XHTML Requirements" section as a template. Whenever you create a new Web page; open your template file, add your new text, and save the new file.
  • Use lowercase for all tags To the browser, <HEAD>, <Head>, and <head> all mean the same thing. Use the same lowercase spelling for all your commands and you won't be caught having to recode your pages as the standard evolves.
  • Never use spaces in filenames Older computer systems have trouble reading filenames that include spaces (for example, my first page.htm). Instead, you can use a couple of file management tricks to replace the spaces:
    - Use an underscore (_) to represent spaces (for example, my_first_page.htm).
    - Use initial capital letters to indicate new words in a filename (for example, MyFirstPage.htm).

Tiada ulasan:

Catat Ulasan