Write the HTML code in a logical reading order
The flow of the HTML code should follow the reading order of the page.
In other words, when one piece of content follows another in the visual flow, it should also immediately follow that element in the HTML code.
To test this recommendation, turn off the CSS and check that the resulting page order matches the page when CSS is active.
If some content is hidden by default, make sure that it is properly positioned in the HTML flow when styles are disabled.