HTML 'p' Tag/Element

Q

What Is an HTML "p" Tag/Element?

✍: FYIcenter.com

A

A "p" element is a block level element that can be used directly as a sub-element in the body element. You can use "p" elements to specify paragraphs of text and in-line elements. Here are basic rules about p elements:

  • "p" elements are mixed content elements.
  • "p" elements can have empty contents.
  • "p" elements can have PCDATA as contents.
  • "p" elements can have in-line elements as contents.
  • "p" elements can not have block elements as contents.
  • "p" elements can not have "p" elements as contents.
  • "p" elements are block elements. They can not be used as in-line elements.
  • "p" elements will be displayed by browsers as paragraphs with some leading and trailing vertical spaces.

Here is a good example of p elements:

  <p>Learning XHTML is like learning any new language,
  computer or human. Most students first immerse themselves
  in examples. Studying others is a natural way to learn,
  making learning easy and fun.</p>

 

Mixing Images with Text in a Paragraph in HTML

HTML 'body' Element Attributes

HTML Body Tag and Block Level Tags

⇑⇑ HTML Tutorials

2023-08-09, 1220🔥, 0💬