Date First Published: 29th October 2022
Topic: Web Design & Development
Subtopic: Web Development
Article Type: Computer Terms & Definitions
Difficulty: MediumDifficulty Level: 4/10
Learn more about what a html paragraph is in this article.
A HTML paragraph defines a block of text in a HTML document, supported by all web browsers, that always starts on a new line and web browsers automatically add a margin (whitespace) before and after a paragraph to separate them and help users to differentiate between different paragraphs. The margin size can be adjusted with CSS. Within the <p> tag, the text can be specified. An example of a HTML paragraph can be seen below:
The output:
This is a paragraph with some text.
Use the <p> tag for paragraph purposes. Do not use them to create line breaks or extra spaces between different HTML elements. Instead, use the <br> tag, which is specifically designed for line breaks and does not require a closing tag.
Spaces within the <p> tag do not change the display or create line breaks. If there are spaces in the tag, the browser will automatically remove them when displaying the page. As shown below, the output of the HTML paragraph does not change by adding spaces or starting a new line:
This paragraph contains a lot of spaces within the tag, but the browser ignores them.
If so, it is important that you tell me as soon as possible on this page.
Network Services Network Setups Network Standards Network Hardware Network Identifiers Network Software Internet Protocols Internet Organisations Data Transmission Technologies Web Development Web Design Web Advertising Web Applications Web Organisations Web Technologies Web Services SEO Threats To Systems, Data & Information Security Mechanisms & Technologies Computer Hardware Computer Software Ethics & Sustainability Legislation & User Data Protection