8.5. 行內元素

8.5.1. 強調資訊

Two levels of emphasis are available in XHTML, em and strong. em is for a normal level of emphasis and strong indicates stronger emphasis.

em is typically rendered in italic and strong is rendered in bold. This is not always the case, and should not be relied upon. According to best practices, web pages only hold structural and semantical information, and stylesheets are later applied to them. Think of semantics, not formatting, when using these tags.

範例 8.12. emstrong 範例

用法:

<p><em>This</em> has been emphasized, while
  <strong>this</strong> has been strongly emphasized.</p>

8.5.2. 標示等寬文字

Content that should be rendered in a fixed pitch (typewriter) typeface is tagged with tt (for teletype).

範例 8.13. tt 範例

用法:

<p>Many system settings are stored in
  <tt>/etc</tt>.</p>

8.5.3. 連結

注意:

Links are also inline elements.

8.5.3.1. 連結在網站上的其他文件

A link points to the URL of a document on the web. The link is indicated with a, and the href attribute contains the URL of the target document. The content of the element becomes the link, indicated to the user by showing it in a different color or with an underline.

範例 8.14. 使用 <a href="...">

用法:

<p>More information is available at the
  <a href="http://www.&os;.org/">&os; web site</a>.</p>

This link always takes the user to the top of the linked document.

8.5.3.2. 連結說明文件的特定章節

To link to a specific point within a document, that document must include an anchor at the desired point. Anchors are included by setting the id attribute of an element to a name. This example creates an anchor by setting the id attribute of a p element.

範例 8.15. 建立錨點

用法:

<p id="samplepara">This paragraph can be referenced
  in other links with the name <tt>samplepara</tt>.</p>

Links to anchors are similar to plain links, but include a # symbol and the anchor's ID at the end of the URL.

範例 8.16. 連結到另一份文件中已命名的段落

The samplepara example is part of a document called foo.html. A link to that specific paragraph in the document is constructed in this example.

<p>More information can be found in the
  <a href="foo.html#samplepara">sample paragraph</a> of
  <tt>foo.html</tt>.</p>

To link to a named anchor within the same document, omit the document's URL, and just use the # symbol followed by the name of the anchor.

範例 8.17. 連結到同一份文件已命名的段茖

The samplepara example resides in this document. To link to it:

<p>More information can be found in the
  <a href="#samplepara">sample paragraph</a> of this
  document.</p>

本文及其他文件,可由此下載: ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/

若有 FreeBSD 方面疑問,請先閱讀 FreeBSD 相關文件,如不能解決的話,再洽詢 <questions@FreeBSD.org>。

關於本文件的問題,請洽詢 <doc@FreeBSD.org>。