Content deleted Content added
Undid revision 1232539103 by BangladeshiEditorInSylhet (talk) reverted change of link names to derived, as per MOS:PIPESTYLE
m Replace em-dash with with en-dash.
 
(46 intermediate revisions by 29 users not shown)
Line 1:
{{Short description|HyperText Markup Languagelanguage for documents}}
{{Redirect2|.htm|.html||HTM (disambiguation){{!}}HTM}}
{{pp-vandalism|small=yes}}
{{Infobox file format
| name = HTML<br />{{small|{{nowrap|(HyperText Markup Language)}}}}
| icon = File:HTML5 logo and wordmark.svg
| icon_size = 120px150px
| _noextcode = on
| extension = {{unbulleted list|<code>.html</code>|<code>.htm</code>}}
Line 24:
| open = Yes
| url = {{URL|https://html.spec.whatwg.org/}}
| iconcaption = The officialOfficial logo of the latest version, [[HTML5]]<ref>{{Cite web | url=https://www.w3.org/html/ | title=W3C Html}}</ref><!--Please doW3C not replace it. W3Cofficially uses the HTML5 logo as the official one for the HTML main page. Thank --Rezonansowy -->
}}
{{HTML}}
'''Hypertext Markup Language''' ('''HTML''') is the standard [[markup language]]{{efn|Even though HTML can be run in a browser, it is not viewed as a [[programming language]] in programming language discourse.<ref>{{Cite book |author-link=Felienne Hermans|last1=Hermans |first1=Felienne |last2=Schlesinger |first2=Ari |title=Proceedings of the 2024 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software |chapter=A Case for Feminism in Programming Language Design |date=2024-10-17 |language=en |publisher=ACM |pages=205–222 |doi=10.1145/3689492.3689809 |isbn=979-8-4007-1215-9}}</ref>}} for documents designed to be displayed in a [[web browser]]. It defines the content and structure of [[web content]]. It is often assisted by technologies such as [[Cascading Style Sheets]] (CSS) and [[scripting language]]s such as [[JavaScript]].
 
'''HyperText Markup Language''' ('''HTML''') is the standard [[markup language]] for documents designed to be displayed in a [[web browser]]. It defines the content and structure of [[web content]]. It is often assisted by technologies such as [[CSS|Cascading Style Sheets]] (CSS) and [[scripting language]]s such as [[JavaScript]].
 
[[Web browser]]s receive HTML documents from a [[web server]] or from local storage and [[browser engine|render]] the documents into multimedia web pages. HTML describes the structure of a [[web page]] [[Semantic Web|semantically]] and originally included cues for its appearance.
 
[[HTML element]]s are the building blocks of HTML pages. With HTML constructs, [[HTML element#Images and objects|images]] and other objects such as [[Fieldset|interactive forms]] may be embedded into the rendered page. HTML provides a means to create [[structured document]]s by denoting structural [[semantics]] for text such as headings, paragraphs, lists, [[Hyperlink|links]], quotes, and other items. HTML elements are delineated by ''tags'', written using [[Bracket#Angle brackets|angle brackets]]. Tags such as {{code|lang=html|code=<img>}} and {{code|lang=html|<input>}} directly introduce content into the page. Other tags such as {{code|lang=html|code=<p>}} and {{code|lang=html|code=</p>}} surround and provide information about document text and may include sub-element tags. [[Web browser|Browsers]] do not display the HTML tags, but use them to interpret the content of the page.
 
HTML can embed programs written in a [[scripting language]] such as [[JavaScript]], which affects the behavior and content of web pages. The inclusion of CSS defines the look and layout of content. The [[World Wide Web Consortium]] (W3C), former maintainer of the HTML and current maintainer of the CSS standards, has encouraged the use of [[CSS]] over explicit presentational HTML {{as of|1997|lc=y|since=y|post=.}}<ref name="deprecated">{{cite web|title=HTML 4.0 Specification — W3C Recommendation — Conformance: requirements and recommendations |url=https://www.w3.org/TR/REC-html40-971218/conform.html#deprecated|date=December 18, 1997|publisher=World Wide Web Consortium|url-status=live|archive-url=https://web.archive.org/web/20150705040855/http://www.w3.org/TR/REC-html40-971218/conform.html|archive-date=July 5, 2015|access-date=July 6, 2015}}</ref> A form of HTML, known as [[HTML5]], is used to display video and audio, primarily using the {{code|lang=html|<canvas>}} element, together with JavaScript.
Line 43 ⟶ 42:
In 1980, [[physicist]] [[Tim Berners-Lee]], a contractor at [[CERN]], proposed and prototyped [[ENQUIRE]], a system for CERN researchers to use and share documents. In 1989, Berners-Lee wrote a memo proposing an [[Internet]]-based [[hypertext]] system.<ref>Tim Berners-Lee, "[https://www.w3.org/History/1989/proposal.html Information Management: A Proposal]". CERN (March 1989, May 1990). W3C.</ref> Berners-Lee specified HTML and wrote the browser and server software in late 1990. That year, Berners-Lee and CERN [[data system]]s engineer [[Robert Cailliau]] collaborated on a joint request for funding, but the project was not formally adopted by CERN. In his personal notes of 1990, Berners-Lee listed "some of the many areas in which hypertext is used"; an [[encyclopedia]] is the first entry.<ref>{{cite web |url=https://www.w3.org/DesignIssues/Uses.html |title=Intended Uses |first1=Tim |last1=Berners-Lee |website=W3C}}</ref>
 
The first publicly available description of HTML was a document called "HTML Tags",<ref>{{cite web |title=Tags used in HTML |url=http://info.cern.ch/hypertext/WWW/MarkUp/Tags.html |website=info.cern.ch |access-date=2 March 2023 |date=October 1991}}</ref> first mentioned on the Internet by Tim Berners-Lee in late 1991.<ref name="tagshtml" /><ref>{{cite web|title=Re: status. Re: X11 BROWSER for WWW |url=http://lists.w3.org/Archives/Public/www-talk/1991SepOct/0003.html|last=Berners-Lee|first=Tim|date=October 29, 1991|publisher=World Wide Web Consortium|url-status=live|archive-url=https://web.archive.org/web/20070524045009/http://lists.w3.org:80/Archives/Public/www-talk/1991SepOct/0003.html|archive-date=May 24, 2007|access-date=April 8, 2007}}</ref> It describes 18 elements comprising the initial, relatively simple design of HTML. Except for the hyperlink tag, these were strongly influenced by [[SGMLguidCERN SGML]], an in-house [[Standard Generalized Markup Language]] (SGML)-based documentation format at CERN. Eleven of these elements still exist in HTML 4.<ref>{{cite web|title=Index of the HTML 4 elements |url=https://www.w3.org/TR/1999/REC-html401-19991224/index/elements|date=December 24, 1999|publisher=World Wide Web Consortium|url-status=live|archive-url=https://web.archive.org/web/20070505172415/https://www.w3.org/TR/1999/REC-html401-19991224/index/elements|archive-date=May 5, 2007|access-date=April 8, 2007}}</ref>
 
HTML is a [[markup language]] that [[web browser]]s use to interpret and [[Typesetting|compose]] text, images, and other material into visible or audible web pages. Default characteristics for every item of HTML markup are defined in the browser, and these characteristics can be altered or enhanced by the web page designer's additional use of [[CSS]]. Many of the text elements are mentioned in the 1988 ISO technical report TR 9537 ''Techniques for using SGML'', which describes the features of early text formatting languages such as that used by the [[TYPSET and RUNOFF|RUNOFF command]] developed in the early 1960s for the [[Compatible Time-Sharing System|CTSS]] (Compatible Time-Sharing System) operating system. These formatting commands were derived from the commands used by typesetters to manually format documents. However, the SGML concept of generalized markup is based on elements (nested annotated ranges with attributes) rather than merely print effects, with separate structure and markup. HTML has been progressively moved in this direction with CSS.
Line 55 ⟶ 54:
=== HTML version timeline ===
==== HTML 2 ====
:; November 24, 1995: HTML 2.0 was published as {{IETF RFC|1866}}. Supplemental [[Request for Comments|RFCRFCs]]s added capabilities:
::* November 25, 1995: {{IETF RFC|1867}} (form-based file upload)
::* May 1996: {{IETF RFC|1942}} (tables)
Line 63 ⟶ 62:
==== HTML 3 ====
:; January 14, 1997: HTML 3.2<ref>{{cite web|url=https://www.w3.org/TR/REC-html32|title=HTML 3.2 Reference Specification |publisher=World Wide Web Consortium |date=January 14, 1997|access-date=November 16, 2008}}</ref> was published as a [[W3C Recommendation]]. It was the first version developed and standardized exclusively by the W3C, as the IETF had closed its HTML Working Group on September 12, 1996.<ref>{{cite web|url=https://www.w3.org/MarkUp/HTML-WG/|title=IETF HTML WG|access-date=June 16, 2007 |quote=Note: This working group is closed}}</ref>
:: Initially code-named "Wilbur",<ref name="engelfriet" /> HTML 3.2 dropped math formulas entirely, reconciled overlap among various proprietary extensions and adopted most of [[Netscape]]'s visual markup tags. Netscape's [[blink element]] and [[Microsoft]]'s [[marquee element]] were omitted due to a mutual agreement between the two companies.<ref name="raggett" /> A markup for mathematical formulas similar to that of HTML was standardized 14 months later in [[MathML]].
 
==== HTML 4 ====
:; December 18, 1997 : HTML 4.0<ref>{{cite web |url=https://www.w3.org/TR/REC-html40-971218/|title=HTML 4.0 Specification|publisher=World Wide Web Consortium|date=December 18, 1997|access-date=November 16, 2008}}</ref> was published as a W3C Recommendation. It offers three variations:
:;* : Strict, in which deprecated elements are forbidden
:;* Transitional, in which deprecated elements are allowed
:;* Frameset, in which mostly only [[Framing (World Wide Web)|frame]] related elements are allowed.
:;* Initially code-named "Cougar",<ref name="engelfriet">{{cite web|url=http://htmlhelp.com/reference/wilbur/intro.html|title=Introduction to Wilbur|first=Arnoud |last=Engelfriet|authorlink=Arnoud Engelfriet|website=htmlhelp.com|access-date=June 16, 2007}}</ref> HTML 4.0 adopted many browser-specific element types and attributes, but also sought to phase out Netscape's visual markup features by marking them as [[deprecation|deprecated]] in favor of style sheets. HTML 4 is an SGML application conforming to ISO 8879&nbsp;– SGML.<ref>{{cite web|url=https://www.w3.org/TR/html4/conform.html#h-4.2|title=HTML 4 – 4 Conformance: requirements and recommendations|access-date=December 30, 2009}}</ref>
:;April 24, 1998
:; April 24, 1998 : HTML 4.0<ref>{{cite web |url=https://www.w3.org/TR/1998/REC-html40-19980424/|title=HTML 4.0 Specification|publisher=World Wide Web Consortium|date=April 24, 1998|access-date=November 16, 2008}}</ref> was reissued with minor edits without incrementing the version number.
: HTML 4.0<ref>{{cite web |url=https://www.w3.org/TR/1998/REC-html40-19980424/|title=HTML 4.0 Specification|publisher=World Wide Web Consortium|date=April 24, 1998|access-date=November 16, 2008}}</ref> was reissued with minor edits without incrementing the version number.
:; December 24, 1999 : HTML 4.01<ref>{{cite web |url=https://www.w3.org/TR/html401/|title=HTML 4.01 Specification|publisher=World Wide Web Consortium|date=December 24, 1999|access-date=November 16, 2008}}</ref> was published as a W3C Recommendation. It offers the same three variations as HTML 4.0 and its last errata<ref>{{cite web |title=HTML 4 Errata |url=https://www.w3.org/MarkUp/html4-updates/errata |publisher=W3C |access-date=March 2, 2023}}</ref> were published on May 12, 2001.
:; May 2000 : ISO/IEC 15445:2000<ref name="iso-html">{{cite web |url=https://www.iso.org/standard/27688.html |title= ISO/IEC 15445:2000 – Information technology – Document description and processing languages – HyperText Markup Language (HTML) |author=ISO |year=2000|access-date=March 1, 2023}}</ref> ("[[International Organization for Standardization|ISO]] HTML", based on HTML 4.01 Strict) was published as an ISO/IEC international standard.<ref>{{cite web |title=ISO/IEC 15445:2000(E) ISO-HTML |url=https://www.scss.tcd.ie/misc/15445/15445.HTML |website=www.scss.tcd.ie |publisher=ISO/IEC |access-date=March 1, 2023 |___location=Geneva, CH |language=EN |date=May 15, 2000}}</ref> In the ISO, this standard is in the ___domain of the [[ISO/IEC JTC 1/SC 34]] (ISO/IEC Joint Technical Committee 1, Subcommittee 34&nbsp;– Document description and processing languages).<ref name="iso-html" />
:; : After HTML 4.01, there were no new versions of HTML for many years, as the development of the parallel, XML-based language XHTML occupied the W3C's HTML Working Group.
 
==== HTML 5 ====
Line 85:
; October 1991 : ''HTML Tags'',<ref name="tagshtml" /> an informal CERN document listing 18 HTML tags, was first mentioned in public.
; June 1992 : First informal draft of the HTML DTD,<ref>{{cite web|last=Connolly|first=Daniel|title=MIME as a hypertext architecture |url=http://lists.w3.org/Archives/Public/www-talk/1992MayJun/0020.html|publisher=CERN|access-date=24 October 2010|author-link=Dan Connolly (computer scientist)|date=6 June 1992}}</ref> with seven subsequent revisions (July 15, August 6, August 18, November 17, November 19, November 20, November 22)<ref>{{cite web|last=Connolly|first=Daniel|title=HTML DTD enclosed|url=http://lists.w3.org/Archives/Public/www-talk/1992JulAug/0020.html|publisher=CERN|access-date=24 October 2010|author-link=Dan Connolly (computer scientist)|date=15 July 1992}}</ref><ref>{{cite web|last=Connolly|first=Daniel|title=document type declaration subset for Hyper Text Markup Language as defined by the World Wide Web project|url=http://lost-contact.mit.edu/afs/cern.ch/w3.org/www/Frame/fminit2.0/html.dtd|publisher=CERN|access-date=24 October 2010|author-link=Dan Connolly (computer scientist)|date=18 August 1992|archive-date=14 March 2012|archive-url=https://web.archive.org/web/20120314055308/http://lost-contact.mit.edu/afs/cern.ch/w3.org/www/Frame/fminit2.0/html.dtd|url-status=dead}}</ref><ref name="html11">{{cite web|last=Connolly|first=Daniel|title=Document Type Definition for the Hyper Text Markup Language as used by the World Wide Web application|url=http://lost-contact.mit.edu/afs/cern.ch/w3.org/www/MarkUp/Connolly/921125/archive.sh#html.dtd|publisher=CERN|access-date=24 October 2010|author-link=Dan Connolly (computer scientist)|date=24 November 1992|archive-date=18 January 2012|archive-url=https://web.archive.org/web/20120118155040/http://lost-contact.mit.edu/afs/cern.ch/w3.org/www/MarkUp/Connolly/921125/archive.sh#html.dtd|url-status=dead}} See section "Revision History"</ref>
; November 1992 : HTML DTD 1.1 (the first with a version number, based on RCS revisions, which start with 1.1 rather than 1.0), an informal draft<ref name="html11" />
; June 1993 : Hypertext Markup Language<ref>{{cite web|last1=Berners-Lee|first1=Tim|title=Hyper Text Markup Language (HTML) Internet-Draft version 1.1|url=http://tools.ietf.org/html/draft-ietf-iiir-html-00|publisher=IETF IIIR Working Group|access-date=18 September 2010|author-link=Tim Berners-Lee|first2=Daniel|last2=Connolly|author-link2=Dan Connolly (computer scientist)|date=June 1993}}</ref> was published by the [[Internet Engineering Task Force|IETF]] IIIR Working Group as an Internet Draft (a rough proposal for a standard). It was replaced by a second version<ref name="ietfiiir">{{cite web|last1=Berners-Lee|first1=Tim|title=Hypertext Markup Language (HTML) Internet-Draft version 1.2|url=https://www.w3.org/MarkUp/draft-ietf-iiir-html-01.txt|publisher=IETF IIIR Working Group|access-date=18 September 2010|author-link=Tim Berners-Lee|first2=Daniel|last2=Connolly|author-link2=Dan Connolly (computer scientist)|date=June 1993}}</ref> one month later.
; November 1993: [https://www.w3.org/MarkUp/HTMLPlus/htmlplus_1.html HTML+] was published by the IETF as an Internet Draft and was a competing proposal to the Hypertext Markup Language draft. It expired in July 1994.<ref>{{Cite journal|url=https://datatracker.ietf.org/doc/draft-raggett-www-html/history/|title=History for draft-raggett-www-html-00|website=IETF Datatracker|access-date=2019-11-18|date=1993-11-08|last1=Raggett|first1=Dave}}</ref><!-- Forms and input tags introduced -->
; November 1994: First draft (revision 00) of HTML 2.0 published by IETF itself<ref>{{cite journal |last1=Berners-Lee|first1=Tim|title=HyperText Markup Language Specification – 2.0 INTERNET DRAFT|url=http://tools.ietf.org/html/draft-ietf-html-spec-00|website=Internet Engineering Task Force |access-date=24 October 2010|author-link=Tim Berners-Lee|first2=Daniel|last2=Connolly|author-link2=Dan Connolly (computer scientist)|date=28 November 1994}}</ref> (called as "HTML 2.0" from revision 02<ref>{{Cite journal|url=https://tools.ietf.org/html/draft-ietf-html-spec-02#section-1.1|title=Hypertext Markup Language - 2.0|last=Connolly |first=Daniel W.|website=tools.ietf.org|language=en|access-date=2019-11-18|date=1995-05-16}}</ref>), that finally led to the publication of {{IETF RFC|1866}} in November 1995.{{Ref RFC|1866}}
; April 1995 (authored March 1995) : HTML 3.0<ref>{{cite web|url=https://www.w3.org/MarkUp/html3/|title=HTML 3.0 Draft (Expired!) Materials|publisher=World Wide Web Consortium|date=December 21, 1995|access-date=November 16, 2008}}</ref> was proposed as a standard to the IETF, but the proposal expired five months later (28 September 1995)<ref name=html30cover /> without further action. It included many of the capabilities that were in Raggett's HTML+ proposal, such as support for tables, text flow around figures, and the display of complex mathematical formulas.<ref name=html30cover>{{cite web|url=https://www.w3.org/MarkUp/html3/CoverPage|title=HyperText Markup Language Specification Version 3.0|access-date=June 16, 2007}}</ref>
; : W3C began development of its own [[Arena (web browser)|Arena browser]] as a [[test bed]] for HTML 3 and Cascading Style Sheets,<ref>{{cite web|url=https://www.w3.org/People/Raggett/html3/html3.txt|title=HyperText Markup Language Specification Version 3.0|last=Raggett|first=Dave|date=28 March 1995|website=HTML 3.0 Internet Draft Expires in six months|publisher=[[World Wide Web Consortium]]|access-date=17 June 2010}}</ref><ref>{{cite book |last1=Bowers |first1=N. |chapter=Weblint: just another perl hack |chapter-url=https://www.usenix.org/publications/library/proceedings/usenix98/freenix/bowers.pdf |title=1998 USENIX Annual Technical Conference (USENIX ATC 98) |date=1998 }}</ref><ref>{{cite book|author-link=Håkon Wium Lie|first1=Håkon Wium|last1=Lie|last2=Bos|first2=Bert|author-link2=Bert Bos|title=Cascading style sheets: designing for the Web|url=https://archive.org/details/cascadingstylesh00lieh|url-access=registration|access-date=9 June 2010|date=April 1997|publisher=Addison Wesley Longman|page=[https://archive.org/details/cascadingstylesh00lieh/page/263 263]|isbn=9780201419986978-0-201-41998-6}}</ref> but HTML 3.0 did not succeed for several reasons. The draft was considered very large at 150 pages and the pace of browser development, as well as the number of interested parties, had outstripped the resources of the IETF.<ref name="raggett" /> Browser vendors, including Microsoft and Netscape at the time, chose to implement different subsets of HTML 3's draft features as well as to introduce their own extensions to it.<ref name="raggett" /> (See [[browser wars]].) These included extensions to control stylistic aspects of documents, contrary to the "belief [of the academic engineering community] that such things as text color, background texture, font size, and font face were definitely outside the scope of a language when their only intent was to specify how a document would be organized."<ref name="raggett" /> Dave Raggett, who has been a W3C Fellow for many years, has commented for example: "To a certain extent, Microsoft built its business on the Web by extending HTML features."<ref name="raggett" />
[[File:HTML5-logo.svg|thumb|right|upright|alt=Official HTML5 logo|Logo of HTML5]]
; January 2008 : [[HTML5]] was published as a [[World Wide Web Consortium#Certification|Working Draft]] by the W3C.<ref>{{cite web |url=https://www.w3.org/TR/html5/|title=HTML5|publisher=World Wide Web Consortium|date=June 10, 2008|access-date=November 16, 2008}}</ref>
; : Although its syntax closely resembles that of [[SGML]], [[HTML5]] has abandoned any attempt to be an SGML application and has explicitly defined its own "html" serialization, in addition to an alternative XML-based XHTML5 serialization.<ref>{{cite web|url=https://www.w3.org/blog/2008/01/html5-is-html-and-xml/|title=HTML5, one vocabulary, two serializations|date=15 January 2008 |access-date=February 25, 2009}}</ref>
; 2011&nbsp;HTML5 – Last Call :
; : On 14 February 2011, the W3C extended the charter of its HTML Working Group with clear milestones for HTML5. In May 2011, the working group advanced HTML5 to "Last Call", an invitation to communities inside and outside W3C to confirm the technical soundness of the specification. The W3C developed a comprehensive test suite to achieve broad interoperability for the full specification by 2014, which was the target date for recommendation.<ref name="w3c2014">{{cite web|url=https://www.w3.org/2011/02/htmlwg-pr.html|title=W3C Confirms May 2011 for HTML5 Last Call, Targets 2014 for HTML5 Standard|publisher=[[World Wide Web Consortium]]|access-date=18 February 2011|date=14 February 2011}}</ref> In January 2011, the WHATWG renamed its "HTML5" living standard to "HTML". The W3C nevertheless continuescontinued its project to release HTML5.<ref>{{cite web|url=http://blog.whatwg.org/html-is-the-new-html5|title=HTML Is the New HTML5|author=Hickson, Ian |website=The WHATWG Blog |date=January 19, 2011 |access-date=21 January 2011|archive-date=6 October 2019|archive-url=https://web.archive.org/web/20191006023430/https://blog.whatwg.org/html-is-the-new-html5}}</ref>
; 2012&nbsp;HTML5 – Candidate Recommendation :
; : In July 2012, WHATWG and [[W3C]] decided on a degree of separation. W3C will continue the HTML5 specification work, focusing on a single definitive standard, which is considered a "snapshot" by WHATWG. The WHATWG organization will continue its work with HTML5 as a "Living Standard". The concept of a living standard is that it is never complete and is always being updated and improved. New features can be added but functionality will not be removed.<ref>{{cite web|url=http://www.netmagazine.com/news/html5-gets-splits-122102|title=HTML5 gets the splits|publisher=Net magazine |first1=Craig |last1=Grannell |date=July 23, 2012 |access-date=23 July 2012 |archive-url=https://web.archive.org/web/20120725214739/http://www.netmagazine.com/news/html5-gets-splits-122102 |url-status=dead |archive-date=Jul 25, 2012 }}</ref>
Line 112:
=== Transition of HTML publication to WHATWG ===
{{See also|HTML5#W3C and WHATWG conflict}}
On 28 May 2019, the W3C announced that WHATWG would be the sole publisher of the HTML and DOM standards.<ref name="W3C transfer blog">{{cite web|url=https://www.w3.org/blog/2019/05/w3c-and-whatwg-to-work-together-to-advance-the-open-web-platform/|title=W3C and WHATWG to Work Together to Advance the Open Web Platform|last1=Jaffe|first1=Jeff|date=28 May 2019|website=W3C Blog|archive-url=https://web.archive.org/web/20190529021122/https://www.w3.org/blog/2019/05/w3c-and-whatwg-to-work-together-to-advance-the-open-web-platform/|archive-date=29 May 2019|url-status=live|access-date=29 May 2019}}</ref><ref name="W3C transfer HTML">{{cite web|url=https://www.w3.org/html/|title=W3C and the WHATWG Signed an Agreement to Collaborate on a Single Version of HTML and DOM|date=28 May 2019|website=W3C|archive-url=https://web.archive.org/web/20190529012655/https://www.w3.org/html/|archive-date=29 May 2019|url-status=live|access-date=29 May 2019}}</ref><ref name="W3C transfer memo">{{cite web|url=https://www.w3.org/2019/04/WHATWG-W3C-MOU.html|title=Memorandum of Understanding Between W3C and WHATWG|date=28 May 2019|website=W3C|archive-url=https://web.archive.org/web/20190529012854/https://www.w3.org/2019/04/WHATWG-W3C-MOU.html|archive-date=29 May 2019|url-status=live|access-date=29 May 2019}}</ref><ref name="W3C transfer ZDNet">{{cite news |last1=Cimpanu |first1=Catalin |title=Browser vendors Win War with W3C over HTML and DOM standards |url=https://www.zdnet.com/article/browser-vendors-win-war-with-w3c-over-html-and-dom-standards/ |access-date=29 May 2019 |work=ZDNet |date=29 May 2019 |archive-url=https://web.archive.org/web/20190529021959/https://www.zdnet.com/article/browser-vendors-win-war-with-w3c-over-html-and-dom-standards/ |archive-date=29 May 2019}}</ref> The W3C and WHATWG had been publishing competing standards since 2012. While the W3C standard was identical to the WHATWG in 2007 the standards have since progressively diverged due to different design decisions.<ref name="W3C forks">{{cite web |title=W3C - WHATWG Wiki |url=https://wiki.whatwg.org/wiki/W3C |website=WHATWG Wiki |access-date=29 May 2019 |archive-url=https://web.archive.org/web/20190529013834/https://wiki.whatwg.org/wiki/W3C |archive-date=29 May 2019}}</ref> The WHATWG "Living Standard" had been the ''de facto'' web standard for some time.<ref>{{cite web
|url=https://www.cnet.com/news/an-epitaph-for-the-web-standard-xhtml-2/
|title=An epitaph for the Web standard, XHTML 2
Line 147:
{{Main|HTML element}}
[[File:HTML element content categories.svg|thumb|HTML element content categories]]
HTML documents imply a structure of nested [[HTML element]]s. These are indicated in the document by HTML ''tags'', enclosed in angle brackets thus: {{code|lang=html|code=<p>}}.<ref>{{cite web|title=HTML Elements|url=https://www.w3schools.com/html/html_elements.asp|publisher=w3schools|access-date=16 March 2015}}</ref>{{better source needed|date=February 2019}}
 
In the simple, general case, the extent of an element is indicated by a pair of tags: a "start tag" {{code|lang=html|code=<p>}} and "end tag" {{code|lang=html|code=</p>}}. The text content of the element, if any, is placed between these tags.
Line 161:
The general form of an HTML element is therefore: {{code|lang=html|code=<tag attribute1="value1" attribute2="value2">''content''</tag>}}. Some HTML elements are defined as ''empty elements'' and take the form {{code|lang=html|code=<tag attribute1="value1" attribute2="value2">}}. Empty elements may enclose no content, for instance, the {{code|lang=html|code=<br>}} tag or the inline {{code|lang=html|code=<img>}} tag.
The name of an HTML element is the name used in the tags.
The end tag's name is preceded by a slash character, <code>&#47;</code>,. andIf thata intag emptyhas elementsno thecontent, an end tag is neithernot requiredallowed. norIf allowedattributes are not mentioned, default values are used in each case.
If attributes are not mentioned, default values are used in each case.
 
==== Element examples ====
Line 187 ⟶ 186:
The effects are:
<blockquote>
<div style="color: #000000; background: none; overflow: hidden; page-break-after: avoid; font-size: 1.8em; font-family: Georgia,Times,serif; margin-top: 1em; margin-bottom: 0.25em; line-height: 1.3; padding: 0; border-bottom: 1px solid #AAAAAA;">Heading Level 1</div>
<div style="color: #000000; background: none; overflow: hidden; page-break-after: avoid; font-size: 1.5em; font-family: Georgia,Times,serif; margin-top: 1em; margin-bottom: 0.25em; line-height: 1.3; padding: 0; border-bottom: 1px solid #AAAAAA;">Heading Level 2</div>
<div style="color: #000000; background: none; overflow: hidden; page-break-after: avoid; font-size: 1.17em; font-weight: bold; margin-top: 0.3em; margin-bottom: 0; line-height: 1.6; padding-top: 0.5em; padding-bottom: 0;">Heading Level 3</div>
<div style="color: #000000; background: none; overflow: hidden; page-break-after: avoid; font-size: 100%; font-weight: bold; margin-top: 0.3em; margin-bottom: 0; line-height: 1.6; padding-top: 0.5em; padding-bottom: 0;">Heading Level 4</div>
<div style="color: #000000; background: none; overflow: hidden; page-break-after: avoid; font-size: 100%; font-weight: bold; margin-top: 0.3em; margin-bottom: 0; line-height: 1.6; padding-top: 0.5em; padding-bottom: 0;">Heading Level 5</div>
<div style="color: #000000; background: none; overflow: hidden; page-break-after: avoid; font-size: 100%; font-weight: bold; margin-top: 0.3em; margin-bottom: 0; line-height: 1.6; padding-top: 0.5em; padding-bottom: 0;">Heading Level 6</div>
</blockquote>
 
Line 200 ⟶ 199:
===== Line breaks =====
 
{{code|lang=html|code=<br>}}. The difference between {{code|lang=html|code=<br>}} and {{code|lang=html|code=<p>}} is that {{code|lang=html|code=<br>}} [[line breaking character|breaks a line]] without altering the semantic structure of the page, whereas {{code|lang=html|code=<p>}} sections the page into [[paragraph]]s. The element {{code|code=<br>|lang=html}} is an ''empty element'' in that, although it may have attributes, it can take no content and it maymust not have an end tag.
<syntaxhighlight lang="html"><p>This <br> is a paragraph <br> with <br> line breaks</p></syntaxhighlight>
 
===== Links =====
 
This is a link in HTML. To create a link the {{code|lang=html|code=<a>}} tag is used. The <code>href</code> attribute holds the [[URL]] address of the link.
<syntaxhighlight lang="html"><a href="https://www.wikipedia.org/">A link to Wikipedia!</a></syntaxhighlight>
 
===== Inputs =====
There are many possible ways a user can give input/sinputs like:<syntaxhighlight lang="html">
<input type="text"> <!-- This is for text input -->
<input type="file"> <!-- This is for uploading files -->
Line 217 ⟶ 219:
; Structural markup indicates the purpose of text : For example, {{code|lang=html|code=<h2>Golf</h2>}} establishes "Golf" as a second-level [[HTML element#Basic text|heading]]. Structural markup does not denote any specific rendering, but most web browsers have default styles for element formatting. Content may be further styled using [[Cascading Style Sheets]] (CSS).<ref>{{cite web|title=CSS Introduction|url=https://www.w3schools.com/css/css_intro.asp|publisher=W3schools|access-date=16 March 2015}}</ref>
; Presentational markup indicates the appearance of the text, regardless of its purpose : For example, {{code|lang=html|code=<b>bold text</b>}} indicates that visual output devices should render "boldface" in bold text, but gives a little indication what devices that are unable to do this (such as aural devices that read the text aloud) should do. In the case of both {{code|lang=html|code=<b>bold text</b>}} and {{code|lang=html|code=<i>italic text</i>}}, there are other elements that may have equivalent visual renderings but that are more semantic in nature, such as {{code|lang=html|code=<strong>strong text</strong>}} and {{code|lang=html|code=<em>emphasized text</em>}} respectively. It is easier to see how an aural user agent should interpret the latter two elements. However, they are not equivalent to their presentational counterparts: it would be undesirable for a screen reader to emphasize the name of a book, for instance, but on a screen, such a name would be italicized. Most presentational markup elements have become [[Deprecation|deprecated]] under the HTML 4.0 specification in favor of using [[CSS]] for styling.
; Hypertext markup makes parts of a document into links to other documents : An anchor element creates a [[hyperlink]] in the document and its <code>href</code> attribute sets the link's target [[URL]]. For example, the HTML markup {{code|lang=html|code=<a href="https://en.wikipedia.org/">Wikipedia</a>}}, will render the word "<span class="plainlinks">[https://en.wikipedia.org/ Wikipedia]</span>" as a hyperlink. To render an image as a hyperlink, an <code>img</code> element is inserted as content into the <code>a</code> element. Like <code>br</code>, <code>img</code> is an empty element with attributes but no content or closing tag. {{code|lang=html|code=<a href="https://example.org"><img src="image.gif" alt="descriptive text" width="50" height="50" border="0"></a>}}.
 
==== Attributes ====
Line 247 ⟶ 249:
Escaping also allows for characters that are not easily typed, or that are not available in the document's [[character encoding]], to be represented within the element and attribute content. For example, the acute-accented <code>e</code> (<code>é</code>), a character typically found only on Western European and South American keyboards, can be written in any HTML document as the entity reference <code>&amp;eacute;</code> or as the numeric references <code>&amp;#xE9;</code> or <code>&amp;#233;</code>, using characters that are available on all keyboards and are supported in all character encodings. [[Unicode]] character encodings such as [[UTF-8]] are compatible with all modern browsers and allow direct access to almost all the characters of the world's writing systems.<ref>{{cite web|title=''The Unicode Standard'': A Technical Introduction |publisher=Unicode |url=https://www.unicode.org/standard/principles.html|access-date=2010-03-16}}</ref>
{| class="wikitable"
|+HTML escape sequence examples
|+Example HTML Escape Sequences
!Named
!Decimal
Line 271 ⟶ 273:
|{{Code|code=&gt;}}
|{{Code|code=&#62;}}
|{{Code|code=&#x3ex3E;}}
|{{Code|code=>}}
|[[Greater-than sign|Greater Than]]
Line 293 ⟶ 295:
|{{Code|code=&#160;}}
|{{Code|code=&#xA0;}}
|<code style="background-color: lightblue;">&nbsp;</code>
|{{Code|code=}}
|[[Non-breaking space|Non-Breaking Space]]
|
Line 317 ⟶ 319:
| [[Dagger (mark)|Dagger]]
|
|-
|{{Code|code=&Dagger;}}
|{{Code|code=&#8225;}}
|{{Code|code=&#x2021;}}
|{{Code|code=‡}}
| [[Dagger (mark)|Double dagger]]
| Names are case sensitive
|-
|{{Code|code=&ddagger;}}
Line 330 ⟶ 325:
|{{Code|code=‡}}
| [[Dagger (mark)|Double dagger]]
| Names are case-sensitive and may have synonyms.
|-
|{{Code|code=&trade;}}
Line 340 ⟶ 335:
|}
 
=== Data types ===
HTML defines several [[data type]]s for element content, such as script data and stylesheet data, and a plethora of types for attribute values, including IDs, names, [[Uniform Resource Identifier|URIs]], numbers, units of length, languages, media descriptors, colors, character encodings, dates and times, and so on. All of these data types are specializations of character data.
 
=== Document type declaration ===
HTML documents are required to start with a [[Documentdocument type declaration]] (informally, a "doctype"). In browsers, the doctype helps to define the rendering mode—particularly whether to use [[quirks mode]].
 
The original purpose of the doctype was to enable the parsing and validation of HTML documents by SGML tools based on the [[Documentdocument type definition]] (DTD). The DTD to which the DOCTYPE refers contains a machine-readable grammar specifying the permitted and prohibited content for a document conforming to such a DTD. Browsers, on the other hand, do not implement HTML as an application of SGML and as consequence do not read the DTD.
 
[[HTML5]] does not define a DTD; therefore, in HTML5 the doctype declaration is simpler and shorter:<ref>{{cite web |url=https://www.w3.org/TR/html/syntax.html#doctype-syntax |access-date=2013-08-19 |title=The HTML syntax |work=HTML Standard }}</ref>
Line 368 ⟶ 363:
Semantic HTML is a way of writing HTML that emphasizes the meaning of the encoded information over its presentation (look). HTML has included semantic markup from its inception,<ref>{{cite book|last1=Berners-Lee|first1=Tim|last2=Fischetti|first2=Mark|title=Weaving the Web: The Original Design and Ultimate Destiny of the World Wide Web by Its Inventor|url=https://archive.org/details/weavingweborigin00bern_0|url-access=registration|isbn=978-0-06-251587-2|publisher=Harper|___location=San Francisco|year=2000}}</ref> but has also included presentational markup, such as {{code|lang=html|code=<font>}}, {{code|lang=html|code=<i>}} and {{code|lang=html|code=<center>}} tags. There are also the semantically neutral [[div and span]] tags. Since the late 1990s, when [[Cascading Style Sheets]] were beginning to work in most browsers, web authors have been encouraged to avoid the use of presentational HTML markup with a view to the [[separation of content and presentation]].<ref>{{cite web|url=https://www.w3.org/MarkUp/Guide/Style.html|title=Adding a touch of style|last=Raggett|first=Dave|year=2002|publisher=W3C|access-date=October 2, 2009}} This article notes that presentational HTML markup may be useful when targeting browsers "before Netscape 4.0 and Internet Explorer 4.0". See the [[list of web browsers]] to confirm that these were both released in 1997.</ref>
 
In a 2001 discussion of the [[Semantic Web]], [[Tim Berners-Lee]] and others gave examples of ways in which intelligent software "agents" may one day automatically crawl the web and find, filter, and correlate previously unrelated, published facts for the benefit of human users.<ref>{{cite magazine |author=Berners-Lee |first1=Tim |last2=Hendler |first2=James |last3=Lassila |first3=Ora |date=May 1, 2001 |title=The Semantic Web |url=http://www.scientificamerican.com/article.cfm?id=the-semantic-web |magazine=Scientific American |access-date=October 2, 2009}}</ref> Such agents are not commonplace even now, but some of the ideas of [[Web 2.0]], [[Mashup (web application hybrid)|mashups]] and [[Price comparison service|price comparison websites]] may be coming close{{citation needed|date=February 2025}}. The main difference between these web application hybrids and Berners-Lee's semantic agents lies in the fact that the current [[Feed aggregator|aggregation]] and hybridization of information is usually designed by [[web developer]]s, who already know the web locations and the [[Application programming interface|API semantics]] of the specific data they wish to mash, compare and combine.
 
An important type of web agent that does crawl and read web pages automatically, without prior knowledge of what it might find, is the [[web crawler]] or search-engine spider. These software agents are dependent on the semantic clarity of web pages they find as they use various techniques and [[algorithm]]s to read and index millions of web pages a day and provide web users with [[Web search engine|search facilities]] without which the World Wide Web's usefulness would be greatly reduced.
Line 398 ⟶ 393:
=== HTML Application ===
{{Main|HTML Application}}
An HTML Application (HTA; file extension <kbd>.hta</kbd>) is a [[Microsoft Windows]] application that uses HTML and Dynamic HTML in a [[Web browser|browser]] to provide the application's graphical interface. A regular HTML file is confined to the security model of the [[Browser security|web browser's security]], communicating only to web servers and manipulating only web page objects and [[HTTP cookie|site cookies]]. An HTA runs as a fully trusted application and therefore has more privileges, like creation/editing/removal of files and [[Windows Registry]] entries. Because they operate outside the browser's security model, HTAs cannot be executed via HTTP, but must be downloaded (just like an [[EXE|EXE file]] file) and executed from local file system.
 
== HTML4 variations ==
Line 410 ⟶ 405:
Like HTML 4.01, XHTML 1.0 has three sub-specifications: strict, transitional, and frameset.
 
Aside from the different opening declarations for a document, the differences between an HTML 4.01 and XHTML 1.0 document—in each of the corresponding DTDs—are largely syntactic. The underlying syntax of HTML allows many shortcuts that XHTML does not, such as elements with optional opening or closing tags, and even empty elements which must not have an end tag. By contrast, XHTML requires all elements to have an opening tag and a closing tag. XHTML, however, also introduces a new shortcut: an XHTML tag may be opened and closed within the same tag, by including a slash before the end of the tag like this: {{code|lang=html|code=<br/>}}. The introduction of this shorthand, which is not used in the SGML declaration for HTML 4.01, may confuse earlier software unfamiliar with this new convention. A fix for this is toremove includethe aslash spacepreceding beforethe closing theangle tagbracket, as such: {{code|lang=html|code=<br />}}.<ref>Freeman,{{citation|title=HTML EStandard (2005).- HeadThe Firstbr HTMLElement|url=https://html. O'Reillyspec.whatwg.org/multipage/text-level-semantics.html#the-br-element|publisher=WHATWG}}</ref>
 
To understand the subtle differences between HTML and XHTML, consider the transformation of a valid and well-formed XHTML 1.0 document that adheres to Appendix C (see below) into a valid HTML 4.01 document. Making this translation requires the following steps:
Line 418 ⟶ 413:
# If present, '''remove the XML declaration.''' (Typically this is: {{code|lang=xml|code=<?xml version="1.0" encoding="utf-8"?>}}).
# '''Ensure that the document's MIME type is set to <code>text/html</code>.''' For both HTML and XHTML, this comes from the HTTP <code>Content-Type</code> header sent by the server.
# '''Change the XML empty-element syntax to an HTML style empty element''' ({{code|lang=html|code=<br />}} to {{code|lang=html|code=<br>}}).
 
Those are the main changes necessary to translate a document from XHTML 1.0 to HTML 4.01. To translate from HTML to XHTML would also require the addition of any omitted opening or closing tags. Whether coding in HTML or XHTML it may just be best to always include the optional tags within an HTML document rather than remembering which tags can be omitted.
Line 427 ⟶ 422:
* Include both <code>xml:lang</code> and <code>lang</code> attributes on any elements assigning language.
* Use the empty-element syntax only for elements specified as empty in HTML.
* IncludeRemove anthe extraclosing spaceslash in empty-element tags: for example {{code|lang=html|code=<br />}} instead of {{code|lang=html|code=<br />}}.
* Include explicit close tags for elements that permit content but are left empty (for example, {{code|lang=html|code=<div></div>}}, not {{code|lang=html|code=<div />}}).
* Omit the XML declaration.
 
Line 440 ⟶ 435:
** Inline elements and plain text are allowed directly in: <code>body</code>, <code>blockquote</code>, <code>form</code>, <code>noscript</code> and <code>noframes</code>
* '''Presentation related elements'''
** underline (<code>u</code>) (Deprecated. can confuse a visitor with a hyperlink.)
** strike-through (<code>s</code>)
** <code>center</code> (Deprecated. use CSS instead.)
Line 481 ⟶ 476:
 
== WHATWG HTML versus HTML5 ==
{{Main|#Transition of HTML Publicationpublication to WHATWG}}
The HTML Living Standard, which is developed by WHATWG, is the official version, while W3C HTML5 is no longer separate from WHATWG.
 
== WYSIWYG editors ==
{{missing information|contenteditable|date=January 2021}}
There are some [[WYSIWYG]] editors (What''what Youyou Seesee Isis Whatwhat Youyou Getget''), in which the user lays out everything as it is to appear in the HTML document using a [[graphical user interface]] (GUI), often similar to [[word processor]]s. The editor renders the document rather than showing the code, so authors do not require extensive knowledge of HTML.
 
The WYSIWYG editing model has been criticized,<ref>Sauer, C.: WYSIWIKI&nbsp;– Questioning WYSIWYG in the Internet Age. In: Wikimania (2006)</ref><ref>Spiesser, J., Kitchen, L.: Optimization of HTML automatically generated by WYSIWYG programs. In: 13th International Conference on World Wide Web, pp. 355—364355–364. WWW '04. ACM, New York, NY (New York, NY, U.S., May 17–20, 2004)</ref> primarily because of the low quality of the generated code; there are voices{{who|date=June 2020}} advocating a change to the [[WYSIWYM]] model (What''what Youyou Seesee Isis Whatwhat Youyou Meanmean'').
 
WYSIWYG editors remain a controversial topic because of their perceived flaws such as:
Line 503 ⟶ 498:
* [[Comparison of HTML parsers]]
* [[Dynamic web page]]
* [[HTML Application]]
* [[HTML character references]]
* [[List of document markup languages]]
Line 512 ⟶ 508:
* [[W3C Markup Validation Service|W3C (X)HTML Validator]]
* [[Web colors]]
* [[HTML Application]]
{{div col end}}
 
== Notes ==
{{Notelist}}
 
 
 
== References ==
Line 519:
 
== External links ==
{{wikibooksWikibooks}}
<!-- See discussion at [[Talk:HTML/Archive_3Archive 3#Suggestion:_External_links_to_tutorials External links to tutorials]] -->
{{sister project links|d=Q8811|c=category:HTML|b=HyperText Markup Language|v=HTML|n=no|q=no|s=no|wikt=HTML|m=Help:HTML in wikitext|mw=HTML restriction|species=no}}
* {{Curlie|Computers/Data_Formats/Markup_Languages/HTML/Reference/}}
* [[WHATWG]]'s [https://html.spec.whatwg.org/multipage/ HTML Living Standard]
* [https://www.w3.org/MarkUp/Guide/ Dave Raggett's Introduction to HTML]
Line 538 ⟶ 537:
{{Portal bar|Computer programming}}
 
{{DEFAULTSORT:Html}}
[[Category:HTML| ]]
[[Category:Computer-related introductions in 1990]]