我对 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>
我在这里做错了什么?
编辑
这是呈现表格标题的 html
代码:
<p><br />City Province Italians Population % Italians Lat Lon</br>
我不知道这是不是因为 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/