Use quote marks to find an "exact phrase"

Print version

print icon

7: Child and descendant elements

Child and descendant elements

A child element is an element within another element. The other element is the 'parent' element.

If a child element has an element within it, then the latter is a 'descendant'. This more general term refers to elements of any generation below the parent, including child elements. Other 'related' terms may also be seen, such as 'ancestors'.

An example of a parent/child relationship is when there is a 'div' within another 'div', as shown below:


<div>			(parent element)
 <div>			(child element)					
				
				
 </div>			(close child element)
</div>			(close parent element)