When Using Codepen should we build the HTML document according to all conventions?

So Bootstrap recommends to start all html project using Bootstrap with <!doctype html>

Other conventions include the head and body tags. Should we follow all these conventions when building projects on Codepen?

Not at all and if you do, Codepen will notify you that it’s not necessary. You can also ask Codepen to include the most common meta tags.

By the way, it’s one of the reasons it’s important to start working “locally”, with your editor etc, because Codepen makes things too easy, but it’s also comfortable to write your code in your editor.