You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mkbook/docs/02-markdown/06-tables.html

168 lines
5.9 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>The mkbook Book | Tables</title>
<link rel="stylesheet" href="../style.css" type="text/css" media="all" />
<link rel="shortcut icon" href="../favicon.ico" />
<meta property="og:title" content="The mkbook Book" />
<meta property="og:site_name" content="The mkbook Book" />
<meta property="og:type" content="book" />
<meta property="og:url" content="https://hamaluik.github.io/mkbook//02-markdown/06-tables.html" />
<meta property="book:author" content="Kenton Hamaluik" />
<meta property="book:release_date" content="2019-12-09T06:12:31.253923271+00:00" />
</head>
<body>
<nav class="big">
<header>
<h1><a href="../index.html">The mkbook Book</a></h1>
<h2>by Kenton Hamaluik</h2>
</header>
<ol>
<li>
<a href="../01-command-line.html">Command-line Interface</a>
</li>
<li>
<a href="../02-markdown/index.html">Markdown</a>
<ol>
<li><a href="../02-markdown/01-commonmark.html">CommonMark</a></li>
<li><a href="../02-markdown/02-syntax-highlighting.html">Syntax Highlighting</a></li>
<li><a href="../02-markdown/03-plantuml-diagrams.html">PlantUML Diagrams</a></li>
<li><a href="../02-markdown/04-katex-formulas.html">KaTeX (Math) Formulas</a></li>
<li><a href="../02-markdown/05-images.html">Images</a></li>
<li><a href="../02-markdown/06-tables.html" class = "current">Tables</a></li>
<li><a href="../02-markdown/07-task-lists.html">Task Lists</a></li>
</ol>
</li>
<li>
<a href="../03-frontmatter.html">Front Matter</a>
</li>
<li>
<a href="../04-structure.html">Structure</a>
</li>
<li>
<a href="../05-customization.html">Customization</a>
</li>
<li>
<a href="../06-how-it-works.html">How it Works</a>
</li>
</ol>
</nav>
<nav class="small">
<span>
<a href="../index.html" alt="Table of Contents">
<span class="icon">
<svg class="icon-list-ol">
<use xlink:href="../icons.svg#icon-list-ol">
</svg>
</span>
</a>
<a href="../02-markdown&#x2f;05-images.html" alt="Images">
<span class="icon">
<svg class="icon-arrow-left">
<use xlink:href="../icons.svg#icon-arrow-left">
</svg>
</span>
</a>
</span>
<span class="title">Tables</span>
<span>
<span class="placeholder"></span>
<a href="../02-markdown&#x2f;07-task-lists.html" alt="Task Lists">
<span class="icon">
<svg class="icon-arrow-right">
<use xlink:href="../icons.svg#icon-arrow-right">
</svg>
</span>
</a>
</span>
</nav>
<article>
<h1 class="title">Tables</h1>
<p>Tables are created using the <a href="https://github.github.com/gfm/#tables-extension-">pipe syntax</a>, for example the following:</p>
<pre style="background-color:#2d2d2d;">
<span style="color:#d3d0c8;">| Tables | Are | Cool |
</span><span style="color:#d3d0c8;">| ------------- |:-------------:| -----:|
</span><span style="color:#d3d0c8;">| col 3 is | right-aligned | $1600 |
</span><span style="color:#d3d0c8;">| col 2 is | centered | $12 |
</span><span style="color:#d3d0c8;">| zebra stripes | are neat | $1 |
</span></pre>
<p>renders as:</p>
<table>
<thead>
<tr>
<th>Tables</th>
<th align="center">Are</th>
<th align="right">Cool</th>
</tr>
</thead>
<tbody>
<tr>
<td>col 3 is</td>
<td align="center">right-aligned</td>
<td align="right">$1600</td>
</tr>
<tr>
<td>col 2 is</td>
<td align="center">centered</td>
<td align="right">$12</td>
</tr>
<tr>
<td>zebra stripes</td>
<td align="center">are neat</td>
<td align="right">$1</td>
</tr>
</tbody>
</table>
<div class="next-chapter">
<a href="../02-markdown&#x2f;07-task-lists.html">
<span>Next chapter: “Task Lists”</span>
<span class="icon">
<svg class="icon-arrow-right">
<use xlink:href="../icons.svg#icon-arrow-right">
</svg>
</span>
</a>
</div>
<footer><p>&copy; 2019 Kenton Hamaluik</p></footer>
</article>
</body>
</html>