1. Trang chủ
  2. » Công Nghệ Thông Tin

The Best-Practice Guide to xHTML and CSS phần 8 potx

37 350 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 37
Dung lượng 8,93 MB

Nội dung

tAgs  |   1 tabindex—Where the element appears in the tab order of the page. disabled—Disables the button. It must be used in the format disabled=”disabled”. name—Associates a name to the button so that it can be processed by a form-handling script. type—The button type. Values can be button (doesn’t do anything), submit (default; submits the form when the button is selected), or reset (resets the form). value—An initial value that will appear as the button’s label. Content Text, block (not including form or fieldset), inline (not including input, select, textarea, label, or button), or none. Example <button>Push my <strong>button</strong> baby</button> Related Tags input, form <caption></caption> A caption for a table. This should be placed directly after the opening table tag and will be displayed above the table by default. See Chapter 8, “Tables.” Attributes [Common attributes] Content Text, inline, or none. • • • • • • 1  |   AppendIx A: xhtml reference Example <table> <caption>Animal groups</caption> <! etc. > </table> Related Tags table <cite></cite> In-line citation or reference to another source. See Chapter 2, “Text.” Attributes [Common attributes] Content Text, inline, or none. Example <p>So I asked <cite>Bob</cite> about quotations and he said <q>I know as much about quotations as I do about pigeon fancying</q>. Luckily, I found ‘HTML Dog’ and it said…</p> Related Tags q, blockquote <code></code> Code, such as computer code. See Chapter 2, “Text.” • tAgs  |   1 Attributes [Common attributes] Content Text, inline, or none. Example <code>norahjonesisbland=true;</code> Related Tags samp, var, pre <col /> Table column. Allows attributes to be applied to a table column. Must be used within a colgroup element. See Chapter 8, “Tables.” Attributes [Common attributes] span—The number of columns the element applies to. Note: There are other valid attributes (align, valign, char, charoff) but they are presentational and so CSS should be used instead. Content Empty. Example <table> <colgroup> <col /> <col class=”alternative” /> • • • 0  |   AppendIx A: xhtml reference <col /> </colgroup> <tr> <th>Cats</th> <th>Dogs</th> <th>Lemurs</th> </tr> <! etc. > </table> Here, the styles of the class “alternative” will be applied to the second column, i.e., the second cell in every row. Related Tags colgroup, tr <colgroup></colgroup> Table column group. Allows attributes to be applied to a set of table columns. See Chapter 8, “Tables.” Attributes [Common attributes] span—The number of columns the element applies to. Note: There are other valid attributes (align, valign, char, charoff) but they are presentational and so CSS should be used instead. Content col elements or none Example <table> <colgroup span=”2” class=”alternative”></colgroup> • • tAgs  |   1 <tr> <th>Cats</th> <th>Dogs</th> <th>Lemurs</th> </tr> <! etc. > </table> Related Tags col, tr <dd></dd> A definition description that is paired with one or more definition terms within a definition list. See Chapter 6, “Lists.” Attributes [Common attributes] Content Text, block, inline, or none. Example <dl> <dt>Dog</dt> <dd>A carnivorous mammal of the family Canidae.</dd> </dl> Related Tags dl, dt •   |   AppendIx A: xhtml reference <del></del> An editorial deletion. Used in conjunction with ins when you want to track changes in a document. See Chapter 2, “Text.” Attributes [Common attributes] cite—The location (as a URI) of an explanation of why the insertion was made. datetime—When the deletion was made (in the format of YYYYMMDD). Content Text, block, inline, or none. Example <p>Patrick was walking down the road when he saw a <del datetime=”2 0040329”>fluffy kitten</del><ins cite=”http://www.htmldog.com”>giant rabid snarling mutant saber-toothed goat</ins>.</p> Related Tags ins <dfn></dfn> Definition term. See Chapter 2, “Text.” Attributes [Common attributes]—Note the title attribute is often used to describe the definition. • • • • tAgs  |    Content Text, inline, or none. Example <p><dfn title=”Microsoft web browser”>Internet Explorer</dfn> is the most popular browser used underwater.</p> Related Tags abbr <div></div> Division. A block-level element that groups together a multiple HTML elements. Commonly used to apply CSS to a chunk of a page. See Chapter 1, “Getting Started,” and Chapter 5, “Layout.” Attributes [Common attributes] Content Text, block, inline, or none. Example <div id=”content”> <h1>How to make a falafel</h1> <p>Buy a falafel seed and plant it in your garden.</p> </div> Related Tags span •   |   AppendIx A: xhtml reference <dl></dl> Definition list, which contains terms and descriptions. See Chapter 6, “Lists.” Attributes [Common attributes] Content One or more dt or dd. Example <dl> <dt>Cat</dt> <dd>A little furry thing that purrs.</dd> <dt>Dog</dt> <dd>A big shaggy thing that barks.</dd> </dl> Related Tags dt, dd, ul <dt></dt> A definition term that is paired with one or more definition descriptions within a definition list. See Chapter 6, “Lists.” Attributes [Common attributes] Content Text, inline, or none. • • tAgs  |    Example <dl> <dt>Dog</dt> <dd>A carnivorous mammal of the family Canidae.</dd> </dl> Related Tags dl, dd <em></em> Emphasis. Attributes [Common attributes] Content Text, inline, or none. Example <p>You lookin’ at <em>me</em>?</p> Related Tags strong <fieldset></fieldset> A group of related form items. See Chapter 9, “Forms.” Attributes [Common attributes] Content Text, legend, block, inline, or none. • •   |   AppendIx A: xhtml reference Example <form action=”whatever.php”> <fieldset> <! lots of form fields > </fieldset> <fieldset> <! lots of form fields > </fieldset> </form> Related Tags form, legend <form></form> A form, allowing the sending of user-input data. See Chapter 9, “Forms.” Attributes [Common attributes] action (required)—Tells the browser where to send the form data when it is submitted. This can be any URI, the destination of which will be a script where the form data is initially processed. method—Tells the browser how to send the form data. You have two options here: get or post. enctype—The MIME type used to encode the form data. The default value is application/x-www-form-urlencoded, but this should be multipart/form-data when the form contains a file input element. accept—Which file-types (selected from a file input element) should be accepted. This is a comma-separated list of MIME types. accept-charset—Which character sets should be accepted. This is a comma- separated list. • • • • • • [...]... The other Related Tags ul, ol Defines a link to an external resource such as a CSS file, a shortcut icon, or customized navigation See Chapter 1, “Getting Started.” Attributes • [Common attributes] • href The target of the link • charset The character set of the target of the link • hreflang The language of the target of the link • type The MIME type of the target of the link... link • type The MIME type of the target of the link • rel The relationship of the target of the link to the current page Some universally understood values are shortcut icon and stylesheet • rev The relationship of the current page to the target of the link 236  |  Appendix A: XHTML Reference • media —Which media the link is associated to A value such as screen, print, projection, braille, speech,... The location of the data for the object in the form of a URL • type The content type of the data specified by the data attribute This basically lets the browser know what kind of file to expect • declare —Specifies that the object is a declaration only Must be used in the format declare=”declare” • classid The location of the object in the form of a URL or Windows Registry location • codebase The. .. one and all Welcome to the world of paragraphs. This will be the second paragraph then… Related Tags h1 to h6, em, strong Parameter of an object It is often the case that you will want, or need, to pass certain parameters to the object See Chapter 7, “Scripts & Objects.” Attributes • name (required)—Used so that the element can be referenced and processed by the object • value The. .. specified in the classid, data, and archive attributes should be taken • codetype The content type of the object • archive —Resources relevant to the object The value should be a URL or a number of URLs separated by spaces • standby —Text that will be displayed while the object is loading • height The height of the object (in pixels), just like in an img element • width The width of the object (in... =”119 ,80 ,162 ,82 ,175,102, 183 ,102,175,1 48, 122,146” href =”africa.html” alt=”Africa” /> Related Tags area Meta information Used to provide information about the HTML page See Chapter 1, “Getting Started.” Attributes • [I18n attributes] • content (required) The meta information itself • name The name given to the meta information Frequently used values of the name attribute are “keywords” and. .. referenced and processed by the object • value The value of the parameter The values of the name and value attributes are completely dependent on the object All that param elements do is tell the object “I want to set this [name] to this [value].” • id —Uniquely identifies the element • type The content type • valuetype The content type of the value attribute Values can be data, ref, or object Content... “Text.” Tags  |  245 Attributes • [Common attributes] • cite The location (in the form of a URI) where the quote has come from Content Text, inline, or none Example So I asked Bob about quotations and he said I know as much about quotations as I do about pigeon fancying Luckily, I found ‘HTML Dog: The Best-Practice Guide to XHTML and CSS and it said Related Tags blockquote, cite ... remainder of the page information after the document type d ­ eclaration See Chapter 1, “Getting Started.” Attributes • [I18n attributes] • xmlns (required) The XML namespace The value must be http://www w3.org/1999 /xhtml Content One head and one body Example . href The target of the link. charset The character set of the target of the link. hreflang The language of the target of the link. type The MIME type of the target of the link. rel The relationship. relationship of the target of the link to the current page. Some uni- versally understood values are shortcut icon and stylesheet. rev The relationship of the current page to the target of the link. • • • • • • • •   |  . tabindex—Where the element appears in the tab order of the page. disabled—Disables the button. It must be used in the format disabled=”disabled”. name—Associates a name to the button so that

Ngày đăng: 07/08/2014, 17:21