Does anyone know why only SOME HTML tags work on your README? #144854
-
BodyCertain tags wont work, for example, the float: tag does not work however the text-align: tag does. Any fixes? Guidelines
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
GitHub READMEs are rendered using GitHub Flavored Markdown (GFM), which supports a limited subset of HTML tags and CSS properties for security and simplicity. Here are some supported HTML Tags in GitHub READMEs:
HTML elements like |
Beta Was this translation helpful? Give feedback.
-
Thanks! I noticed this while trying to snap a badge to the right side of the README while also keeping it on the same line as some text. Do you have any idea on how to achieve this? |
Beta Was this translation helpful? Give feedback.
-
That's a good question, i am not sure if it would work or not, but I would try something like this:
|
Beta Was this translation helpful? Give feedback.
-
The reason only some HTML tags work in your README is that platforms like GitHub render README files using a specific markup language (like Markdown) that only supports a subset of HTML. This is primarily for security and consistency reasons. |
Beta Was this translation helpful? Give feedback.
GitHub READMEs are rendered using GitHub Flavored Markdown (GFM), which supports a limited subset of HTML tags and CSS properties for security and simplicity.
However, basic inline styles like text-align often work because they're less intrusive. Unfortunately, there's no way to enable unsupported tags or styles in a GitHub README directly.
Use Markdown formatting wherever possible.
If you need complex layouts or styles, consider hosting your documentation elsewhere (e.g., GitHub Pages) where you have full control over HTML and CSS.
Here are some supported HTML Tags in GitHub READMEs:
<h1>, <h2>, <h3>, <h4>, <h5>, <h6>
<b>, <strong>, <i>, <em>,<u>, <s>, <str…