An HTML Paragraph is an HTML element that is defined by the letter p. To add a paragraph to your HTML page, you use <p> some content </p>. In the example below, the content is “Hello world!”. The browser does not display the tags (<p> and </p>) to the user.
1. Paragraphs in a Webpage
You can add the paragraph element in the body element as seen in the example below. There is no limit to how many paragraph elements you can add!
The code above will generate the output below on any web browser.
2. Paragraphs & Formatting
In HTML, paragraphs always start on new lines, and browsers automatically add some white space around paragraphs. In addtion, addings additional spaces or new lines in paragraphs do not affect the way browsers present the information. An example is provided below.
Since extra spaces and new lines are ignored, we get the following rendered paragraph on the web browser.
4. HTML Paragraph Practice
Time to put yourself to test with these HTML Paragraph practice exercises.
5. It’s Good to Know!
- list of html elements
- list of IDEs