What is "Nesting" HTML / Computer Science?

1) Nesting means to organize code in a special way that can connect 2 pieces of information. Lets focus on the body tags, note there are tags INSIDE the body tag too.

2) The body tags are opened and closed. However we have a paragraph and 2 heading tags NESTED inside. How do we know they are nested? Take a look at the spacing, the p and H tags are indented 1 space in between the body tags.

3) Take a look of an example in Python. Nesting is important, you will learn what lines of code support nesting. Focus on lines 4 and 5.

*See how Line 5 is indented under line 4? It is nested.

NOTE: Nesting is different in HTML and Python, please do not get confused!

© 2020 Farragut Technology Program