HTML/CSS in posts

AI-generated summary

The discussion HTML/CSS in posts revolves around the possibility of using HTML tags with inline styles in posts. JPD initiated the conversation by asking if this feature is available or planned for the future, providing an example of a table with inline styles. Heliosurge tested the code, and it rendered correctly. JPD clarified that the goal is to have the content display as it would in a browser, sharing a screenshot of the desired output. JammyDodger responded that while there is no option for unrestricted HTML/CSS use, the Discourse BBCode plugin or custom wraps can extend the possibilities for styling posts.

Is there any option (or is there any chance such an option will be added in foreseeable future) to be able use HTML tags with inline styles in posts? For example:

<TABLE style="border-collapse: collapse; font-size: 10pt; font-family: Arial">
<COLGROUP>
<COL style="width: 46px"/>
<COL style="width: 46px"/>
</COLGROUP>
<TR style="height: 20px">
<TD colspan="17" style="font-size: 8pt; background-color: #ff9fec; text-align: center; vertical-align: bottom; padding: 2px 2px 4px 4px">
abc...def</TD>
<TD style=" font-size: 8pt; background-color: #ff9fec; text-align: center; vertical-align: bottom; padding: 2px 2px 4px 4px">
abc...def
</TD>
</TR>
</TABLE>
abc...def abc...def

This is your code posted

The key part is making it look like on the screen (in a browser), which would be:

discourse2

There isn’t the option to have a free range of html/css usable in posts but you can extend what’s possible by installing the Discourse BBCode plugin, or by creating pre-styled custom wraps: