• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 2. Making a Web Page with HTML > Starting Your HTML Document Right

Starting Your HTML Document Right

Throughout this chapter, we work through an HTML document from top to bottom and explain the parts. This will help you develop good, solid code when you start to work on your site. By good, solid code, we mean code that is consistent with Web standards, is free of typos and other errors, and also is well commented. This section explains the document type definition (DTD) and the head and body tags. Each site you create will always have at least these three elements.

As you start to build your HTML document, you might notice when you preview it that it is pretty ugly. The default look of headings and paragraphs can be very unattractive. Don't try to make it look good at this point. The CSS (Cascading Style Sheets) file you create will take care of all the visual aspects of your page. Cascading Style Sheets are a type of coding that controls layout. CSS are the instructions for the browser about how to display different elements of your HTML document. CSS can control how much space is between the elements on the page, what colors things are, and how large the text appears. Some very old methods of making HTML look good (such as using the <font> tags) should not be used anymore. They create code that is difficult to edit and maintain. The old methods are also not as compliant with modern browsers and devices. Remember, a well‐coded HTML document is a pretty bland and ugly thing.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint