Well-formed element

Well-formed element

In web page design, and generally for all markup languages such as SGML, HTML, and XML, a well-formed element is one that is either
*opened and subsequently closed,
*an empty element, which in that case must be terminated,
*properly nested so that it does not overlap.

For example, in HTML: word is a well-formed element, while word is not, since the bold element is not closed. In XHTML, empty elements (elements that inherently have no content) should be closed by putting a slash at the end of the opening tag, e.g. ,
,


, etc. In HTML, there is no closing tag for such elements, and no slash is added to the opening tag.

Furthermore, if an element has any attributes, each attribute value must be properly quoted.

In a well-formed document,
*all elements are well-formed, and
*a single element, known as the root element, contains all of the other elements in the document.

For example, the code below is not well-formed HTML, because the "em" and "strong" elements overl

Normal emphasized strong emphasized strong

Normal emphasized strong emphasized strong

Alternatively emphasized strong emphasized strong


Wikimedia Foundation. 2010.

Игры ⚽ Нужно решить контрольную?

Look at other dictionaries:

  • Well-formed — may refer to:* Well formed element, an element in webpage design * Well formed formula, a string that is generated by a formal grammar in logic * Well formed outcome, a Neuro Linguistic Programming conceptee also* Well formedness …   Wikipedia

  • Well-formed xml document — Un document XML bien formé (well formed XML document) est un document XML dont la syntaxe est correcte. Selon le W3C, cela signifie : Les documents XML doivent avoir un élément racine ; Les éléments XML doivent avoir une balise de… …   Wikipédia en Français

  • Well-formed XML document — A well formed XML document is defined as an XML document that has correct XML syntax. According to W3C, this means: * XML documents must have a root element * XML elements must have a closing tag * XML tags are case sensitive * XML elements must… …   Wikipedia

  • Well-formed XML document — Un document XML bien formé (well formed XML document) est un document XML dont la syntaxe est correcte. Selon le W3C, cela signifie : Les documents XML doivent avoir un élément racine ; Les éléments XML doivent avoir une balise de… …   Wikipédia en Français

  • Element (mathematics) — In mathematics, an element or member of a set is any one of the distinct objects that make up that set. Contents 1 Sets 2 Notation and terminology 3 Cardinality of sets 4 Exampl …   Wikipedia

  • Element Yachts — Infobox Company company name = Element Yachts company company slogan = Are you in your element? company type = Private foundation = location = Erin, Ontario origins = Canada area served = Worldwide industry = Boatbuilding products = Element line… …   Wikipedia

  • Sentence element — Sentence elements are the groups of words that combine together to comprise the ‘building units’ of a well formed sentence. A sentence element approach to grammar assumes a top down methodology. In other words, it starts with the sentence as a… …   Wikipedia

  • HTML element — This article is about the HTML elements in general. For information on how to format Wikipedia entries, see Help:Wiki markup and Help:HTML in wikitext HTML HTML and HTML5 Dynamic HTML XHTML XHTML Mobile Profile and C HTML Canvas element Character …   Wikipedia

  • Root element — Each XML document has exactly one single root element. This element is also known as the document element. It encloses all the other elements and is therefore the sole parent element to all the other elements. The World Wide Web Consortium… …   Wikipedia

  • chemical element — Introduction also called  element,         any substance that cannot be decomposed into simpler substances by ordinary chemical processes. Elements are the fundamental materials of which all matter is composed.       This article considers the… …   Universalium

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”