There is a common belief that the DOM emerged simultaneously with HTML and has always been an integral part of web development, with developers hav...
For further actions, you may consider blocking this person and/or reporting abuse
Even though Tim Bernder Lee is named as the "inventor" of HTML, he did not start with nothing. The Idea of a Standard Generalized Markup Language (SGML) had been around for quite some years. There are other languages like XML that have their own parsers too. XML and HTML are very similar, despite XML has no fixed keywords.
You can think of an XML-parser like a fast database. After reading an XML-file, many parsers keep the content in memory giving your access to the content. Does this sound familiar? At itΒ΄s core, each XML-parser is like the DOM.
So, the DOM is - at best - one under many.
But HTML has itΒ΄s quirks that possibly can drive parser developers nuts. Usually, a well formed XML-document is built like a tree. Each node has to be closed before you open a new one. This does not seem to be so strict in HTML. You can easily do something like this:
This is not well formed, tags are overlapping, but it is displayed as expected.
Speaking of SGML β I mentioned this in my previous article;
"There are other languages like XML" β and there is an upcoming article about that.
The reason why HTML is effectively the DNA of the web is that however you make your webpage, it will still end up with HTML in the browser. That's the danger, to me, of moving away from HTML too much. It puts more layers between your code and what the user sees and uses.
Yes, most HTML elements don't have much functionality, but many do have semantic meanings that can be meaningful for assistive technologies such as screen readers as well as search engines. So you have to be careful about that too.
This is not correct. Frameworks like React build the DOM directly with JS.
I guess I don't understand what you mean. What's in the browser is still HTML.
No, HTML is just a text format. It tells the browser how to build the DOM. But you can also use API-calls to build the DOM from Javascript. This is what React does.
Waiting for the next chapter of this exciting story π
DOM is not DOOM π
Rrright!
I fell smarter after reading it π
That was a plan!
DOM is not HTML)
Or is it? Let's try to figure out in my next article ;)
This is very interesting article. Thanks!
Thank you!
DOM is not HTML! Nothing is HTML at all. Only HTML is HTMLπ
Super, I didn't know that DOM is not HTML
Aaaand I can't find where this article stated DOM is or is not an HTML