Table 和图像在 GitHub Markdown 中并排显示

Table and image side to side in GitHub Markdown

我一直在尝试调整此页面上类似问题中提供的代码,但结果总是出现一些奇怪的错误格式 table,其中包含图像。

我确定必须有一种方法可以将两个项目并排放置。

你不能,尤其是 GitHub。如 Markdown rules:

中所述

The idea for Markdown is to make it easy to read, write, and edit prose. HTML is a publishing format; Markdown is a writing format. Thus, Markdown’s formatting syntax only addresses issues that can be conveyed in plain text.

For any markup that is not covered by Markdown’s syntax, you simply use HTML itself.

最后一点乍一看似乎很简单。如 to the question you can define inline styles within raw HTML to accomplish the desired effect. However, as explained in github/Markup 所示,在 GitHub 将您的 Markdown 转换为 HTML:

之后
  1. The HTML is sanitized, aggressively removing things that could harm you and your kin—such as script tags, inline-styles, and class or id attributes.

换句话说,以安全的名义,GitHub 去除所有应用于原始 HTML 的样式。因此,虽然可能有多种方法可以让两个元素与 HTML/CSS 并排显示,但 GitHub 明确并故意禁止您在他们的网站上这样做。