DEV Community

rajashree biswal
rajashree biswal

Posted on

DOM

DOM! DOM! DOM! It was very difficult for me to understand the concept and finally i am willing to write on it for my understand then i thought why don’t i share to others may be it will be useful for them also,so let’s understand what is a DOM we all know it is called as Document Object Model so lets know first the definition

The Document Object Model:-

When a browser sends a request to the server to fetch an HTML document, the server returns an HTML page in binary stream format which is basically a text file with a response header Content-Type which has value text/html; charset=UTF-8. Here text/html is a MIME Type which tells the browser that it is an HTML document and charset=UTF-8 tells the browser that it is encoded in UTF-8 character encoding. Using this information, the browser can convert the binary format into a readable text file.

If this header is missing the browser would not understand how to process the file and it will render in plain text format. But if everything is OK, after this conversion, the browser can start reading the HTML document. A typical HTML document could look like this.

"<!doctype html>





My home page





My home page



Hello



I am Zenny







The page has the following structure"

Top comments (0)