What is whitespace and how does it differ from indentation?


#1

Question

What is whitespace and how does it differ from indentation?

Answer

Whitespace is any character or series of characters which creates space on a page but does not display a visible mark. Common whitespace characters include tabs and spaces.

Indentation is a type of horizontal whitespace strategically used to enhance the readability of our code. For example, in HTML it is best practice to consistently indent our code to clearly illustrate nestings.


FAQ: Learn HTML Elements - Common HTML Elements - Whitespace