Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between HTML and DOM

Tags:

html

dom

What is the difference between DOM and HTML?

like image 718
kobe Avatar asked Nov 05 '10 21:11

kobe


People also ask

Is an HTML file a DOM?

The HTML DOM is a standard object model and programming interface for HTML. It defines: The HTML elements as objects. The properties of all HTML elements.

What is the difference between DOM property and HTML attribute?

The HTML attribute value specifies the initial value; the DOM value property is the current value.

Why do we use DOM in HTML?

The DOM represents the document as nodes and objects; that way, programming languages can interact with the page. A web page is a document that can be either displayed in the browser window or as the HTML source.

What is the difference between DOM and page source?

The notions between a page's source and a page's DOM are similar, but different. The source is the raw HTML that is unadulterated by any client-side scripts. It is the direct response of the HTTP request to the server. The DOM, on the other hand, is the same HTML structure that has been modified by JavaScript.


1 Answers

DOM is a model of a document with an associated API for manipulating it.

HTML is a markup language that lets you represent a certain kind of DOM in text.

Other kinds of DOMs can be expressed in other markup languages, for example RSS and Atom can be converted to a DOM and manipulated with the same API as an HTML or XHTML document (more or less anyway; there are some HTML specific DOM extensions).

like image 195
Quentin Avatar answered Sep 28 '22 03:09

Quentin