Images#
Relative path#

Absolute path#

Caption#

Image and caption are automatically centered!
{style="width:40%"}
/// caption
Image and caption are automatically centered!
///
Dark vs light mode (CSS)#
raw HTML#
# <!> note the path to the image files is 1 directory up!
<div class="theme-image">
<img src="../img/zelda_light_mode.png" alt="Light Mode Image" class="light-mode">
<img src="../img/zelda_dark_mode.png" alt="Dark Mode Image" class="dark-mode">
</div>
# CSS selector
.theme-image img {
/* Styles for all images inside .theme-image */
}
# or to select a particular image in the div
/* Styles for the light mode image */
}
with markdown#

# markdown
{ .light-mode style="width:40%"}
{ .dark-mode style="width:40%"}
# to html
<img alt="" class="light-mode" src="img/zelda_light_mode.png" style="width:40%">
<img alt="" class="dark-mode" src="img/zelda_dark_mode.png" style="width:40%">
# CSS selector
img.light-mode {
/* Your styles here */
}

# markdown
{ .theme-image .light-mode style="width:40%"}
{ .theme-image .dark-mode style="width:40%"}
# to html
<img alt="" class="theme-image light-mode" src="img/zelda_light_mode.png" style="width:40%">
<img alt="" class="theme-image dark-mode" src="img/zelda_dark_mode.png" style="width:40%"></p>
# CSS selector
img.theme-image.light-mode {
/* Images must have BOTH classes to be selected */
}
# or
img.light-mode {
/* Images must have the light-mode class */
}