What is the meaning of "Model" in DOM?

Hi,

Can somebody please clarify what’s the meaning of word “Model” in DOM ( Document Object Model )

Per my understanding whole document is presented as an object to JS which it can manipulate with various default methods and properties.

But I didn’t get what’s meaning of “Model” ?

Thanks in advance

In a general sense, “model” can just be the shape of data. Like in a language like TypeScript, I might define a person as:

interface Person {
  name: string
  age: number
  address: {
    house: number
    street: string
    city: string
    state: string
    zip: string
  }
  phones: string[]
}

That is just the model for how I represent a “person” in my data.

In a more general sense, the DOM is just a model, an abstract representation of what is on the screen. It (the data and therefore the model) has a certain shape and hierarchy.

Looking on the interwebs, I came across this image that gets the point across:

download

FCC also has this article:

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.