Coffee Corner Discussions
Get to know other SAP Community members during your coffee break. Join discussions on a variety of topics in a casual environment.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

The Unofficial SAP Community HTML Tags Documentation

Marian_Zeis
Active Contributor
7,646

SAP Community HTML Tags Reference Guide (updated Oct 1, 2025)

SAP Community has historically lacked official HTML docs, which left bloggers guessing about what works. Based on community feedback and fresh platform updates, here’s a practical reference of what actually works in practice.

New (this week): the platform now supports the <code> tag and advanced HTML, enabling table-of-contents (TOC) links in blog posts and documents. See the platform’s “What’s New” note for details.

Use this guide to convert existing posts or create new ones without “unsupported HTML tags” errors. If you encounter allowed/forbidden tags not mentioned here, please comment so we can keep this up to date.

Supported HTML Tags

CategoryTagsNotes (incl. allowed attributes)
Text Formattingstrong, b, em, i, u, strike, font<font> supports face, size, color (e.g., <font color="#ff6600">). Use semantic tags (<strong>/<em>) where possible.
Structureh1–h6, p, div, span, center, blockquote, hr, br<p> supports align. <div> supports align, class. <span> supports class.
Headings get auto-generated IDs for deep linking; see “TOC & Deep Linking” below. The legacy <a name="..."> pattern does not work.
Listsul, ol, liStandard ordered/unordered lists and list items.
Tablestable, tbody, tr, td<table> supports cellspacing, cellpadding, border, width, height.
<tr>/<td> support width, height.
Tip: add border="1" if you want visible grid lines.
Linksa<a> supports href, target. (No rel.) Anchors can target heading IDs for in-page TOCs.
Codecode, pre, li-codeNew: <code> is now supported (great for inline snippets).
<pre> is allowed for preformatted blocks (monospace, no syntax highlighting).
<li-code lang="..."> remains the best option for block code with syntax highlighting. Known languages include: javascript, abap, json, bash, xml, css, html.
SAP Community Customli-code, li-emoji, li-imageli-code: syntax-highlighted blocks (see examples below).
li-emoji: use via the editor for best results.
li-image: use the platform’s image uploader; supports width, height, align, size.

TOC & Deep Linking (Advanced HTML)

Thanks to Sandra for documenting this behavior.

  1. When you save a post, each heading (<h2>, <h3>, …) gets an id like toc-hId-1366081506.
  2. You can link to that section with <a href="#toc-hId-1366081506">Section title</a>.
  3. Important: heading IDs are assigned top-to-bottom on save. If you insert/delete/move headings, IDs can change below that point. Create/update your TOC late, when headings are final, and re-check after saving.
  4. Custom legacy anchors like <h1><a name="tag">…</a></h1> do not work.

Code Examples

Block code with highlighting

// JavaScript with syntax highlighting
function sapCommunityRocks() {
  console.log("This code block looks amazing!");
  return true;
}

Inline code

Use const title = "SAP Community"; inside a paragraph.

SAP Community Custom Tags

TagExampleNotes
li-code<li-code lang="javascript">
console.log('Hello!');
</li-code>
Use for block code with syntax highlighting. Inline code should use <code>.
li-emojiRecommended to insert via the editor UI.
li-image<li-image width="200" alt="description" align="center"></li-image>Use the SAP Community image uploader. Supports width, height, align, size attributes.

Formatting Tips from the Community

  • Block quotes: <blockquote> produces clean quoted sections. Many prefer adding it manually over the editor button that pastes an entire previous post.
  • Tables: add border="1" if you want visible lines; otherwise the table may render without borders.

Forbidden (or Not Supported) Items

ProblemWhat Gets Stripped/BlockedUse Instead
Embedded content<iframe>, <noscript>Not supported — use screenshots/images or links.
Image sourcesblob: URLs, certain external sourcesUpload via the SAP Community image uploader (<li-image>).
JavaScriptInline handlers like onclick, onloadNot supported (security).
Custom stylesMany CSS classes / arbitrary inline stylingUse the supported HTML formatting options above.
Legacy anchors<a name="...">Link to auto-generated heading IDs instead (see TOC section).

Quick Reference Cheat Sheet

What You WantUse This
Inline code<code>yourInlineCode()</code>
Code blocks (highlighted)<li-code lang="abap|javascript|xml|…">your code</li-code>
Code blocks (monospace only)<pre>your preformatted text</pre>
Images<li-image width="..." alt="..." align="center"></li-image> (via uploader)
EmojisInsert via editor (or )
Bold / italics<strong>…</strong> / <em>…</em>
Colored text<font color="#ff6600">text</font>
Tables<table border="1" cellpadding="4" cellspacing="0">…</table>
TOC links<a href="#toc-hId-123456789">Section title</a> (add after saving, IDs may change if headings change)

For AI / Markdown Conversion

Try this community-shared Claude artifact to convert Markdown→HTML that’s SAP-Community-compliant (you might need to hit Save twice due to trailing <p> quirks):
Markdown → SAP Community HTML converter


Credits: Anne (new <code> & advanced HTML), Sandra (heading IDs & TOC behavior), Josh (current allowed tags/attributes), Dominik (blockquote tip), AJ (Markdown→HTML artifact), and everyone adding examples & corrections. Keep the comments coming!

9 REPLIES 9
Read only

abo
Active Contributor
7,624

SAP and documentation, once again the Community has to step in and fill the gaps. #eyeroll

Well done, @Marian_Zeis 🙂

 

Read only

ajmaradiaga
Developer Advocate
Developer Advocate
7,264

This is what's so great about the SAP community... community members just helping each other out. Thanks @Marian_Zeis for sharing.

Read only

Dominik_Tylczynski
SAP Champion
SAP Champion
7,243

I use <blockquote> quite a lot to format quotes nicely. I prefer to add the tag manually over the provided pushbutton that automatically inserts an entire previous post, e.g..

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Best regards

Dominik Tylczynski

Read only

ajmaradiaga
Developer Advocate
Developer Advocate
7,221

This is a Claude artifact that can help convert Markdown to HTML compliant with the SAP Community HTML tags. It is not perfect, there are trailing p tags without the opening p tag, but it should work if you hit save twice :-).

https://claude.ai/public/artifacts/209a363e-c69e-4b63-8cbc-1d687f04ec1a

Read only

josh_bentley
Community Manager
Community Manager
7,206

Hi all of my fellow SAP Community members!  Always love your passion and commitment to raising the conversation up and being as constructive and helpful as possible with your post, and your comment replies for all members new & old to our online platform to see and learn from. 

To that end I wanted to thank Marian for this post as it gives me and the very hard working team behind the scenes a chance to engage and give you a short status update on this topic of HTML tags.  Please see the attached table below and know that we are working on an approach to enable additional tags.  - Josh

 

Current permissions:
 
HTML Tag
Allowed HTML Tag Attributes
Description
<a>
href, target
Creates a hyperlink
<b>
none
Bold
<blockquote>
dir
Creates an indented block of text
<br>
none
Line break
<center>
none
Centers text
<div>
align, class
Surrounds a block of content to be formatted together
<em>
none
Italicize
<font>
face, size, color
Controls font size, face and color
<hr>
none
Horizontal line
<i>
none
Italics
<li>
none
List items (used with <ol> or <ul>)
<ol>
 
Ordered list
<p>
align
A paragraph of text
<pre>
none
Pre-formatted text. Typically using a monospace font
<span>
class
Groups text to be formatted together
<strike>
none
Strikethrough
<strong>
none
Bold
<table>

cellspacing, cellpadding, border, width, height

Table
<td>
width, height
Table column
<tr>
width, height
Table row
<u>
none
Underline
<ul>
 
Unordered list
Read only

Sandra_Rossi
Active Contributor
4,335

An hyperlink may go to inside the blog post (e.g., a table of contents) if the target is a heading. When saving, an ID is allocated to a title (e.g., <h2 id="toc-hId-1366081506">SAP Community Custom Tags</h2>). You may then create an hyperlink to this heading by using #toc-hId-1366081506. Example: link to SAP Community Custom Tags.

Sandra_Rossi_0-1757509341805.png

Create these hyperlinks only late or when you are sure that the headings are frozen (no heading deletion or insertion), because the previous IDs are reassigned to the headings in the sequence top-to-bottom, i.e., if you insert or delete headings, the IDs will become wrong after the positions where they are changed.

Note that I couldn't define a custom tag manually (e.g., <h1><a name="tag">Heading</a></h1>).

Read only

AnnePetteroe
Community Manager
Community Manager
664

We rolled out support for the <code> tag and advanced HTML this week. The underlying advanced HTML supports TOCs to be added to blog posts and documents/knowledge base articles. 
There is more information in our What's New post

Read only

AnnePetteroe
Community Manager
Community Manager
655

Your post looks so pretty with the <code> tag now @Marian_Zeis - makes my developer heart happy to see 😀

Read only

652

Yes, that really helps showing some simple code text 🙂