<screen>

The <screen> element contains a textual representation of a terminal console or other text-based computer interface.

Rendering expectations

Processors SHOULD preserve the line breaks and spaces that are present in the content of a <screen> element.

The contents of the <screen> element is typically enclosed within a box to suggest a computer display screen. It also is typically rendered in a monospaced font.

Specialization hierarchy

The <screen> element is specialized from <pre>. It is defined in the user-interface domain module.

Content model

(Text | <cite> | <include> | <keyword> | <markupname> | <apiname> | <option> | <parmname> | <cmdname> | <msgnum> | <varname> | <wintitle> | <numcharref> | <parameterentity> | <textentity> | <xmlatt> | <xmlelement> | <xmlnsname> | <xmlpi> | <ph> | <strong> | <em> | <b> | <i> | <line-through> | <overline> | <sup> | <sub> | <tt> | <u> | <hwcontrol> | <partno> | <codeph> | <filepath> | <msgph> | <systemoutput> | <userinput> | <synph> | <menucascade> | <uicontrol> | <q> | <term> | <abbreviated-form> | <text> | <xref> | <state> | <data> | <sort-as> | <foreign> | <unknown> | <draft-comment> | <fn> | <indexterm> | <required-cleanup> )*

Attributes

The following attributes are available on this element: display attributes, universal attributes, and @xml:space.

Example

In the following code sample, the <screen> element is used to illustrate the steps needed to clone a git repository and check status:

<screen> 
workspace $ git clone git@example.com:oasis-tcs/dita-techcomm.git
Cloning into 'dita-techcomm'...
remote: Enumerating objects: 1023, done.
remote: Counting objects: 100% (31/31), done.
remote: Compressing objects: 100% (23/23), done.
remote: Total 1023 (delta 6), reused 21 (delta 4), pack-reused 992
Receiving objects: 100% (1023/1023), 9.87 MiB | 729.00 KiB/s, done.
Resolving deltas: 100% (367/367), done.
workspace $ cd dita-techcomm
dita-techcomm $ git status
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean
dita-techcomm $
</screen>