Hi there,
Marking something up in a book would mean underlining or highlighting a text. In that sense I am finding it difficult to grasp the reasoning behind the name HTML(Markup).
As a side note, I am puzzled that, isn’t CSS the language that actually marks up the texts and other items in a webpage? Then why would HTML, the language of tags, be called a markup language.
I appreciate your time for reading this, feel free to point me towards resources where more information about this reasoning can be found.
have a good time!
In: 2
You can think of an HTML page to be, in some ways, a raw text file, but with some spice added.
You could, for example, have a perfectly valid HTML page that looks like:
Hello, world!
This is a really cool web page.
And it would show up more or less like that (minus the line break, because… reasons).
But what if you wanted that first line to be more like a section title header? And you wanted that second line to be more like a paragraph of text?
HTML defines tags that you can put around the text that let you make those distinctions. You have `<h1>` through `<h4>` tags for section headers, and `<p>` tags to denote paragraphs. So you can instead write your file like:
<h1>Hello, world!</h1>
<p>This is a really cool web page.</p>
The tags you wrapped around the text will tell something designed to read HTML pages (typically a web browser) what the text is supposed to be “”for””. At the end of the day, it’s still just a bundle of text. The content itself hasn’t changed. But with these tags, you’ve *marked* what each piece of information is *for*. What its intended *purpose* is. That’s the “markup” in “markup language”.
CSS isn’t really a markup language because nothing in CSS really tells you what any part of the document is *for*. Its purpose is to tell you how certain parts of the document should *look*. It’s about *style*, not *purpose*. That’s why CSS stands for Cascading *Style* Sheets. Its intended function is decoration, not marking.
This distinction goes out the window somewhat with today’s actual use of web design, where web pages are oceans of nested `<div>` tags that don’t really mean much of anything, CSS makes the page look radically different from how the page is structured, and JavaScript dynamically loads and modifies the document on-the-fly. But all of these things were named back in a simpler era where a lot of that wasn’t the norm. And you can still build websites the “old way”, as they were originally intended to be made back in that era, if you want.
Latest Answers