Is <html> tag unnecessary when using bootstrap?

I’m currently going through the Front End Development Libraries, and the webpage doesn’t seem to have the <!DOCTYPE html>, <html>, <head>, <body> tags.

Are these things just added behind the scenes by freeCodeCamp, or is there some other reason these tags aren’t being used?

Those tags are always needed in every HTML document file. If you don’t see them in a particular environment (i.e. FCC, and others like CodePen) , it’d be because they’re just being added behind the scenes.

Only the doctype is strictly required. The rest are optional. However, not including them may cause you to run into bugs if you try to dynamically modify the page (such as with JavaScript) because the browser may give you unexpected results.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.