HTML P Tag - Tutorial Republic

TutorialRepublic HOME HTML5 CSS3 JAVASCRIPT JQUERY BOOTSTRAP5 v4.6 PHP7 SQL REFERENCES EXAMPLES FAQ SNIPPETS Online HTML Editor HTML Tags <a> <abbr> <acronym> <address> <applet> <area> <article> <aside> <audio> <b> <base> <basefont> <bdi> <bdo> <big> <blockquote> <body> <br> <button> <canvas> <caption> <center> <cite> <code> <col> <colgroup> <data> <datalist> <dd> <del> <details> <dfn> <dialog> <dir> <div> <dl> <dt> <em> <embed> <fieldset> <figcaption> <figure> <font> <footer> <form> <frame> <frameset> <head> <header> <hgroup> <h1> – <h6> <hr> <html> <i> <iframe> <img> <input> <ins> <kbd> <keygen> <label> <legend> <li> <link> <main> <map> <mark> <menu> <menuitem> <meta> <meter> <nav> <noframes> <noscript> <object> <ol> <optgroup> <option> <output> <p> <param> <picture> <pre> <progress> <q> <rp> <rt> <ruby> <s> <samp> <script> <section> <select> <small> <source> <span> <strike> <strong> <style> <sub> <summary> <sup> <svg> <table> <tbody> <td> <template> <textarea> <tfoot> <th> <thead> <time> <title> <tr> <track> <tt> <u> <ul> <var> <video> <wbr> Advertisements HTML <p> Tag

Topic: HTML5 Tags ReferencePrev|Next

Description

The <p> tag defines a paragraph. The <p> element is the most commonly used block-level element. However, it cannot contain block-level elements (including <p> itself).

The following table summarizes the usages context and the version history of this tag.

Placement: Block
Content: Inline and text
Start/End Tag: Start tag: required, End tag: optional
Version: HTML 2, 3.2, 4, 4.01, 5

Usage Notes

  • As a logical element, empty paragraphs are ignored by the browsers, so do not use empty <p> elements to add blank lines in your web pages. To create blank lines use the <br> tag, or use the CSS margin property instead.

  • When you use the <p> element to begin a paragraph, it automatically creates some space (margin) above and below the content. This space is applied by the browser's built-in style sheets, but you can override it using CSS margin property.

Syntax

The basic syntax of the <p> tag is given with:

HTML / XHTML: <p> ... </p>

The example below shows the <p> tag in action.

Example

Try this code » <p>This is a paragraph.</p> <p>This is another paragraph.</p>

Note: In HTML, the end tag for the <p> element may be omitted. In XHTML, the <p> tag must be properly closed i.e. both start tag and end tag are required.

Tag-Specific Attributes

The following table shows the attributes that are specific to the <p> tag.

Attribute Value Description
align leftrightcenterjustify Obsolete Specifies the horizontal alignment of the text within a paragraph. Use the CSS text-align property instead.

Global Attributes

Like all other HTML tags, the <p> tag supports the global attributes in HTML5.

Event Attributes

The <p> tag also supports the event attributes in HTML5.

Browser Compatibility

The <p> tag is supported in all major modern browsers.

Browsers Icon

Basic Support—

  • Firefox 1+
  • Google Chrome 1+
  • Internet Explorer 2+
  • Apple Safari 1+
  • Opera 2.1+

Further Reading

See tutorial on: CSS Alignment.

Related tags: <h1> - <h6>, <div>.

Previous Page Next Page Advertisements Bootstrap UI Design Templates Property Marvels - A Leading Real Estate Portal for Premium Properties Advertisements

Is this website helpful to you? Please give us a like, or share your feedback to help us improve. Connect with us on Facebook and Twitter for the latest updates.

About Us

Our Story Terms of Use Privacy Policy

Contact

Contact Us Report Error Advertise

Interactive Tools

Bootstrap Icon Search Utility HTML Formatter Title & Meta Length Calculator HTML Color Picker Bootstrap Button Generator SQL Playground Font Awesome Icon Finder HTML Editor

TutorialRepublic

BMC Copyright © 2025 Tutorial Republic. All Rights Reserved. Share This:

Tag » What Is P In Html