在Markdown中创建没有标题的表 [英] Create a table without a header in Markdown
问题描述
是否可以在Markdown中创建没有标题的表?
Is it possible to create a table without a header in Markdown?
HTML看起来像这样:
The HTML would look like this:
<table>
<tr>
<td>Key 1</td>
<td>Value 1</td>
</tr>
<tr>
<td>Key 2</td>
<td>Value 2</td>
</tr>
</table>
推荐答案
大多数Markdown解析器不支持没有标题的表.这意味着标头的分隔线是强制性的.
Most Markdown parsers don't support tables without headers. That means the separation line for headers is mandatory.
- multimarkdown
- Maruku :Ruby中流行的实现方式
- byword :所有表都必须以一行或多行标题开头"
-
PHP Markdown Extra 第二行包含强制性标头和内容之间的分隔线"
- multimarkdown
- Maruku: A popular implementation in Ruby
- byword: "All tables must begin with one or more rows of headers"
PHP Markdown Extra "second line contains a mandatory separator line between the headers and the content"
RDiscount 使用PHP Markdown Extra语法.
- Kramdown :Ruby中的解析器
- Text :: MultiMarkdown : Perl CPAN模块.
- MultiMarkdown :Windows应用程序.
- ParseDown Extra :PHP中的解析器.
- Pandoc :用Haskell编写的命令行文档转换器(通过其
simple_tables
支持无标题表)和multiline_tables
扩展名) - Flexmark :Java中的解析器.
- Kramdown: A parser in Ruby
- Text::MultiMarkdown: Perl CPAN module.
- MultiMarkdown: Windows application.
- ParseDown Extra: A parser in PHP.
- Pandoc: A document converter for the command line written in Haskell (supports header-less tables via its
simple_tables
andmultiline_tables
extensions) - Flexmark: A parser in Java.
如果您能够更改HTML输出的CSS,则可以利用:empty
伪类来隐藏一个空标题,并使它看起来根本没有标题.
If you're able to change the CSS of the HTML output you can however leverage the :empty
pseudo class to hide an empty header and make it look like there is no header at all.
这篇关于在Markdown中创建没有标题的表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!