Difference between revisions of "Documentation/DevGuide/AppendixB/Useful XHTML Tags"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (Paragraph: ...: wikify characters < and > with <tt>)
(Html highlight)
Line 14: Line 14:
  
 
{{Documentation/Caution|Do not use <nowiki><br/></nowiki> or CR/LF for marking paragraphs. CR and LF are ignored, except within <nowiki><pre>...</pre></nowiki> and <nowiki><listing>...</listing></nowiki> areas. The <nowiki><br/></nowiki> tag is only for rare cases of explicit linebreaks.
 
{{Documentation/Caution|Do not use <nowiki><br/></nowiki> or CR/LF for marking paragraphs. CR and LF are ignored, except within <nowiki><pre>...</pre></nowiki> and <nowiki><listing>...</listing></nowiki> areas. The <nowiki><br/></nowiki> tag is only for rare cases of explicit linebreaks.
<pre>
+
<source lang=cpp>
 
   /** does this and that.
 
   /** does this and that.
 
    
 
    
Line 23: Line 23:
 
     As this sentence is as well!
 
     As this sentence is as well!
 
   */
 
   */
</pre>
+
</source>
 
Consider using <tt>&amp;lt;</tt> for <tt><</tt> and <tt>&amp;gt;</tt> for <tt>></tt>, as shown in the example above.}}
 
Consider using <tt>&amp;lt;</tt> for <tt><</tt> and <tt>&amp;gt;</tt> for <tt>></tt>, as shown in the example above.}}
  
Line 36: Line 36:
 
Example:
 
Example:
  
   <nowiki><ul>
+
   <source lang=html4><ul>
 
     <li>the first item </li>
 
     <li>the first item </li>
 
     <li>the second item </li>
 
     <li>the second item </li>
 
     <li>the third item </li>
 
     <li>the third item </li>
  </ul></nowiki>
+
  </ul></source>
  
 
results in a list similar to:
 
results in a list similar to:
Line 54: Line 54:
 
Example:
 
Example:
  
   <nowiki><ol>
+
   <source lang=html4><ol>
 
     <li>the first item </li>
 
     <li>the first item </li>
 
     <li>the second item </li>
 
     <li>the second item </li>
 
     <li>the third item </li>
 
     <li>the third item </li>
  </ol></nowiki>
+
  </ol></source>
  
 
results in a list similar to:
 
results in a list similar to:
Line 74: Line 74:
 
Example:
 
Example:
  
   <nowiki><dl>
+
   <source lang=html4><dl>
 
     <dt>the first item</dt>
 
     <dt>the first item</dt>
 
     <dd>asfd asdf asdf asdf asdf</dd>
 
     <dd>asfd asdf asdf asdf asdf</dd>
Line 83: Line 83:
 
     <dt>the third item</dt>
 
     <dt>the third item</dt>
 
     <dd>asfd asdf asdf asdf asdf</dd>
 
     <dd>asfd asdf asdf asdf asdf</dd>
  </dl></nowiki>
+
  </dl></source>
  
 
results in a list similar to:
 
results in a list similar to:

Revision as of 00:05, 15 June 2014



Only a few XHTML tags are required for writing the documentation in idl files. The most important ones are listed in this section.

Paragraph: <p> ... </p>

This tag marks a normal paragraph. Consider that line breaks and empty lines in the idl file do not cause a line break or a paragraph break in the layout version. Explicit paragraph break markups, are necessary.

Documentation caution.png Do not use <br/> or CR/LF for marking paragraphs. CR and LF are ignored, except within <pre>...</pre> and <listing>...</listing> areas. The <br/> tag is only for rare cases of explicit linebreaks.
  /** does this and that.
 
    This sentence should start with a "&lt;p&gt;". If not, 
    it still belongs to the previous paragraph!
 
    This still belongs to the first paragraph. <nowiki><br/></nowiki>
    As this sentence is as well!
  */

Consider using &lt; for < and &gt; for >, as shown in the example above.

Line Break: <br/>

This tag marks up a line break within the same paragraph. Consider line breaks and empty lines in the idl file do not cause a line break or a paragraph break when presented by the HTML browser. Explicit paragraph break markups are necessary.

Unordered List: <ul><li> ... </li>... </ul>

These tags mark the beginning and end of an unordered list, as list items.

Example:

Invalid language.

You need to specify a language like this: <source lang="html4strict">...</source>

Supported languages for syntax highlighting:

4cs, 6502acme, 6502kickass, 6502tasm, 68000devpac, abap, actionscript, actionscript3, ada, algol68, apache, applescript, apt_sources, arm, asm, asp, asymptote, autoconf, autohotkey, autoit, avisynth, awk, bascomavr, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, c_loadrunner, c_mac, caddcl, cadlisp, cfdg, cfm, chaiscript, cil, clojure, cmake, cobol, coffeescript, cpp, cpp-qt, csharp, css, cuesheet, d, dcl, dcpu16, dcs, delphi, diff, div, dos, dot, e, ecmascript, eiffel, email, epc, erlang, euphoria, f1, falcon, fo, fortran, freebasic, freeswitch, fsharp, gambas, gdb, genero, genie, gettext, glsl, gml, gnuplot, go, groovy, gwbasic, haskell, haxe, hicest, hq9plus, html4strict, html5, icon, idl, ini, inno, intercal, io, j, java, java5, javascript, jquery, kixtart, klonec, klonecpp, latex, lb, ldif, lisp, llvm, locobasic, logtalk, lolcode, lotusformulas, lotusscript, lscript, lsl2, lua, m68k, magiksf, make, mapbasic, matlab, mirc, mmix, modula2, modula3, mpasm, mxml, mysql, nagios, netrexx, newlisp, nsis, oberon2, objc, objeck, ocaml, ocaml-brief, octave, oobas, oorexx, oracle11, oracle8, oxygene, oz, parasail, parigp, pascal, pcre, per, perl, perl6, pf, php, php-brief, pic16, pike, pixelbender, pli, plsql, postgresql, povray, powerbuilder, powershell, proftpd, progress, prolog, properties, providex, purebasic, pycon, pys60, python, q, qbasic, rails, rebol, reg, rexx, robots, rpmspec, rsplus, ruby, sas, scala, scheme, scilab, sdlbasic, smalltalk, smarty, spark, sparql, sql, stonescript, systemverilog, tcl, teraterm, text, thinbasic, tsql, typoscript, unicon, upc, urbi, uscript, vala, vb, vbnet, vedit, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, whois, winbatch, xbasic, xml, xorg_conf, xpp, yaml, z80, zxbasic


<ul>
    <li>the first item </li>
    <li>the second item </li>
    <li>the third item </li>
 </ul>

results in a list similar to:

  • the first item
  • the second item
  • the third item

Ordered List: <ol><li> ... </li>... </ol>

These tags mark the beginning and end of an ordered list, as list items.

Example:

Invalid language.

You need to specify a language like this: <source lang="html4strict">...</source>

Supported languages for syntax highlighting:

4cs, 6502acme, 6502kickass, 6502tasm, 68000devpac, abap, actionscript, actionscript3, ada, algol68, apache, applescript, apt_sources, arm, asm, asp, asymptote, autoconf, autohotkey, autoit, avisynth, awk, bascomavr, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, c_loadrunner, c_mac, caddcl, cadlisp, cfdg, cfm, chaiscript, cil, clojure, cmake, cobol, coffeescript, cpp, cpp-qt, csharp, css, cuesheet, d, dcl, dcpu16, dcs, delphi, diff, div, dos, dot, e, ecmascript, eiffel, email, epc, erlang, euphoria, f1, falcon, fo, fortran, freebasic, freeswitch, fsharp, gambas, gdb, genero, genie, gettext, glsl, gml, gnuplot, go, groovy, gwbasic, haskell, haxe, hicest, hq9plus, html4strict, html5, icon, idl, ini, inno, intercal, io, j, java, java5, javascript, jquery, kixtart, klonec, klonecpp, latex, lb, ldif, lisp, llvm, locobasic, logtalk, lolcode, lotusformulas, lotusscript, lscript, lsl2, lua, m68k, magiksf, make, mapbasic, matlab, mirc, mmix, modula2, modula3, mpasm, mxml, mysql, nagios, netrexx, newlisp, nsis, oberon2, objc, objeck, ocaml, ocaml-brief, octave, oobas, oorexx, oracle11, oracle8, oxygene, oz, parasail, parigp, pascal, pcre, per, perl, perl6, pf, php, php-brief, pic16, pike, pixelbender, pli, plsql, postgresql, povray, powerbuilder, powershell, proftpd, progress, prolog, properties, providex, purebasic, pycon, pys60, python, q, qbasic, rails, rebol, reg, rexx, robots, rpmspec, rsplus, ruby, sas, scala, scheme, scilab, sdlbasic, smalltalk, smarty, spark, sparql, sql, stonescript, systemverilog, tcl, teraterm, text, thinbasic, tsql, typoscript, unicon, upc, urbi, uscript, vala, vb, vbnet, vedit, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, whois, winbatch, xbasic, xml, xorg_conf, xpp, yaml, z80, zxbasic


<ol>
    <li>the first item </li>
    <li>the second item </li>
    <li>the third item </li>
 </ol>

results in a list similar to:

1.the first item

2.the second item

3.the third item

Definition List: <dl><dt> ... </dt><dd> ... </dd>... </dl>

These tags mark the beginning and end of a definition list, the definition tags and the definition data.

Example:

Invalid language.

You need to specify a language like this: <source lang="html4strict">...</source>

Supported languages for syntax highlighting:

4cs, 6502acme, 6502kickass, 6502tasm, 68000devpac, abap, actionscript, actionscript3, ada, algol68, apache, applescript, apt_sources, arm, asm, asp, asymptote, autoconf, autohotkey, autoit, avisynth, awk, bascomavr, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, c_loadrunner, c_mac, caddcl, cadlisp, cfdg, cfm, chaiscript, cil, clojure, cmake, cobol, coffeescript, cpp, cpp-qt, csharp, css, cuesheet, d, dcl, dcpu16, dcs, delphi, diff, div, dos, dot, e, ecmascript, eiffel, email, epc, erlang, euphoria, f1, falcon, fo, fortran, freebasic, freeswitch, fsharp, gambas, gdb, genero, genie, gettext, glsl, gml, gnuplot, go, groovy, gwbasic, haskell, haxe, hicest, hq9plus, html4strict, html5, icon, idl, ini, inno, intercal, io, j, java, java5, javascript, jquery, kixtart, klonec, klonecpp, latex, lb, ldif, lisp, llvm, locobasic, logtalk, lolcode, lotusformulas, lotusscript, lscript, lsl2, lua, m68k, magiksf, make, mapbasic, matlab, mirc, mmix, modula2, modula3, mpasm, mxml, mysql, nagios, netrexx, newlisp, nsis, oberon2, objc, objeck, ocaml, ocaml-brief, octave, oobas, oorexx, oracle11, oracle8, oxygene, oz, parasail, parigp, pascal, pcre, per, perl, perl6, pf, php, php-brief, pic16, pike, pixelbender, pli, plsql, postgresql, povray, powerbuilder, powershell, proftpd, progress, prolog, properties, providex, purebasic, pycon, pys60, python, q, qbasic, rails, rebol, reg, rexx, robots, rpmspec, rsplus, ruby, sas, scala, scheme, scilab, sdlbasic, smalltalk, smarty, spark, sparql, sql, stonescript, systemverilog, tcl, teraterm, text, thinbasic, tsql, typoscript, unicon, upc, urbi, uscript, vala, vb, vbnet, vedit, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, whois, winbatch, xbasic, xml, xorg_conf, xpp, yaml, z80, zxbasic


<dl>
    <dt>the first item</dt>
    <dd>asfd asdf asdf asdf asdf</dd>
  
    <dt>the second item</dt>
    <dd>asfd asdf asdf asdf asdf</dd>
    
    <dt>the third item</dt>
    <dd>asfd asdf asdf asdf asdf</dd>
 </dl>

results in a list similar to:

the first item

asfd asdf asdf asdf asdf

the second item

asfd asdf asdf asdf asdf

the third item

asfd asdf asdf asdf asdf

Table: <table><tr><td>...</td>...</tr>...</table>

Defines a table with rows (tr) and columns (td).

Strong Emphasis: <strong> ... </strong>

These tags present a piece of text that is emphasized. In most cases this is bold, but the HTML-client defines what it actually is.

Slight Emphasis: <em> ... </em>

These tags present a piece of text emphasized slightly. In most cases this is italic, but the HTML-client defines what it actually is .

Anchor: <a href="..."> ... </a>

These tags specify a link to external documentation. The first "..." specifies the URL.

Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages