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

Chapter 15. Adding HTML Forms > Other Elements for Form Formatting

Other Elements for Form Formatting

One of the most annoying parts of setting up a form so far has been the inability to line up text box fields as they go down the page. For instance, whenever the Name: and Address: fields have been used in examples, they’ve always looked a little ragged.

One solution is the <pre> element. Because anything between the two <pre> tags uses the same spacing and returns, this element does two things. First, it allows you to line up your text boxes. Second, it eliminates the need for <br /> elements at the end of <input> elements, because the browser will recognize your returns. The following is a ragged-looking example:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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