📄 rfc2854.txt
字号:
RFC 2854 The 'text/html' Media Type June 2000
Note, however, that the HTTP protocol allows the transport of data
not in canonical form, and, in particular, with other end-of-line
conventions; see [HTTP] section 3.7.1. This exception is commonly
used for HTML.
HTML sent via email is still subject to the MIME restrictions; this
is discussed fully in [MHTML] Section 10.
5. Recognizing HTML files
Almost all HTML files have the string "<html" or "<HTML" near the
beginning of the file.
Documents conformant to HTML 2.0, HTML 3.2 and HTML 4.0 will start
with a DOCTYPE declaration "<!DOCTYPE HTML" near the beginning,
before the "<html". These dialects are case insensitive. Files may
start with white space, comments (introduced by "<!--" ), or
processing instructions (introduced by "<?") prior to the DOCTYPE
declaration.
XHTML documents (optionally) start with an XML declaration which
begins with "<?xml" and are required to have a DOCTYPE declaration
"<!DOCTYPE html".
6. Charset default rules
The use of an explicit charset parameter is strongly recommended.
While [MIME] specifies "The default character set, which must be
assumed in the absence of a charset parameter, is US-ASCII." [HTTP]
Section 3.7.1, defines that "media subtypes of the 'text' type are
defined to have a default charset value of 'ISO-8859-1'". Section
19.3 of [HTTP] gives additional guidelines. Using an explicit
charset parameter will help avoid confusion.
Using an explicit charset parameter also takes into account that the
overwhelming majority of deployed browsers are set to use something
else than 'ISO-8859-1' as the default; the actual default is either a
corporate character encoding or character encodings widely deployed
in a certain national or regional community. For further
considerations, please also see Section 5.2 of [HTML40].
Connolly & Masinter Informational [Page 5]
RFC 2854 The 'text/html' Media Type June 2000
7. Security Considerations
[HTML401], section B.10, notes various security issues with
interpreting anchors and forms in HTML documents.
In addition, the introduction of scripting languages and interactive
capabilities in HTML 4.0 introduced a number of security risks
associated with the automatic execution of programs written by the
sender but interpreted by the recipient. User agents executing such
scripts or programs must be extremely careful to insure that
untrusted software is executed in a protected environment.
8. Authors' Addresses
Daniel W. Connolly
World Wide Web Consortium (W3C)
MIT Laboratory for Computer Science
545 Technology Square
Cambridge, MA 02139, U.S.A.
EMail: connolly@w3.org
http://www.w3.org/People/Connolly/
Larry Masinter
AT&T
75 Willow Road
Menlo Park, CA 94025
EMail: LM@att.com
http://larry.masinter.net
9. References
[CLIMAPS] Seidman, J., "A Proposed Extension to HTML: Client-Side
Image Maps", RFC 1980, August 1996.
[FORMDATA] Masinter, L., "Returning Values from Forms:
multipart/form-data", RFC 2388, August 1998.
[HTML20] Berners-Lee, T. and D. Connolly, "Hypertext Markup
Language - 2.0", RFC 1866, November 1995.
[HTML30] Raggett, D., "HyperText Markup Language Specification
Version 3.0", September 1995. (Available at
<http://www.w3.org/MarkUp/html3/CoverPage>).
Connolly & Masinter Informational [Page 6]
RFC 2854 The 'text/html' Media Type June 2000
[HTML32] Raggett, D., "HTML 3.2 Reference Specification", W3C
Recomendation, January 1997.
Available at <http://www.w3.org/TR/REC-html32>.
[HTML40] Raggett, D., et al., "HTML 4.0 Specification", W3C
Recommendation, December 1997.
Available at <http://www.w3.org/TR/1998/REC-html40-
19980424>
[HTML401] Raggett, D., et al., "HTML 4.01 Specification", W3C
Recommendation, December 1999.
Available at <http://www.w3.org/TR/html401>.
[HTTP] Gettys, J., Fielding, R., Mogul, J., Frystyk, H.,
Masinter, L., Leach, P. and T. Berners-Lee, "Hypertext
Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999.
[I18N] Yergeau, F., Nicol, G. and M. Duerst,
"Internationalization of the Hypertext Markup Language",
RFC 2070, January 1997.
[MHTML] Palme, J., Hotmann, A. and N. Shelness, "MIME
Encapsulation of Aggregate Documents, such as HTML
(MHTML)", RFC 2557, March 1999.
[MIME] Freed, N. and N. Borenstein, "Multipurpose Internet Mail
Extensions (MIME) Part Two: Media Types", RFC 2046,
November 1996.
[TABLES] Raggett, D., "HTML Tables", RFC 1942, May 1996.
[UPLOAD] Nebel, E. and L. Masinter, "Form-based File Upload in
HTML", RFC 1867, November 1995.
[URI] Berners-Lee, T., Fielding, R. and L. Masinter, "Uniform
Resource Identifiers (URI): Generic Syntax", RFC 2396,
August 1998.
[XHTML1] "XHTML 1.0: The Extensible HyperText Markup Language: A
Reformulation of HTML 4 in XML 1.0", W3C Recommendation,
January 2000. Available at <http://www.w3.org/TR/xhtml1>.
Connolly & Masinter Informational [Page 7]
RFC 2854 The 'text/html' Media Type June 2000
10. Full Copyright Statement
Copyright (C) The Internet Society (2000). All Rights Reserved.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain it
or assist in its implementation may be prepared, copied, published
and distributed, in whole or in part, without restriction of any
kind, provided that the above copyright notice and this paragraph are
included on all such copies and derivative works. However, this
document itself may not be modified in any way, such as by removing
the copyright notice or references to the Internet Society or other
Internet organizations, except as needed for the purpose of
developing Internet standards in which case the procedures for
copyrights defined in the Internet Standards process must be
followed, or as required to translate it into languages other than
English.
The limited permissions granted above are perpetual and will not be
revoked by the Internet Society or its successors or assigns.
This document and the information contained herein is provided on an
"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Acknowledgement
Funding for the RFC Editor function is currently provided by the
Internet Society.
Connolly & Masinter Informational [Page 8]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -