What is a Markup format?
Web developers often come across the keywords markup or a markup language.
Markup is different from code, and some web professionals use them interchangeably.
A markup language is a language that annotates text so that computers can manipulate the text while processing it for display or print.
What is a Markup language in the web world?
- Markup consists of tags, an opening tag, and a closing tag which look something like <p>Some text here</p>
- Each tag is made up of less than and greater than symbols
- Markup is like instructions for determining how to display or print a text, that is enclosed
- Markup is not part of visible content, and only the text it enclosed is either displayed or printed
- Markup becomes a language when rules are defined around how to write and use
- Web markup languages are defined by W3C or World Wide Web Consortium
- Example: Annotations in a book to highlight a piece of text to make it important compared to the surrounding text
Markup languages that we have today are - XML, HTML and XHTML
- XHTML 1.0 is an extension of HTML 4.01, which may be observed in older websites that are not migrated to HTML5.
Here is a sample HTML markup file content
<!doctype html>
<html>
<head>
</head>
<body>
<h1>Heading level 1</h1>
<h2>Heading level 2</h2>
<h3>Heading level 3</h3>
<h4>Heading level 4</h4>
<h5>Heading level 5</h5>
<h6>Heading level 6</h6>
<h1>Paragraph</h1>
<p>This is a paragraph with some <b>bold</b> and <i>italic</i> texts.</p>
<h1>Unordered List</h1>
<ul>
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
<li>Fourth item</li>
</ul>
<h1>Ordered List</h1>
<ol>
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
<li>Fourth item</li>
</ol>
<h1>Blockquote</h1>
<blockquote>Content inside blockquote.</blockquote>
<h1>Link</h1>
<a href="https://randomcodez.com">Random Codez Website</a>
<h1>Image</h1>
<img src="https://via.placeholder.com/150" alt="image" />
</body>
</html>
Overall
HTML markup language uses tags to format documents.