Coming immediately after the doctype declaration, the
<html> code is the key to everything that comes after. This element is so important that it is often referred to as the root HTML element.
As I mentioned in the previous article, the
<html> element should have at least one attribute. Recall that attributes are always written inside the opening tag:
This a statement of the fact that the primary language on the page is English.
If you're following this series in order, your page now consists of:
<!DOCTYPE html> <html lang="en">
If you save this page and open it in a browser, you'll see that it’s blank, due to the fact that we haven’t yet added any content to the page; before we do that, we need to learn how HTML elements nest together.
Photograph by Sachie Nagasawa, used under a Creative Commons license
Enjoy this piece? I invite you to follow me at twitter.com/dudleystorey to learn more.