<p>: The Paragraph element
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> (en-US), <fieldset> (en-US), <footer> , <form> (en-US), <h1> (en-US), <h2> (en-US), <h3> (en-US), <h4> (en-US), <h5> (en-US), <h6> (en-US), <header> , <hr> (en-US), <menu> (en-US), <nav> , <ol> (en-US), <pre> (en-US), <section> , <table> , <ul> (en-US) 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 (en-US) |
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