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

Coding paragraphs

As you might have noticed in the preceding code example, the container tags for paragraphs are <p> and </p>, and you use them to separate text into paragraphs. Each paragraph must have its own set of paragraph tags. As you look at HTML of other sites, you might notice that they do not use the <p> tags, they use <br> tags instead — sometimes several of them — to create the visual effect of having paragraphs. This is an incorrect use of the break tag and should never be done. The break tag should be used only when you need a hard break, like in a very long bullet. The reason using multiple <br> tags is incorrect is that when you apply style sheets, you can get inconsistencies in your design because the style sheet will apply attributes to things like paragraphs. The <br> tags will not get the same attributes unless you clutter up your CSS with code to make them the same. Also, coding your site properly will make your content more compatible with other technologies, such as screen readers and handheld devices.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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