Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Markup language
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Features of markup languages<span class="anchor" id="Features"></span>== A common feature of many markup languages is that they intermix the text of a document with markup instructions in the same data stream or file. This is not necessary; it is possible to isolate markup from text content, using pointers, offsets, IDs, or other methods to coordinate the two. Such "standoff markup" is typical for the internal representations that programs use to work with marked-up documents. However, embedded or "inline" markup is much more common elsewhere. Here, for example, is a small section of text marked up in HTML: <syntaxhighlight lang="html" line="1"> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>My test page</title> </head> <body> <h1>Mozilla is cool</h1> <img src="images/firefox-icon.png" alt="The Firefox logo: a flaming fox surrounding the Earth."> <p>At Mozilla, weβre a global community of</p> <ul> <!-- changed to list in the tutorial --> <li>technologists</li> <li>thinkers</li> <li>builders</li> </ul> <p>working together to keep the Internet alive and accessible, so people worldwide can be informed contributors and creators of the Web. We believe this act of human collaboration across an open platform is essential to individual growth and our collective future.</p> <p>Read the <a href="https://www.mozilla.org/en-US/about/manifesto/">Mozilla Manifesto</a> to learn even more about the values and principles that guide the pursuit of our mission.</p> </body> </html> </syntaxhighlight> The codes enclosed in angle-brackets <code><like this></code> are markup instructions (known as tags), while the text between these instructions is the actual text of the document. The codes <code>h1</code>, <code>p</code>, and <code>em</code> are examples of ''semantic'' markup, in that they describe the intended purpose or the meaning of the text they include. Specifically, <code>h1</code> means "this is a first-level heading", <code>p</code> means "this is a paragraph", and <code>em</code> means "this is an emphasized word or phrase". A program interpreting such structural markup may apply its own rules or styles for presenting the various pieces of text, using different typefaces, boldness, font size, indentation, color, or other styles, as desired. For example, a tag such as "h1" (header level 1) might be presented in a large bold sans-serif typeface in an article, or it might be underscored in a monospaced (typewriter-style) document – or it might simply not change the presentation at all. In contrast, the <code>i</code> tag in HTML 4 is an example of ''presentational'' markup, which is generally used to specify a particular characteristic of the text without specifying the reason for that appearance. In this case, the <code>i</code> element dictates the use of an italic typeface. However, in [[HTML 5]], this element has been repurposed with a more semantic usage: to denote <q cite="https://html.spec.whatwg.org/#the-i-element">a span of text in an alternate voice or mood, or otherwise offset from the normal prose in a manner indicating a different quality of text</q>. For example, it is appropriate to use the <code>i</code> element to indicate a taxonomic designation or a phrase in another language.<ref>{{cite web |last1=Hickson |first1=Ian |title=HTML Living Standard |url=https://html.spec.whatwg.org/#the-i-element |website=WHATWG β HTML |access-date=13 September 2020 |archive-date=8 March 2018 |archive-url=https://web.archive.org/web/20180308105412/https://html.spec.whatwg.org/#the-i-element |url-status=live }}</ref> The change was made to ease the transition from HTML 4 to HTML 5 as smoothly as possible so that deprecated uses of presentational elements would preserve the most likely intended semantics. The [[Text Encoding Initiative]] (TEI) has published extensive guidelines<ref>{{cite web |url=https://www.tei-c.org/Guidelines/ |title=TEI Guidelines for Electronic Text Encoding and Interchange |publisher=Tei-c.org |access-date=2021-08-16 |archive-url=https://web.archive.org/web/20140703122400/https://www.tei-c.org/Guidelines/ |archive-date=2014-07-03}}</ref> for how to encode texts of interest in the humanities and social sciences, developed through years of international cooperative work. These guidelines are used by projects encoding historical documents, the works of particular scholars, periods, genres, and so on.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)