|This article needs additional citations for verification. (April 2014) (Learn how and when to remove this template message)|
A structured document is an electronic document where some method of embedded coding, such as mark-up, is used to give the whole, and parts, of the document various structural meanings according to a schema. A structured document whose mark-up doesn't break the schema and is designed to conform to and which obeys the syntax rules of its mark-up language is "well-formed".
The Standard Generalized Markup Language (SGML) has pioneered the concept of structured documents
As of 2009 the most widely used markup language, in all its evolving forms, is HTML, which is used to structure documents according to various Document Type Definition (DTD) schema defined and described by the W3C, which continually reviews, refines and evolves the specifications.
XML is the universal format for structured documents and data on the Web
In writing structured documents the focus is on encoding the logical structure of a document, with no explicit concern in the structural markup for its presentation to humans by printed pages, screens or other means. Structured documents, especially well formed ones, can easily be processed by computer systems to extract and present metadata about the document. In most Wikipedia articles for example, a table of contents is automatically generated from the different heading tags in the body of the document. Popular word processors can have such a function available.
In HTML a part of the logical structure of a document may be the document body;
<body>, containing a first level heading;
<h1>, and a paragraph;
<p>A <strong class="selflink">structured document</strong> is an <a href="/wiki/Electronic_document" title="Electronic document">electronic document</a> where some method of <a href="/w/index.php?title=Embedded_coding&action=edit&redlink=1" class="new" title="Embedded coding (page does not exist)">embedded coding</a>, such as <a href="/wiki/Markup_language" title="Markup language">markup</a>, is used to give the whole, and parts, of the document various structural meanings according to a <a href="/wiki/Schema" title="Schema">schema</a>.
One of the most attractive features of structured documents is that they can be reused in many contexts and presented in various ways on mobile phones, TV screens, speech synthesisers, and any other device which can be programmed to process them.
Other meaning can be ascribed to text which isn't structural. In the HTML fragment above, there is semantic markup which has nothing to do with structure; the first of these, the
<strong> tag, means that the enclosed text should be given a strong emphasis. In visual terms this is equivalent to the bold,
<b> tag, but in speech synthesisers this means a voice inflection giving strong emphasis is used. The term semantic markup excludes markup like the bold tag which has no meaning other than an instruction to a visual display. The strong tag means that the presentation of the enclosed text should have a strong emphasis in all presentation forms, not just visual.
<a> tag is a more obvious example of semantic markup unconcerned with structure, with its href attribute set it means that the text it surrounds is a hyperlink.
HTML from early on has also had tags which gave presentational semantics, i.e. there were tags to give bold (
<b>)or italic (
<i>) text, or to alter font sizes or which had other effects on the presentation. Modern versions of markup languages discourage such markup in favour of style sheets. Different style sheets can be attached to any markup, semantic or presentational, to produce different presentations. In HTML, tags such as;
<a>, <blockquote>, <em>, <strong> and others do not have a structural meaning, but do have a meaning.
- http://www.w3.org/MarkUp/draft-ietf-iiir-html-01.txt. Retrieved 5 March 2014. Missing or empty