开发者

how to have h1 inside a link in textile

in textile:

to add a link we do: "Link text":http://example.com

开发者_运维知识库

to add h1 we do: h1. Something

how do you add an h1 inside a link? like <a href="example.com"><h1>Link Text</h1></a>


Reading through a lot of Textile's own help files, there's no way to put a header inside of a link. There is, however, a way to put a link inside of a header.

The reason is that Textile has two concepts of objects. "Block" objects and "phrase" objects. All phrases are contained within blocks, and any phrase can be contained within only one block. Blocks may not contain other blocks, and phrases may not contain blocks.

h1 is a "block" element. a is a "phrase" element. Therefore h1 can contain a, but a cannot contain h1. To do this you would type:

h1. "Link text":http://example.com
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜