Content deleted Content added
m →Considerations: and added reference |
Paradoctor (talk | contribs) m move schema.org from External links to See also, MOS:OVERLINK |
||
(25 intermediate revisions by 23 users not shown) | |||
Line 1:
{{Redirect|Semantic markup|more general usage|separation of content and presentation|semantics in programming languages|Semantics (computer science)}}
{{Short description|HTML used to reinforce meaning of documents or webpages}}
[[File:HTML element content categories.svg|thumb|HTML element content categories]]
'''Semantic HTML''' is the use of [[HTML]] markup to reinforce the [[semantics]], or meaning, of the information in
==
HTML has included semantic markup since its inception.<ref>{{cite book |last1=Berners-Lee |first1=Tim |author-link1=Tim Berners-Lee |last2=Fischetti |first2=Mark |title=Weaving the Web: The Original Design and Ultimate Destiny of the World Wide Web by Its Inventor
Various versions of the HTML standard have included [[HTML element#Presentation|presentational markup]] such as <code><font></code> (added in HTML 3.2; removed in HTML 4.0 Strict), <code><i></code> (all versions) and <code><center></code> (added in HTML 3.2). There are also the semantically neutral [[span and div]] elements. 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
In 2001, [[Tim Berners-Lee]] participated in a discussion of the [[Semantic Web]], where it was presented that intelligent software 'agents' might one day automatically
An important type of web agent that does crawl and read web pages automatically, without prior knowledge of what it might find, is the [[
In order for search-engine spiders to be able to rate the significance of pieces of text they find in HTML documents, and also for those creating mashups and other hybrids, as well as for more automated agents as they are developed, the semantic structures that exist in HTML need to be widely and uniformly applied to bring out the meaning of published information.<ref name="Semantic_Web_Revisted">{{cite web
While the true semantic web may depend on complex [[Resource Description Framework|RDF]] [[
Presentational elements were not formally [[
==
In cases where a document requires more precise semantics than those expressed in HTML alone, fragments of the document may be enclosed within <code>span</code> or <code>div</code> elements with meaningful class names<ref>These class names are at best suggestive rather than formally meaningful, unless they are previously shared between both creator and consumer of the content.</ref> such as <code><span class="author"></code> and <code><div class="invoice"></code>. Where these class names are also a [[fragment identifier]] within a schema or ontology, they may link to a more defined meaning. [[Microformat]]s formalise this approach to semantics in HTML.
One important restriction of this approach is that such markup based on element inclusion must meet the well-formedness conditions. As these documents are broadly tree-structured, this means that only balanced fragments from a sub-tree can be marked up in this way.<ref>{{cite web |
Good semantic HTML also improves the [[accessibility]] of web documents (see also [[Web Content Accessibility Guidelines]]).{{Citation needed|date=October 2015}} For example, when a screen reader or audio browser can correctly ascertain the structure of a document, it will not waste the visually impaired user's time by reading out repeated or irrelevant information when it has been marked up correctly.
In 2010, [[Google]] specified three forms of structured metadata that their systems will use to find structured semantic content within webpages. Such information, when related to reviews, people profiles, business listings, and events will be used by Google to enhance the "snippet", or short piece of quoted text that is shown when the page appears in search listings. Google specifies that that data may be given using [[
▲== Google "rich snippets" ==
▲In 2010, [[Google]] specified three forms of structured metadata that their systems will use to find structured semantic content within webpages. Such information, when related to reviews, people profiles, business listings, and events will be used by Google to enhance the "snippet", or short piece of quoted text that is shown when the page appears in search listings. Google specifies that that data may be given using [[Microdata (HTML5)|microdata]], [[microformat]]s or [[RDFa]].<ref>{{cite web|title=Rich snippets|url=http://www.google.com/support/webmasters/bin/answer.py?answer=99170|work=Webmaster Central|access-date=26 May 2010}}</ref> Microdata is specified inside <code>itemtype</code> and <code>itemprop</code> attributes added to existing HTML elements; microformat keywords are added inside <code>class</code> attributes as discussed above; and RDFa relies on <code>rel</code>, <code>[[typeof]]</code> and <code>property</code> attributes added to existing elements.<ref>{{cite web|title=Businesses and organizations - About organization information|url=http://www.google.com/support/webmasters/bin/answer.py?answer=146861|work=Webmaster Central|access-date=26 May 2010}}</ref>
▲== See also ==
{{Portal|Computer programming|Internet}}
* [[CP/LD]] (Content Profile/Linked Document)
* [[HTML landmarks]]
* [[Microdata (HTML)]]▼
* [[Microformat]]
* [[RDFa]]
* [
* [[Semantic Web]]
* [[Semantics (computer science)]]
* [[XML]]
▲* [[Microdata (HTML)]]
▲* [[HTML elements]] (complete list)
== References ==▼
{{Reflist|30em}}
▲* [http://www.schema.org/ schema.org] is an initiative launched on 2 June 2011 by [[Bing (search engine)|Bing]], [[Google]] and [[Yahoo!]]
{{Semantic Web}}
[[Category:Semantic HTML| ]]
[[Category:Domain-specific knowledge representation languages]]
[[Category:Web accessibility]]
[[Category:Web design]]
|