What is a Website?
A website is a collection of Webpages that are stored on a Web server and it is accessible to all the users, who are connected to the Internet.
Web Pages consist of information about a particular brand or Organization to make it available and accessible for all the users around the world!
We have certain Web Languages to build the website, which are
HTML stands for Hypertext Markup Language. It is used to give basic structure or layout to our website.
CSS Stands for cascading style sheet. It is used to apply styling to our Website to make it look attractive.
DOM - Document Object Model
To understand DOM, it is important to know how the website loads in our Browser? When the user types the website name(i.e., Domain Name) and Domain System will send back the respective IP address to the browser and the browser will search for that IP address where its web server is located once it is found and that web server will send back the requested website's files to the browser. Next, the browser will interpret that Website's HTML file and convert it into a tree structure, called a DOM Tree, and the browser will read the tree and generate the output for us.
A tree structure is nothing but, HTML Elements are given with a Parent-Child relationship in a tree-like structure.
Let us take an example, of an HTML File
<link rel="stylesheet" href="style.css"/>
<p>HTML Elements are given with a Parent-Child relationship in a tree-like structure.</p>
When the browser interprets the HTML file into a tree structure(i.e., DOM tree structure) it looks like the tree structure given in below image,
We can see in detail about DOM Manipulation Concept in a future blog!