From the course: HTML for Programmers
Unlock the full course today
Join today to access over 24,500 courses taught by industry experts.
Anatomy of an HTML page
From the course: HTML for Programmers
Anatomy of an HTML page
- [Instructor] An HTML5 document consists of three parts. Information about the HTML version, a header section as defined by the head element, and a body section as defined by the body element. The first element in an HTML document is the DOCTYPE element. The HTML version is noted within the DOCTYPE element and all HTML documents must begin with this tag. The next element in an HTML document is the HTML tag. This tag represents the root element of an HTML document. Every other element within the page will be a child or descendant of this element. You may see a lang attribute on the HTML tag that indicates the page language. Adding this language attribute informs screen readers which language it should announce to the user upon page load. Without this attribute, the screen reader will default to the operating system's language, which may cause word mispronunciations. The next element is the head element. The head element…