Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which programming language is CSS / HTML defined by?

Tags:

html

css

xml

How did the developers of HTML and CSS define them? I mean which programming language did they use?

Imagine i want to define a new HTML tag or new CSS property, or even a new language. for example instead of using tags <>, I want to define a language to use brackets [] and new CSS-resembling syntax:

[foo style(bar: .....)]

How they (developers) do this? and which programming language they use, which approach they follow?

p.s.1: I'm not going to develop a new language, it is just a question.

p.s.2: I couldn't find appropriate tags, so please be patient if this question doesn't fit css,html & xml contexts.

like image 752
Ali Avatar asked Apr 19 '26 15:04

Ali


1 Answers

Consider this:

You are reading English. You are able to understand punctuation, meaning of the words and then are able to extract what that means.

The same is for HTML and browsers. HTML is itself a "markup language" (not a programming language) like English in our example. Web Browser is like our brain, it understands the syntax(grammar and punctuation) and then extract what that means and show it to us.

So your question was more like "In what language is English written in?".

As for your question to how you want to create something like HTML/CSS, you need to first understand the basics of "Theory of Computation" and "Compiler Construction".

But to answer your question in brief, you need to create a dictionary(which defines meaning of each and every word in your language) and then create a "parser"(like Web Browser) which understands its meaning.

This being a very wide topic, I would like you to search the web for the two topics I mentioned above.

Hope I helped!

like image 195
Jagrut Avatar answered Apr 22 '26 04:04

Jagrut