Markup language facts for kids
A markup language is a computer language. It uses special codes, often called tags, to tell a computer how to display or organize information. Think of it like giving instructions on how a document should look, rather than telling the computer what actions to perform.
Markup languages are different from programming languages. Programming languages can make a computer do things, like calculations or making decisions. Markup languages, however, focus on how text and other content should appear. For example, they can tell a computer to make text bold, create a list, or add an image.
The first markup languages were used for printing. They helped describe how text should be laid out on a page. The special codes for markup are usually written using basic text characters, like the ones you see on your keyboard.
Contents
What is a Markup Language?
A markup language uses special codes to add extra information to a document. These codes are often called tags. Tags tell a computer how to show the text, images, and other parts of a document. For example, a tag might tell a computer to make a word bold or to start a new paragraph.
Markup languages are used everywhere online. When you visit a website, the information you see is often displayed using a markup language like HTML. This language tells your web browser where to put headings, paragraphs, pictures, and links.
How Do Markup Languages Work?
Markup languages work by surrounding text or other content with specific tags. These tags usually come in pairs: an opening tag and a closing tag. For example, in HTML, to make text bold, you might use `` for the opening tag and `` for the closing tag. Everything between these tags would then appear bold.
Here's an example:
- To get the Greek letter "Mu" (μ) in LaTeX, you would type `\mu`.
- In HTML, you would type `µ` to get the same symbol.
These special codes tell the computer exactly what to display.
Markup Languages vs. Programming Languages
It's easy to confuse markup languages with programming languages, but they have different jobs.
- Markup languages describe the structure and appearance of information. They tell the computer what something is (like a heading or a paragraph) and how it should look (like bold or italic).
- Programming languages give the computer instructions to perform actions. They tell the computer what to do, like solving a math problem, running a game, or managing data. Programming languages can make decisions using "if-then" rules, which markup languages cannot do.
Examples of Markup Languages
Many different markup languages exist, each designed for specific purposes.
- HTML (HyperText Markup Language) is the most famous markup language. It's the main language used to create web pages.
- XML (Extensible Markup Language) is used for storing and transporting data. It lets you create your own tags to describe information.
- LaTeX is a markup language often used by scientists and mathematicians to create complex documents, like research papers and books. It's great for making sure equations and formulas look perfect.
- MediaWiki is the markup language used by Wikipedia and other wikis. It allows people to easily format text, create links, and add images to articles.
See also
In Spanish: Lenguaje de marcado para niños