Communities

(DEV) Codidact Meta
(DEV) Codidact Meta
(DEV) Writing
(DEV) Writing
Proposals
Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

50%
+0 −0
Q&A Markdown image formatting test

I prefer sticking to Markdown in my own posts, for compatibility for anyone who wants to reuse sections of my posts outside Codidact, but there are already several ways to format posts using the ex...

posted 1mo ago by trichoplax‭

Answer
#1: Initial revision by user avatar trichoplax‭ · 2024-08-08T14:45:54Z (about 1 month ago)
I prefer sticking to Markdown in my own posts, for compatibility for anyone who wants to reuse sections of my posts outside Codidact, but there are already several ways to format posts using the existing HTML classes that Codidact defines (through [Co-Design](https://design.codidact.org/utilities/colors/)).

## Examples

```html
<section class="notice">

![This is some alternative candy](https://a.dev.codidact.org/uploads/0f2vuwc7bh8qo1sbnni5fq01jxcr)
</section>
```

<section class="notice">

![This is some alternative candy](https://a.dev.codidact.org/uploads/0f2vuwc7bh8qo1sbnni5fq01jxcr)
</section>

---

```html
<section class="notice is-success">

![This is some alternative candy](https://a.dev.codidact.org/uploads/0f2vuwc7bh8qo1sbnni5fq01jxcr)
</section>
```

<section class="notice is-success">

![This is some alternative candy](https://a.dev.codidact.org/uploads/0f2vuwc7bh8qo1sbnni5fq01jxcr)
</section>

---

```html
<section class="notice is-warning">

![This is some alternative candy](https://a.dev.codidact.org/uploads/0f2vuwc7bh8qo1sbnni5fq01jxcr)
</section>
```

<section class="notice is-warning">

![This is some alternative candy](https://a.dev.codidact.org/uploads/0f2vuwc7bh8qo1sbnni5fq01jxcr)
</section>

---

```html
<section class="notice is-danger">

![This is some alternative candy](https://a.dev.codidact.org/uploads/0f2vuwc7bh8qo1sbnni5fq01jxcr)
</section>
```

<section class="notice is-danger">

![This is some alternative candy](https://a.dev.codidact.org/uploads/0f2vuwc7bh8qo1sbnni5fq01jxcr)
</section>

---

```html
<section class="notice has-margin-24">

![This is some alternative candy](https://a.dev.codidact.org/uploads/0f2vuwc7bh8qo1sbnni5fq01jxcr)
</section>
```

<section class="notice has-margin-24">

![This is some alternative candy](https://a.dev.codidact.org/uploads/0f2vuwc7bh8qo1sbnni5fq01jxcr)
</section>

---

```html
<section class="notice has-background-color-white has-border-color-black">

![This is some alternative candy](https://a.dev.codidact.org/uploads/0f2vuwc7bh8qo1sbnni5fq01jxcr)
</section>
```

<section class="notice has-background-color-white has-border-color-black">

![This is some alternative candy](https://a.dev.codidact.org/uploads/0f2vuwc7bh8qo1sbnni5fq01jxcr)
</section>