【XHTML&CSS读书笔记】缩进、对齐、字母和单词间距

《HTML之路》第1、2章 笔记


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<title>Text-align, text-indent, word and letter spacing</title>
	<style type="text/css" media="all">
	
	body {
		font: 150% arial, helvetica, sans-serif;
	}
	
	#p5 {
		text-indent: 2em; /*首行缩减2em*/
		word-spacing: 1em;/*词间距*/
	}
	
	#p6 {
		text-align: justify; /*设置块级文字的水平对齐方式:left(默认形式),right右对齐,center居中,justify自动调整*/
		letter-spacing: 0.1em;/*字母间距*/
	}
	
	</style>
</head>

<body>

<p id="p5">Even leaving aside the astounding nutritional package, the taste explosion and texture of a well cooked pea is undeniably enough to award this deceptively simple seed the gold-medal of the foodstuff Olympics.</p>

<p id="p6">There is debate surrounding the tampering of the form of the original spherical vegetable. The question as to whether the 'mushy' pea is sacrilege or an innovative approach to re-package the perfect product is a sensitive issue. A similar argument arises when approaching the relatively new craze of mangetout. In-depth study is required, but for now it is too early to assess the true importance of this baby pea pod.</p>


</body>
</html>

运行结果:




  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值