L'elemento HTML <p>
rappresenta un paragrafo di un testo. I paragrafi sono di solito rappresentati in modalità visiva come blocchi di testo che sono separati da blocchi adiacenti da linee di spazio verticali e/o dalla prima linea di indentazione. I paragrafi sono elementi block-level.
Categorie di contenuto | Contenuto di flusso, contenuto palpabile. |
---|---|
Contenuto permesso | Frasi. |
Tag omessi | Il tag di partenza è richiesto. Il tag di fine può essere omesso se l'elemento <p> è immediatamente seguito da un <address> , <article> , <aside> , <blockquote> , <div> , <dl> , <fieldset> , <footer> , <form> , <h1> , <h2> , <h3> , <h4> , <h5> , <h6> , <header> , <hr> , <menu> , <nav> , <ol> , <pre> , <section> , <table> , <ul> o un altro elemento <p> , o se non ci sono più contenuti nell'elemento genitore ed esso non è un elemento <a> . |
Genitori permessi | Qualsiasi elemento che accetta flow content. |
Ruoli ARIA permessi | Qualsiasi. |
Interfaccia DOM | HTMLParagraphElement |
Attributi
Questo elemento include i global attributes.
Note: L'attributo align
sui tag <p>
è obsoleto e non dovrebbe essere più usato.
Esempi
<p>This is the first paragraph of text.
This is the first paragraph of text.
This is the first paragraph of text.
This is the first paragraph of text.</p>
<p>This is the second paragraph.
This is the second paragraph.
This is the second paragraph.
This is the second paragraph.</p>
Il risultato di questo codice è:
Specificazioni
Specificazione | Stato | Commenti |
---|---|---|
HTML Living Standard The definition of '<p>' in that specification. |
Living Standard | Nessun cambiamento dall'ultima istantanea W3C HTML5 |
HTML5 The definition of '<p>' in that specification. |
Recommendation | attributo align è obsoleto |
HTML 4.01 Specification The definition of '<p>' in that specification. |
Recommendation | Definizione iniziale |
Compatibilità con i Browser
BCD tables only load in the browser
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.