Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Notifications
Mark all as read
Q&A

Welcome to Codidact Meta!

Codidact Meta is the meta-discussion site for the Codidact community network and the Codidact software. Whether you have bug reports or feature requests, support questions or rule discussions that touch the whole network – this is the site for you.

Post History

86%
+11 −0
Q&A What html tags can we use in posts?

posted 2y ago by luap42‭  ·  edited over 1 year ago by Moshi‭

Answer
#2: Post edited by user avatar Moshi‭ · 2021-04-21T10:57:45Z (over 1 year ago)
Updated list of allowed tags and attributes
  • For obvious reasons, we do not allow you to use any tag or attribute you want. All tags, that aren't on a special inclusion list are stripped from the input.
  • There are two lists, one for posts and one for comments.
  • **Posts** (Question, Answer, Article, IIRC user profiles; so generally everything longer) can contain as tags:
  • - `a`
  • - `p`
  • - `b`
  • - `i`
  • - `em`
  • - `strong`
  • - `hr`
  • - `h1`, `h2`, `h3`, `h4`, `h5`, `h6`
  • - `blockquote`
  • - `img`
  • - `strike`
  • - `del`, `ins`
  • - `code`
  • - `pre`
  • - `br`
  • - `ul`, `ol`, `li`
  • - `sup`, `sub`
  • - `section`
  • - `details`, `summary`
  • These tags can furthermore use the following attributes:
  • - `id`
  • - `class`
  • - `href`
  • - `title`
  • - `src`
  • - `height`
  • - `width`
  • - `alt`
  • **Comments** (and possibly some other shorter text types) may contain:
  • - `a`
  • - `b`
  • - `i`
  • - `em`
  • - `strong`
  • - `strike`
  • - `del`
  • - `code`
  • These tags can use the attributes
  • - `href`
  • - `title`
  • ---
  • This is the current list of available tags. It might, though, change in the future. For example `<details>` and `<summary>` were only added recently.
  • The source code with the most recent list can be found here for:
  • - **posts**: https://github.com/codidact/qpixel/blob/develop/app/helpers/posts_helper.rb
  • - **comments**: https://github.com/codidact/qpixel/blob/develop/app/helpers/comments_helper.rb
  • For obvious reasons, we do not allow you to use any tag or attribute you want. All tags, that aren't on a special inclusion list are stripped from the input.
  • There are two lists, one for posts and one for comments.
  • **Posts** (Question, Answer, Article, IIRC user profiles; so generally everything longer) can contain as tags:
  • - `a`
  • - `p`
  • - `span`
  • - `b`
  • - `i`
  • - `em`
  • - `s`
  • - `strong`
  • - `hr`
  • - `h1`, `h2`, `h3`, `h4`, `h5`, `h6`
  • - `blockquote`
  • - `img`
  • - `strike`
  • - `del`, `ins`
  • - `code`
  • - `pre`
  • - `br`
  • - `ul`, `ol`, `li`
  • - `sup`, `sub`
  • - `section`
  • - `details`, `summary`
  • - `table`, `thead`, `tbody`, `tr`, `th`, `td`
  • These tags can furthermore use the following attributes:
  • - `id`
  • - `class`
  • - `href`
  • - `title`
  • - `src`
  • - `height`
  • - `width`
  • - `alt`
  • - `dir`
  • - `lang`
  • - `start`
  • - `rowspan`
  • - `colspan`
  • **Comments** (and possibly some other shorter text types) may contain:
  • - `a`
  • - `b`
  • - `i`
  • - `em`
  • - `strong`
  • - `strike`
  • - `del`
  • - `code`
  • These tags can use the attributes
  • - `href`
  • - `title`
  • ---
  • This is the current list of available tags. It might, though, change in the future. For example `<details>` and `<summary>` were only added recently.
  • The source code with the most recent list can be found here for:
  • - **posts**: https://github.com/codidact/qpixel/blob/develop/app/helpers/posts_helper.rb
  • - **comments**: https://github.com/codidact/qpixel/blob/develop/app/helpers/comments_helper.rb
#1: Initial revision by user avatar luap42‭ · 2020-08-22T08:55:36Z (about 2 years ago)
For obvious reasons, we do not allow you to use any tag or attribute you want. All tags, that aren't on a special inclusion list are stripped from the input.

There are two lists, one for posts and one for comments.

**Posts** (Question, Answer, Article, IIRC user profiles; so generally everything longer) can contain as tags:

- `a`
- `p`
- `b`
- `i`
- `em`
- `strong`
- `hr`
- `h1`, `h2`, `h3`, `h4`, `h5`, `h6`
- `blockquote`
- `img`
- `strike`
- `del`, `ins`
- `code`
- `pre`
- `br`
- `ul`, `ol`, `li`
- `sup`, `sub`
- `section`
- `details`, `summary`

These tags can furthermore use the following attributes:

- `id`
- `class`
- `href`
- `title`
- `src`
- `height`
- `width`
- `alt`

**Comments** (and possibly some other shorter text types) may contain:

- `a`
- `b`
- `i`
- `em`
- `strong`
- `strike`
- `del`
- `code`

These tags can use the attributes

- `href`
- `title`

---

This is the current list of available tags. It might, though, change in the future. For example `<details>` and `<summary>` were only added recently.

The source code with the most recent list can be found here for:

- **posts**: https://github.com/codidact/qpixel/blob/develop/app/helpers/posts_helper.rb
- **comments**: https://github.com/codidact/qpixel/blob/develop/app/helpers/comments_helper.rb