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/05-images.html

149 lines
6.1 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>The mkbook Book | Images</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/05-images.html" />
<meta property="book:author" content="Kenton Hamaluik" />
<meta property="book:release_date" content="2019-12-20T03:39:13.420786946+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" class = "current">Images</a></li>
<li><a href="../02-markdown/06-tables.html">Tables</a></li>
<li><a href="../02-markdown/07-task-lists.html">Task Lists</a></li>
<li><a href="../02-markdown/08-links.html">Links</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>
<li>
<a href="../07-latex-output.html">LaTeX Output</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;04-katex-formulas.html" alt="KaTeX (Math) Formulas">
<span class="icon">
<svg class="icon-arrow-left">
<use xlink:href="../icons.svg#icon-arrow-left">
</svg>
</span>
</a>
</span>
<span class="title">Images</span>
<span>
<span class="placeholder"></span>
<a href="../02-markdown&#x2f;06-tables.html" alt="Tables">
<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">Images</h1>
<p>To include an image, use the standard markdown format:</p>
<pre style="background-color:#2d2d2d;">
<span style="color:#f99157;">![alt](url </span><span style="color:#d3d0c8;">&quot;</span><span style="color:#f2777a;">title</span><span style="color:#d3d0c8;">&quot;</span><span style="color:#f99157;">)
</span></pre>
<p>This will wrap the image in a <code>figure</code> with an associated <code>figcaption</code> containing the title of the image, as so:</p>
<pre style="background-color:#2d2d2d;">
<span style="color:#f99157;">![a bear](https://placebear.com/g/512/256 </span><span style="color:#d3d0c8;">&quot;</span><span style="color:#f2777a;">A majestic bear</span><span style="color:#d3d0c8;">&quot;</span><span style="color:#f99157;">)
</span></pre>
<p>will render as:</p>
<figure><img src="https://placebear.com/g/512/256" alt="a bear" title="A majestic bear"><figcaption>A majestic bear</figcaption></figure>
<div class="next-chapter">
<a href="../02-markdown&#x2f;06-tables.html">
<span>Next chapter: “Tables”</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>