HTML換行符和水平線

twc829發表於2016-05-05

  • 換行符<br>

在一個標籤內某處新增換行符,相當於在該處進行換行;

舉例:

新增換行符前,

		<h2>About Us</h2>
		<p>Mr Green's Smelly Fish Emporium prides itself on catching, preparing and delivering
		the smelliest fish right to your doorstep. Whether you like to cook them, feed them to
		your cat, or just hide them in your unruly neighbours porch, Mr Green has it covered!</p>


新增換行符後,

		<h2>About Us</h2>
		<p>Mr Green's Smelly Fish Emporium prides itself on catching, preparing and delivering
		the smelliest fish right to your doorstep. <br> Whether you like to cook them, feed them to
		your cat, or just hide them in your unruly neighbours porch, Mr Green has it covered!</p>


  • 水平線<hr>

水平線是分割網頁內容的一種方法;

舉例:

新增水平線前,

		<p>We sell the smelliest fish on the planet</p>
		
		<ul>
			<li><a href="contact.html">Contact Us</a></li>
			<li><a href="prices/freshwater-fish-prices.html">Price List</a></li>
			<li><a href="http://www.163.com" target="_blank">Link to Netease Web</a></li>
			<li><a href="downloads/all-prices.pdf">Download C++ book</a></li>
		</ul>
		
		<h2>Types of Fish We Sell</h2>


新增水平線後,

		<p>We sell the smelliest fish on the planet</p>
		
		<hr>
		
		<ul>
			<li><a href="contact.html">Contact Us</a></li>
			<li><a href="prices/freshwater-fish-prices.html">Price List</a></li>
			<li><a href="http://www.163.com" target="_blank">Link to Netease Web</a></li>
			<li><a href="downloads/all-prices.pdf">Download C++ book</a></li>
		</ul>
		
		<hr>
		
		<h2>Types of Fish We Sell</h2>



相關文章