Paragraph

In HTML, a paragraph is defined using the <p> tag. It is a block-level element that is used to group and display a block of text, creating a new paragraph in the document. By default, paragraphs are separated from each other by some space, providing a clear visual distinction between different blocks of text.


  • Block-Level Element: As a block-level element, a <p> tag will start on a new line and take up the full width available.
  • Text Formatting: Inside a paragraph, you can include inline elements like <span>, <a>, <strong>, <em>, and others to format parts of the text.
  • Whitespace Handling: HTML collapses multiple spaces and line breaks within a paragraph into a single space. For example:
Example
<!DOCTYPE html>
<p>This is the first paragraph. It contains some text that forms a complete thought or idea.</p>
<p>This is a <strong>bold</strong> word, and this is an <em>italic</em> word in a paragraph.</p>

Try it yourself

Paragraph Output


Whereisstuff is simple learing platform for beginer to advance level to improve there skills in technologies.we will provide all material free of cost.you can write a code in runkit workspace and we provide some extrac features also, you agree to have read and accepted our terms of use, cookie and privacy policy.
© Copyright 2024 www.whereisstuff.com. All rights reserved. Developed by whereisstuff Tech.