Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
quarto-dev
GitHub Repository: quarto-dev/quarto-cli
Path: blob/main/dev-docs/feature-format-matrix/qmd-files/image/alt-text/document.qmd
3593 views
---
title: "Alt text"
format:
  html:
    quality: 2
  revealjs:
    quality: 2
_quarto:
  tests:
    html: &html_like_tests
      ensureHtmlElements:
        - ['div#case1 img[alt="Alt"]',
           'img#case2[alt="Alt"]',
           'div#fig-case3 img[alt="Alt"]',
           'div#fig-case4 img[alt="Alt"]',
           'div#tbl-case5 img[alt="Alt"]',
           'div#tbl-case6 img[alt="Alt"]']
        - []
    revealjs: *html_like_tests
---

## In HTML

With caption, becomes a pandoc.Figure, but not a float:

![Caption]({{< placeholder 400 >}}){#case1 fig-alt="Alt"}

Without caption, it's simply an image:

![]({{< placeholder 400 >}}){#case2 fig-alt="Alt"}

In crossreferenceable figures, with and without captions:

![Caption]({{< placeholder 400 >}}){#fig-case3 fig-alt="Alt"}

![]({{< placeholder 400 >}}){#fig-case4 fig-alt="Alt"}

In crossreferenceable non-figure floats, with and without captions:

![Caption]({{< placeholder 400 >}}){#tbl-case5 fig-alt="Alt"}

![]({{< placeholder 400 >}}){#tbl-case6 fig-alt="Alt"}