FANDOM


P
Basic usage: <p>Lorem Ipsum</p>
Spec version 1.0
IE Version 1.0
Firefox 1.0
Google Chrome 1.0
Safari 1.0
Opera 1.0
Example output:

Text before and after this element will be forced onto its own line.

The p element, or paragraph, forces surrounding content onto separate lines and cannot contain other p elements, but otherwise it is an ordinary inline element. It is typically used to simply set a paragraph apart, sometimes with CSS styles to be applied.

AtributesEdit

The following attributes can be used with the p element:

Common attributes

Attribute Value Description
class classname Specifies a classname for an element
id id Specifies a unique id for an element
style style_definition Specifies an inline style for an element
title text Specifies extra information about an element
dir ltr
rtl
Specifies the text direction for the content in an element
lang language_code Specifies a language code for the content in an element. Language code reference.
xml:lang language_code Specifies a language code for the content in an element, in XHTML documents. Language code reference.
accesskey character Specifies a keyboard shortcut to access an element
tabindex number Specifies the tab order of an element


Event Attributes

Attribute Value Description
onblur script Script to be run when an element loses focus
onfocus script Script to be run when an element gets focus
onkeydown script Script to be run when a key is pressed
onkeypress script Script to be run when a key is pressed and released
onkeyup script Script to be run when a key is released
onclick script Script to be run on a mouse click
ondblclick script Script to be run on a mouse double-click
onmousemove script Script to be run when mouse pointer moves
onmouseout script Script to be run when mouse pointer moves out of an element
onmouseover script Script to be run when mouse pointer moves over an element
onmouseup script Script to be run when mouse button is released


External LinksEdit

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.