Creating Paragraphs and Line Breaks
Within the <body> section of the document, you type the text that will appear on the Web page. Each paragraph of text should be enclosed in a two-sided tag that indicates its type.
The most basic paragraph type is the body paragraph, indicated by the <p> tag. It is a two-sided tag, so the paragraph text is placed between a <p> and a </p>. In HTML the </p> can be omitted, but in XHTML it is required. Even if you are using HTML, it is good practice to always include the </p> tag, so you don’t get into any sloppy habits that will get you in trouble later if you decide to switch to XHTML.
When a Web page is displayed in a browser, white space is inserted between paragraphs:
That can be a problem when you don’t want ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access