css - Jekyll-now : table headers are not rendered properly

标签 css github markdown jekyll github-pages

我对 markdown/css 完全陌生,我正在尝试在 Github Pages 上建立我的博客。

我无法正确显示表格标题。

这就是我在 .md 文件中创建它们的方式,该文件直接来自使用 Jupyter 和 R 生成的笔记本:

<table>
<thead><tr><th></th><th scope=col>ID</th><th scope=col>City</th><th scope=col>Province</th><th scope=col>Italians</th><th scope=col>Population</th><th scope=col>Percentage</th><th scope=col>Lat</th><th scope=col>Lon</th></tr></thead>
<tbody>

这就是 Jekyll-now 将它们可视化的方式: enter image description here

我在这里做错了什么?

编辑

这是呈现表格标题的 html 代码:

<p><br />City             Province         Italians   Population   % Italians   Lat     Lon&lt;/br&gt;

我不知道这是不是因为 Jekyll 使用了与 Github 不同的 markdown 引擎。

最佳答案

我今天也遇到了这个问题,终于找到办法解决了。很简单,只需要在scope=后面加上引号就可以了,如下:

<table>
<thead><tr><th></th>
<th scope="col">ID</th>
<th scope="col">City</th>
<th scope="col">Province</th>
<th scope="col">Italians</th>
<th scope="col">Population</th>
<th scope="col">Percentage</th>
<th scope="col">Lat</th>
<th scope="col">Lon</th></tr></thead>
<tbody>

您可以查看我在 github 页面上的帖子 https://juntaodong.com/BANA7038-HW1/ 和相应的原始 Markdown https://raw.githubusercontent.com/JuntaoDong/juntaodong.github.io/master/_posts/2019-01-23-BANA7038-HW1.md

关于css - Jekyll-now : table headers are not rendered properly,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43819648/

相关文章:

html - Firefox adblock 阻止了我的 CSS 样式

git - 我怎样才能保持 git fork 更新?

github - 在 github readme.md 文件中使用图像映射

html - 如何让 div 与屏幕的左右两侧分开 10%?

html - 位置跨度在 p 标签内,因此一部分留在左侧,另一部分在右侧

git - 如何为不属于我的分支提取未 merge 的 pull 请求?

markdown - 如何使用 Markdown 创建只有一行的表

javascript - 如何使用 markdown-it.js 解析 div 中的内容?

javascript - 仅在单击链接时加载 iframe

Github 显示我的提交已被 2 位作者推送 : me and me