何时用<q> 何时用<blockquote>。
怎么才算短 ,怎么才算长,有固定长度的界限吗? 超过多少字符就不能用<q> 了
怎么才算短 ,怎么才算长,有固定长度的界限吗? 超过多少字符就不能用<q> 了
2016-09-25
1、<q> 标签在本质上与 <blockquote> 是一样的。不同之处在于它们的显示和应用。<q> 标签用于简短的行内引用。如果需要从周围内容分离出来比较长的部分(通常显示为缩进的块),请使用 <blockquote> 标签。
2、使用 blockquote 元素的话,浏览器会插入换行和外边距,而 q 元素不会有任何特殊的呈现。
3、lockquote是内容的引用。内容必须包括块级元素,如标题,列表,段落或div标签,一般用于长的段落引用。这个元素也可以有一个可选属性cite指定的位置(以URI的形式出现)
4、<q> 标签可定义一个短的引用。<q> 标签在本质上与 <blockquote> 是一样的。不同之处在于它们的显示和应用。<q> 标签用于简短的行内引用。
短引用:
<p>WWF's goal is to:
<q cite="http://www.wwf.org">build a future where people live in harmony with nature</q> we hope they succeed.</p>
长引用:
<blockquote>Here is a long quotation here is a long quotation here is a long quotation
here is a long quotation here is a long quotation here is a long quotation
here is a long quotation here is a long quotation here is a long quotation.</blockquote>
举报