Schematic overview of markup languages
The following document provides a schematic overview of a selection of frequently used elements of the markup languages HTML and LATEX. This overview is not intended to be complete or serve as an introduction to these languages.
Font and character settings
Element | HTML 4 | CSS 2 | LATEX 2ε |
---|---|---|---|
Bold | <b>...</b> |
font-weight:bold; |
\textbf{...} |
Italic | <i>...</i> |
font-style:italic; |
\textit{...} |
Slanted | |
font-style:oblique; |
\textsl{...} |
Teletype | <tt>...</tt> |
font-family:monospace; |
\texttt{...} |
Small capitals | |
font-variant:small-caps; |
\textsc{...} |
Sans-serif | |
font-family:sans-serif; |
\textsf{...} |
Emphasis | <em>...</em> |
|
\emph{...} |
Superscript | <sup>...</sup> |
|
^{...} (in math mode) |
Subscript | <sub>...</sub> |
|
_{...} (in math mode) |
Note that in HTML 5 the <b>
and <i>
elements have a different meaning and the <tt>
element is no longer supported.
Document structure
Element | HTML 4 / 5 | LATEX 2ε |
---|---|---|
Heading |
<h1>...</h1>
|
\begin{chapter}...\end{chapter} (books only)
|
Paragraph | <p>...</p> |
Separated by two line breaks in the source file |
Line break | <br /> |
\\ |
Unordered list |
<ul>
|
\begin{itemize}
|
Ordered list |
<ol>
|
\begin{enumerate} \item ... \end{enumerate}
|
Definition list |
<dl>
|
\begin{description}
|
Footnote | |
\footnote{...} |
Internal references |
Anchor:id="..." Reference: <a href="#...">...</a>
|
Anchor:\label{...} Reference: \ref{...} Alternatively: \autoref{...} (Requires package hyperref )
|
External references | <a href="...">...</a> |
\hyperref[link]{text} (Requires package hyperref ) |
Note that in HTML 5 the <h1>
to <h6>
elements have a slightly different semantic meaning compared to HTML 4.
Tables, figures, and equations
Element | HTML 5 | LATEX 2ε |
---|---|---|
Table with content |
<table>
|
\begin{table}[...]
|
Image / figure |
<figure>
|
\begin{figure}[...]
(Requires package graphicx )
|
Equation |
<math>...</math>
(Requires MathML; implicitly embedded in HTML 5) |
As a separate paragraph:\begin{equation}...\end{equation} Inline (within the running text): $...$
|
Note that in HTML 4 the <figure>
and <figcaption>
elements are not supported, and the <math>
element requires MathML to be explicitly embedded.