1.2.1 The p element
This tutorial guides you through adding a p
(paragraph) element to a DITA XML topic.
Overview
By the end of this tutorial, you will be able to:
- Explain the purpose and importance of paragraph elements in DITA XML
- Identify appropriate locations to use paragraph elements in DITA documents
- Add new paragraph elements to a DITA concept document using the Oxygen XML editor
- Apply different methods for inserting paragraph elements in Oxygen
- Create structured paragraph content in DITA XML
Background
In DITA, a <p>
element represents a block of text that has a single idea.
Use <p>
to wrap any block of text that forms a single idea or unit of information. <p>
elements can appear (almost) anywhere you need body text. For example: inside the main content area, within list items, notes, or table entries.
<p>
is a block element.
Add a <p>
element
-
Open the concept topic you edited in The shortdesc element.
-
Click between the closing
<p>
tag and the closing<conbody>
tag to place the cursor. -
Add a new
<p>
element using one of the following methods:- In the Elements view, locate and double-click
p
.
- Press ENTER to display a selection list. Type
p
or selectp
from the list and press ENTER.
Oxygen inserts an empty
<p>
element after the first<p>
element and before the closing<conbody>
tag. - In the Elements view, locate and double-click
-
Within the new
<p>
element, typeThis is my second paragraph.
. -
Save the file.
Expected result
DITA_101_oXygen/my_concept_using_paragraphs.xml
to confirm the successful completion of this task.