To answer your question, you will have to be aware of the fact that the depth and height are properties of a *node*: The depth of a node is the number of edges from the node to the tree's root node and also the root node will have a depth of 0.

The given height of a node is the number of edges on the *longest path* from the node to a leaf. The height would be 0 for a leaf node. For a tree, the height would be the height of its root node and could also be the depth of its deepest node. When talking about the diameter which is also the width of the tree, is the number of *nodes* on the longest path between any two leaf nodes. The image of the tree below has a diameter of 6 nodes.