Q: What is a document flow?
A: Simply speaking, it can be understood as the order in which elements appear on the page.
Q: When is the document flow out of the picture?
A: When using "floating" and "absolute positioning".
Q: Does the out-of-document flow occupy space?
A: So to speak. To be more precise, it is possible for the other elements to be positioned as if they were not visible when the element is out of the flow of the document.
Q: Does the out-of-document flow mean that the element is detached from the DOM tree?
A: No, with the browser's review element you can see elements that are out of the document stream (for example, float) and still appear in the DOM tree.
It is important to note that when you use float to detach from the document flow, the other boxes ignore the element, but the text inside the other box will still make a position for the element, wrapping around it. For elements that use absolute positioning to detach from the document flow, the text in other boxes and other boxes ignores it.
CSS out of document flow