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 complete, and it is not intended to serve as an introduction to these languages. For more information on HTML and LATEX, please check the external links. No responsibility is taken for the correctness of the information provided on this page.

Font settings

Element HTML CSS LATEX
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{...}
Emphasise <em>...</em>   \emph{...}
Superscript <sup>...</sup>   ^{...} (in math mode)
Subscript <sub>...</sub>   _{...} (in math mode)

Text structure

Element HTML LATEX
Heading <h1>...</h1>
<h2>...</h2>
<h3>...</h3>
<h4>...</h4>
<h5>...</h5>
<h6>...</h6>
\begin{chapter}...\end{chapter} (only for books)
\begin{section}...\end{section}
\begin{subsection}...\end{subsection}
\begin{subsubsection}...\end{subsubsection}
Paragraph <p>...</p> Separated by two line breaks in the source file
Line break <br /> \\
Unordered list <ul>
  <li>...</li>
</ul>
\begin{itemize}
  \item ...
\end{itemize}
Ordered list <ol>
  <li>...</li>
</ol>
\begin{enumerate}
  \item ...
\end{enumerate}
Definition list <dl>
  <dt>...</dt>
  <dd>...</dd>
</dl>
\begin{description}
  \item[...] ...
\end{description}
Footnote   \footnote{...}
Internal references Anchor:
id="..."

Reference:
<a href="#...">...</a>
Anchor:
\label{...}

Reference:
\ref{...}
External references <a href="...">...</a>  

Tables, figures, and equations

Element HTML LATEX
Table with content <table>
  <caption>...</caption>
  <tr>
    <th>...</th>
  </tr>
  <tr>
    <td>...</td>
  </tr>
</table>
\begin{table}[...]
  \caption{...}
  \begin{tabular}{...}
    ... & ... & ... \\
  \end{tabular}
\end{table}
Image / figure <img src="..." width="..."
 height="..." alt="..." />

(HTML does not support image captions)
\begin{figure}[...]
  \includegraphics[width=,heigh=]{...}
  \caption{...}
\end{figure}

(Requires package graphicx)
Equation HTML does not support equations As a separate paragraph:
\begin{equation}...\end{equation}

Within the text:
$...$
©2011 by Tobias Westmeier 
Contact | Last modified: 14 December 2011