In computing, an HTML element indicates structure in an HTML document and a way of hierarchically arranging content. ***************************************************************************************** * * Computing is usually defined like the activity of using and developing Computer technology Computer hardware and software. HTML, an initialism of HyperText Markup Language, is the predominant Markup language for Web pages It provides a means to describe the structure More specifically, an HTML element is an SGML element that meets the requirements of one or more of the HTML Document Type Definitions (DTDs). The Standard Generalized Markup Language ( ISO 88791986 SGML) is an ISO Standard Metalanguage in which one can define Markup languages Document Type Definition ( DTD) is one of several SGML and XML schema languages and is also the term used to describe a document or portion thereof that These elements have properties: both attributes and content, as specified (both allowable and required) according to the appropriate HTML DTD (for example, the HTML 4. 01 strict DTD). Elements may represent headings, paragraphs, hypertext links, lists, embedded media, and a variety of other structures.
Syntactically HTML elements are constructed with: 1) a start tag marking the beginning of an element; 2) any number of attributes (and their associated values); 3) some amount of content (characters and other elements); and 4) an end tag. HTML, an initialism of HyperText Markup Language, is the predominant Markup language for Web pages It provides a means to describe the structure Many HTML elements include attributes in their start tags, defining desired behavior or indicating additional element properties. The end tag is optional for many elements; in a minimal case, an empty element has no content and requires no end tag. There are a few elements that are not part of any official DTDs, yet are supported by some browsers and used by some web pages. Such elements may be ignored or displayed improperly on browsers not supporting them.
Informally, HTML elements are sometimes referred to as "tags" (an example of synecdoche), though many prefer the term tag strictly in reference to the semantic structures delimiting the start and end of an element. Synecdoche is taken from Greek sinekdohi (συνεκδοχή meaning "simultaneous understanding" (si-nek-duh-kee (pronounced /sɪˈnɛkdoˌki/
XHTML is the successor to HTML 4. The Extensible Hypertext Markup Language, or XHTML, is a 01; XHTML 1. 0 supports the same elements as HTML 4 and in most cases valid XHTML 1. 0 documents will be valid or nearly valid HTML 4 documents. XHTML 1. 0 migrates HTML from its SGML underpinnings to an XML foundation. Don't change "Extensible" Accordingly, the discussion of elements within this article focuses on the final SGML based HTML, version 4. 01 (unless noted otherwise). However, to the extent that XHTML 1. 0 elements remain identical to the HTML 4. 01 elements, the discussion remains applicable (see HTML for a discussion of the minor differences in content between XHTML 1. HTML, an initialism of HyperText Markup Language, is the predominant Markup language for Web pages It provides a means to describe the structure 0 and HTML 4. 01).
| HTML |
|---|
Contents |
HTML elements are classified as either block-level or inline (text-level). HTML, an initialism of HyperText Markup Language, is the predominant Markup language for Web pages It provides a means to describe the structure HTML has been in use since 1991, but HTML 40 (December 1997 was the first standardized version where international characters were given reasonably complete treatment Dynamic HTML, or DHTML, is a collection of technologies used together to create interactive and animated Web sites by using a combination of a static Markup In HTML and XHTML, a font face or font family is the typeface that is applied to some text An HTML editor is a software application for creating Web pages Although the HTML markup of a web page can be written with any Text editor, specialized HTML Series The W3C HTML standard includes support for Client-side scripting. A layout engine, or rendering engine, is software that takes marked up content (such as HTML, XML, image files etc Quirks mode refers to a technique used by some Web browsers for the sake of maintaining backwards compatibility with Web pages designed for older browsers instead of Web style sheets are a form of Separation of presentation and content for Web design in which the markup (i Web pages authored using hypertext markup language ( HTML) may contain multilingual text represented with the Unicode universal character set. Web colors are Colors used in designing web pages and the methods for describing and specifying those colors The Extensible Hypertext Markup Language, or XHTML, is a The following tables compare general and technical information for a number of Web browsers Please see the individual products' articles for further information The following tables compare HTML compatibility and support for a number of Layout engines Please see the individual products' articles for further information The following tables compare support of HTML 5 differences from HTML 4 for a number of Layout engines The specification is still a working draft not The following tables compare deprecated and proprietary HTML tags and attributes compatibility and support for a number of Layout engines Please see the individual products' articles for The following tables compare XHTML compatibility and support for a number of Layout engines Please see the individual products' articles for further information
(See "The global structure of an HTML document")
Many HTML elements can be nested, or contained within other HTML elements:
<p>You <em>rock</em></p>
Nesting can be more complex:
<p>King Louis said, <q lang="fr">L'état, c'est <em>moi!</em></q>(<cite><a href="/wiki/Louis_XIV_of_France">Wikipedia</a></cite>). </p>
Nesting may be arbitrarily deep, but for the code to remain valid, the elements must be closed in the reverse order that they were opened. (This pattern is known as Last in, first out. LIFO is an Acronym which stands for last in first out. In Computer science and Queueing theory this refers to the way items stored )
<p>Mary kissed <em>Jimmy</p></em>
<p>Mary kissed <em>Jimmy</em></p>
Some block-level elements (e. g. paragraphs) may contain only inline elements, and some (e. g. forms, lists) must contain only block-level child elements, but most may contain either block-level or inline elements.
Root elements provide the containers enclosing all other HTML elements. Every HTML page has these elements. The surrounding tags may be omitted. However, some utilities may not recognize or correctly handle the document if this is done.
<html>…</html>
lang for the primary language of the document (such as lang=en for English) and profile (rarely used) for a uniform resource identifier (URI) specifying metadata for the document. The only contents allowed in an HTML element are one head element and one body element. (See Frames, below, for an exception where body is not used. In Computing, an HTML element indicates structure in an HTML document and a way of hierarchically arranging content )<head>…</head>
head element basically contains the metadata for the document. There are seven possible head elements including a meta element for extensible specification of metadata. <body>…</body>
These root elements are arranged as follows:
<html><head>title and base, which can occur only once each). The only required head element is title. </head><body>script elements, arranged in any order to suit the meaning and also typically the presentation of the document. The block elements are:p)h1. . . h6)blockquote)ol)ul)dl)div)noscript)form)table)fieldset)address)ins and del elements are also permissible within the body element when used as block-level elements. No other HTML elements are valid within the body element. </body></html><title>…</title>
title element must not contain any nested tags (that is, it cannot contain any other elements). Only one title element is permitted in a document. <base>
href and other links in the document. Uniform Resource Locator is an URI which also specifies where the identified resource is available and the protocol for retrieving it Must appear before any element that refers to an external resource. HTML permits only one base element for each document. The base element has attributes, but no contents. <link>
<link rel="stylesheet" type="text/css" href=url title=description_of_style>[2]head element may contain any number of link elements. The link element has attributes, but no contents. <basefont> (deprecated)
font elements. Deprecated in favor of stylesheets. In Computer software standards and documentation the term deprecation is applied to Software features that are superseded and should be avoided Web style sheets are a form of Separation of presentation and content for Web design in which the markup (i <script>…</script>
script tags or may be given in a separate resource whose URL is specified with the script element's optional src attribute. [3]<style>…</style>
<style type="text/css">…</style>style tags or may be given in separate resources whose URLs are specified with @import directives of the form<style> @import url; </style>. [4]<object>…</object>
head element, it could potentially be used to extract foreign data and associate it with the current document. <meta>
meta elements specify associative key-value pairs. meta elements can specify HTTP headers which should be sent before the actual content when the HTML page is served from Web server to client: for example,<meta http-equiv="foo" content="bar">foo that has a value bar. Hypertext Transfer Protocol ( HTTP) is a Communications protocol for the transfer of information on the Internet. meta element specifies name and associated content attributes describing aspects of the HTML page. To prevent possible ambiguity, an optional third attribute, scheme, may be supplied to specify a semantic framework that defines the meaning of the key and its value: for example,<meta name="foo" content="bar" scheme="DC">meta element identifies itself as containing the foo element, with a value of bar, from the DC or Dublin Core resource description framework. The Dublin Core Metadata element set is a standard for cross-domain information resource description The Resource Description Framework (RDF is a family of World Wide Web Consortium (W3C Specifications originally designed as a Metadata Data Inline elements cannot be placed directly inside the body element; they must be wholly nested within block-level elements (see Block elements, below).
<em>…</em>
<strong>…</strong>
<q>…</q>
blockquote below). Quote elements may be nested. By the specification, the author should not include quotation marks. Rather, quotation marks — including nested quotation marks — should be rendered through stylesheet properties or the browser's default stylesheet. Practical concerns due to browser non-compliance may force authors to find work-arounds. The cite attribute gives the source, and must be a fully qualified URI. <q class='lengthy'>An inline quotation of significant length (say 25 words, for example) goes here. . . </q>. <cite>…</cite>
<dfn>…</dfn>
<abbr>…</abbr>
<acronym>…</acronym>
abbr element, but contains an acronym, like HTML. Acronyms, initialisms, and alphabetisms are Abbreviations that are formed using the initial components in a phrase or name These elements are useful primarily for documenting computer code development and user interaction through differentiation of source code (<code>), source code variables (<var>), user input (<kbd>), and terminal output (<samp>).
<code>…</code>
Code snippet. <samp>…</samp>
<kbd>…</kbd>
<var>…</var>
<sub>…</sub> <sup>…</sup>
{vertical-align: sub} or {vertical-align: super}<del>…</del>
<ins>…</ins>
<del>'d text. Typically rendered underlined: Inserted text. An underline, also called an underscore, is one or more horizontal lines immediately below a portion of Writing. ins and del elements may be used as block elements: containing other block and inline elements. However, these elements must still remain wholly within their parent element to maintain a well-formed HTML document. For example deleting text from the middle of one paragraph across several other paragraphs and ending in a final paragraph would need to use three separate del elements. Two del elements would be required as inline element to indicate the deletion of text in the first and last paragraphs, and a third, used as a block element, to indicate the deletion in the intervening paragraphs. <isindex> (deprecated)
isindex element requires server side support for indexing documents. Visually presents a one-line text input for keyword entry. When submitted, the query string is appended to the current URL and the document is displayed with these keywords highlighted. In the World Wide Web, a query string is the part of a URL that contains data to be passed to web applications such as CGI programs Uniform Resource Locator is an URI which also specifies where the identified resource is available and the protocol for retrieving it Generally if the server supports this feature it will add the isindex elements to documents without author intervention. <a>…</a>
href (hypertext reference[5]) attribute set to a URL; additionally the attribute title may be set to a hover box text, some informative text about the link:<a href="URL" title="additional information">link text</a>name attribute set, which preceded by a number sign ' # ', and appended to the URL, acts as a link target in a URI scheme (a "document fragment"), typically causing a Web browser to scroll directly to that point of the page. Number sign is a name for the symbol #; it is the preferred Unicode name for the Code point associated with that Glyph. In the field of Computer networking, a URI scheme is the top level of the Uniform Resource Identifier (URI naming structure In computer Hypertext, a fragment identifier is a short string of characters that refers to a resource that is subordinate to another primary A web browser is a software application which enables a user to display and interact with text images videos music games and other information typically located on a Any element can be made into an anchor by using the id attribute,[6] so using <a name="foo"> is not necessary. <img>
src attribute. In Computing, an HTML element indicates structure in an HTML document and a way of hierarchically arranging content An image (from Latin imago) or picture is an artifact usually two-dimensional that has a similar appearance to some subject &mdashusually The required alt attribute provides alternative text in case the image cannot be displayed. The alt attribute is used in HTML and XHTML documents to specify text that is to be rendered when the element to which it is applied cannot Alt is intended as alternative text, although Microsoft Internet Explorer renders it as a tooltip if no title is given; the title attribute is the tooltip text. Windows Internet Explorer (formerly Microsoft Internet Explorer abbreviated MSIE) commonly abbreviated to IE, is a series of graphical The tooltip is a common Graphical user interface element It is used in conjunction with a cursor, usually a mouse pointer It was proposed by Marc Andreessen. [7]<br>
<map>…</map><area>
<object>…</object>type attribute. This may be in any MIME-type the Web browser understands, such as an embedded page, code to be handled by a plug-in such as Flash, a Java applet, a sound file, etc. Multipurpose Internet Mail Extensions ( MIME) is an Internet standard that extends the format of e-mail to support text in Character Adobe Flash (previously called Shockwave Flash and Macromedia Flash) is a set of Multimedia software created by Macromedia and currently An applet is a software component that runs in the context of another program for example a Web browser. <param>object element. Using attributes such as name and value, each <param> sets a parameter for the object. Examples include width, height, font, background colour, etc, depending on what has been exposed in this way by the object's developers. <embed>…</embed> (proprietary)type attribute. Used for embedding Flash files, sound files, etc. This is a proprietary Netscape extension to HTML; <object> is the W3C standard method. Netscape Communications (formerly known as Netscape Communications Corporation and commonly known as Netscape) is an American computer services company <noembed>…</noembed> (proprietary)<applet>…</applet> (deprecated)<object> is now preferred. <span>…</span>id or class attribute, which can then be referenced from CSS or DOM call. The Document Object Model ( DOM) is a platform- and language -independent standard Object model for representing HTML or XML and related Like most HTML elements, span also supports inline CSS in its optional style attribute. Many HTML elements are designed for altering the semantic structure or meaning of a document. Some are block-level, but most are inline and can be included in the normal flow of text.
<p>…</p>
<blockquote>…</blockquote>
cite attribute may give the source, and must be a fully qualified Uniform Resource Identifier. The blockquote element is often misunderstood. It is an element meant to contain quotations that are themselves block level. In other words, it contains a complete paragraph or many paragraphs. In HTML strict DTDs inline elements are prohibited from blockquote elements. For quotations not containing block level elements see the quote (q) element. <hr>
<h1>…</h1> <h2>…</h2> <h3>…</h3> <h4>…</h4> <h5>…</h5> <h6>…</h6>
<h1> for the highest-level heading (the major sections), <h2> for the next level down (sub-section), <h3> for a level below that, and so on. The lowest level heading is <h6>. <h1> as large text in a different font, and <h6> as small bold-faced text, but this can be overridden with CSS. The heading elements are not intended merely for creating large or bold text: they describe something about the document's structure and organization. Some programs use them to generate outlines and tables of contents. <dl>…</dl>
<dt>…</dt>
<dd>…</dd>
<ol>…</ol> and <ul>…</ul>
ol, the type attribute can be used to specify the kind of ordering, but CSS gives more control: {list-style-type: foo}. The default is Arabic numbering. For ul, CSS can be used to specify the list marker: {list-style-type: foo}. The default marker is a disc. <li>…</li>
<dir>…</dir> (deprecated)
<ul>. <menu>…</menu> (deprecated)
<ul> list, but badly supported. Deprecated in favor of <ul>. <table>…</table><tr>…</tr><th>…</th><td>…</td><colgroup>…</colgroup><col><caption>…</caption><thead>…</thead><tbody>…</tbody><tfoot>…</tfoot><thead>, this section may be repeated by the user agent if the table is split across pages (in printing or other paged media)These elements can be combined into a form or used separately as user-interface controls. Combined with a first-class javascript engine, these controls provide support for rich user interfaces.
HTML specifies the elements that make up a form, and the method by which it will be submitted. A webform on a Web page allows a user to enter data that is typically sent to a server for processing and to mimic the usage of paper forms. However, some form of script either server-side or client side must be used to process the user's input once it is submitted. Server-side scripting is a Web server technology in which a user's request is fulfilled by running a script directly on the web server to generate dynamic HTML pages
<form action="url">…</form>
<select name="xyz">…</select>
<option value="x">
select list. <input type="checkbox">
<input type="radio">
<input type="button">
<button> if possible (i. e. if the client supports it) which provides richer possibilities. <input type="submit">
<input type="image">
src tag. <input type="reset">
<input type="text">
size attribute specifies the default width of the input in character-widths. Maxlength sets the maximum number of characters the user can enter (which may be greater than size). <input type="password">
<input type="file">
<input type="hidden">
<label for="id">…</label>
<textarea rows="8">…</textarea>
cols and rows attributes. Text in between the tags appears in the text area when the page is loaded. <div>…</div>id or class attribute, which can then be referenced from CSS or DOM calls. The Document Object Model ( DOM) is a platform- and language -independent standard Object model for representing HTML or XML and related Like most HTML elements, div also supports inline CSS in its optional style attribute. <pre>…</pre>
pre element signals that this white space should be rendered as authored. With the CSS properties: {white-space: pre; font-family: monospace;}, other elements can be presented in the same way. This element can contain any inline element except: image (img), object (object), big font size (big), small font size (small), superscript (sup), and subscript (sub). <address>…</address>
br to insert a new line within this element. <iframe>…</iframe>object element allows HTML authors to specify everything required by an object for its presentation by a user agent [and] thus subsumes some of the tasks carried out by" iframe [8]object element, an iframe (inline frame) element may be the "target" frame for links defined in other elements and it may be "selected" by a browser as the focus for printing, viewing HTML source etc. [9]iframe element was not included in the version 1. 1 XHTML specification, despite having never been formally deprecated. Those serving their web content as XHTML 1. 1 must use the object element. An HTML document may contain a header and a body or a header and a frameset, but not both. For frames the Frames DTD must be used.
<frameset>…</frameset>rows and cols attributes. <frame>…</frame>src attribute appears inside. <noframes>…</noframes><body> element with child elements that will appear in web browsers that don't support frames. <iframe>…</iframe><body>, which embeds another HTML document. IFrame (from Inline Frame) is an HTML element which makes it possible to embed an HTML document inside another HTML document A similar effect can also be achieved using the object element. These approaches differ in some ways (World Wide Web Consortium [10]). See also Framing (World Wide Web). On a Web page, framing means that a Website can be organized into frames.
The use of presentational markup is discouraged. The equivalent CSS should be used instead. Deprecated elements are only valid in the Transitional and Frameset variants of HTML 4. 01 and XHTML1. 0. They are invalid in the Strict variants of HTML 4. 01, XHTML1. 0 and XHTML 1. 1. <b>…</b> and <i>…</i> are invalid in the current draft of XHTML2.0.
<center>…</center> (deprecated)<div> or another element with centering defined using CSS. <b>…</b>{font-weight: bold}<i>…</i>{font-style: italic}<big>…</big>{font-size: larger}. <small>…</small>{font-size: smaller}<s>…</s> (deprecated)<strike>…</strike> (deprecated){text-decoration: line-through}<tt>…</tt>{font-family: monospace}<u>…</u> (deprecated){text-decoration: underline}<font>…</font> (deprecated)Use <span> instead.
<font [color=color] [size=size] [face=face]>…</font>color attribute, typeface with the face attribute, and absolute or relative size with the size attribute. Examples (all the examples are deprecated, use CSS equivalents if possible):
<font color="green">text</font> creates green text. <font color="#1f4099">text</font> creates text with hexadecimal color #1f4099. Web colors are Colors used in designing web pages and the methods for describing and specifying those colors <font size="4">text</font> creates text with size 4. Sizes are from 1 to 7. The standard size is 3, unless otherwise specified in the <body> or other tags. <font size="+1">text</font> creates text with size 1 bigger than the standard. . <font size="-1">text</font> is opposite. <font face="Courier">text</font> makes text with Courier font. Equivalent CSS for font attributes:
<font size="N"> corresponds to {font-size: Yunits} (the HTML specification does not define the relationship between size N and unit-size Y, nor does it define a unit). <font color="red"> corresponds to {color: red}<font face="Courier"> corresponds to {font-family: "Courier"}These are unofficial presentational elements that may not be supported in all browsers. The following tables compare deprecated and proprietary HTML tags and attributes compatibility and support for a number of Layout engines Please see the individual products' articles for
<blink>…</blink> (unofficial){text-decoration: blink}<marquee>…</marquee> (unofficial)<blackface>…</blackface> (unofficial){font-weight: 900}; with some fonts (such as Arial or Gill Sans), using "black" or "ultra bold" variants are more effective. Arial, sometimes marketed as Arial MT, is a Sans-serif Typeface and Computer font packaged with Microsoft Windows, other Gill Sans is a humanist Sans-serif Typeface designed by Eric Gill in 1927 and released 1928 <shadow>…</shadow> (unofficial)<nobr>…</nobr> (unofficial){white-space: nowrap}<wbr> (unofficial)<!-- A Comment --></html>. The Standard Generalized Markup Language ( ISO 88791986 SGML) is an ISO Standard Metalanguage in which one can define Markup languages None of its enclosed contents are rendered. For compatibility with some pre-1995 browsers, the contents of <style> and <script> elements are still sometimes surrounded by comment delimiters.