Skip to content

Data Description Languages (Markup Languages and Structured Data Formats)

低頻~25 min5 terms7 past questions

Goals of this unit

  • Distinguish HTML from XML by their purpose and by how their tags are decided.
  • Explain how a tag (タグ) marks the start and end of a range and shows what that part means.
  • Place SGML as the foundation of HTML and XML, and recognize JSON as a data format that uses no tags.
Terms at a glance (5)
TermIn one lineCategoryUse of tags
HTMLA markup language that describes the structure of web pages with tagsMarkup languageUses predefined tags
タグA marker enclosed in angle brackets that shows a range and its meaningNotationEncloses content between a start tag and an end tag
XMLA markup language in which you define your own tags to represent dataMarkup languageDefined by the user
SGMLThe base standard for defining markup languagesMetalanguageSets the rules for tags
JSONA lightweight data format written as key-value pairsData description formatNot used

Terms

HTML is a markup language (マークアップ言語) that describes the structure of a web page, such as headings, paragraphs and links, with tags (タグ; markers enclosed in "<" and ">").

To mark up text means to attach labels such as "this is a heading" to its parts to show their roles. A browser reads a file written in HTML and assembles the page on screen according to those labels. When a hyperlink is written in, readers can move from that page to another one.

AnalogyIt is like writing notes such as "main heading" or "photo here" in red in the margins of a manuscript, so the printer lays out the page exactly as marked.

How to rememberHyperText = text that links to other documents; Markup = adding marks. The name itself says "a language for marking up linked documents."

Exam points

  • ExamWhat HTML lets you build is web pages (Web ページ).
  • ExamHTML tags (タグ) can do more than show a document's structure; they can also specify how it looks on screen.

2 past questions on this term HTML

A tag (タグ) is a marker that encloses a name in "<" and ">" and shows which stretch of a document or data represents what.

開始タグ <p>

内容 本文

終了タグ </p>

Content is usually enclosed between a start tag such as <p> and an end tag with a slash added, such as </p>, forming one element. Placing elements inside other elements, called nesting, expresses a hierarchy like sections within a chapter. When a browser displays the page, the tags themselves do not appear on screen; they give a role to the content they enclose.

AnalogyIt is like putting two bookmarks in a book to show "Chapter 2 starts here" and "Chapter 2 ends here". The text does not change, but you can see which stretch is what.

How to rememberIn everyday English, a tag is a name label tied to luggage. Its job of naming what is inside carries straight over to the term.

Exam points

  • ExamThe logical structure of an XML document is expressed by enclosing each part in tags (タグ).

1 past questions on this term タグ

XML is a markup language (マークアップ言語) in which users name their own tags (タグ) to suit their purpose and describe the meaning and structure of data.

  • Book
    • Title
    • Author
      • Family name
      • Given name
    • Price

Its hallmark is that you can create new tags to fit the information at hand; for book data, for example, you might make tags named book, title, author and price and nest them in a hierarchy. Because the tag names reveal what the content means, XML serves as a format for passing data between different systems.

AnalogyIt is like a storage shelf where you can make your own labels. Just as you might put small "family name" and "given name" boxes inside the "author" shelf, you decide how things are divided.

How to rememberThe X in the abbreviation comes from the second letter of eXtensible. The name uses X rather than the initial E.

Exam points

  • ExamIn XML, the writer can decide which tags (タグ) to use according to the content of the data.
  • Mix-upHTML uses tags (タグ) prepared in advance for building web pages, while in XML the users create tags that represent the content of the data.

1 past questions on this term XML

HTML vs. XML

AspectHTMLXML
Main purposeWriting and displaying web pagesRepresenting and exchanging the meaning and structure of data
Key differenceTagsUses predefined tagsUsers define the tags

SGML is an international-standard metalanguage (メタ言語) used to define the markup languages themselves, which structure documents with tags.

SGML 源流のメタ言語

HTML Web ページ用

XML 汎用データ記述用

A metalanguage is a language for setting the rules of how another language is written. SGML is a standard that predates HTML and XML, and both were built on it. On today's web, SGML is almost never written directly.

AnalogyIt is like a "guide to designing formats" that exists before any individual format is designed. Formats for each purpose branch off from that guide.

How to rememberStandard Generalized = standard and general-purpose. The name carries the idea of a root standard that comes before narrowing to any particular use.

1 past questions on this term SGML

JSON is a lightweight data description format that uses no tags and represents data mainly as pairs of a key (item name) and a value enclosed in curly braces.

For example, in {"product": "notebook", "stock": 42}, a colon joins each key to its value and commas separate the pairs. It grew out of the way JavaScript writes objects, but today it is widely used for exchanging data between web services regardless of programming language.

How to rememberJavaScript Object Notation = the way JavaScript writes objects. Its origin is right there in the name.

1 past questions on this term JSON

XML vs. JSON

AspectXMLJSON
Key differenceHow structure is shownEnclosed between a start tag and an end tagKey-value pairs enclosed in curly braces
TypeMarkup languageData description format
OriginSGMLJavaScript notation

Key points

  • HTML is a language that describes the structure of web pages with tags, and it can also specify how they look.
  • A tag (タグ) is a marker in angle brackets; a start tag and an end tag enclose content, and nesting builds a hierarchy.
  • XML suits data exchange and lets you create new tags to fit the information you handle.
  • SGML is a metalanguage that sets the rules for markup languages, and it became the foundation of HTML and XML.
  • JSON is a lightweight format written as key-value pairs, used for exchanging data regardless of programming language.

Check questions

4 past questions from this unit

Start the check questions

All past questions in this topic