(Music) Hello and welcome to HTML Features. After watching this video, you will be able to list some of the features of HTML5, describe the Document Object Model or DOM tree, explain when you would use XML and when you would use HTML. So, what are some HTML5 features? It provides the means to categorize web pages into different sections, and includes tools for effective data management, drawing, video, and audio. Facilitates the development of cross-browser applications for the web and portable devices. Allows greater flexibility, permitting the development of exciting and interactive websites. Helps to create a more engaging user experience. Pages that are designed by using HTML5 can provide an experience similar to desktop applications. Allows for enhanced, multiple-platform development by combining the capability of an application programming interface (API). By using HTML5, developers can create a modern application experience that is uniform across platforms and devices. Here is an example of a document that conforms to the syntax of HTML5. Documents that have the text or html media type are parsed using HTML rules. If a document is transmitted with an HTML content type, such as text or html, it is processed as an HTML document by web browsers. This example uses the following elements: The !DOCTYPE is a declaration tag that represents the document type. The !DOCTYPE declaration is not an HTML tag; it is an instruction to the web browser about what version of HTML the page is written in. Although this declaration is not required, it should be the first line of the HTML code if the developer decides to include it. The html tag is the root element of this tree. It contains all of the other HTML elements, except the !doctype tag. This example, contains two elements: head and body. The head tag contains a title tag, which contains the text “Sample page” in the example. The head element can contain the following tags: title, scripts, style, style sheet links, meta information, browser support information and other initialization functions. Finally, the body tag contains all content that is displayed on the webpage. HTML user agents, commonly known as browsers, parse the markup, turning it into a DOM (Document Object Model) tree. A DOM tree is an in-memory representation of a document. DOM trees contain several kinds of nodes, which include a DOCTYPE node, elements such as headers and paragraphs, text nodes, and comment nodes. Here is an example of a document that conforms to the XML syntax of HTML5. Extensible Markup Language (XML) documents look similar to HTML documents, except they have an XML tag on the first line. In addition, with XML documents, the Content-type must be specified as an XML media type such as application or xml. When a document is transmitted with an XML content type, it is treated as an XML document by a web browser and an XML processor parses the document. How do you decide whether to use HTML or XHTML for developing web pages? Which of the two options you choose is related to how you intend to use the application. For instance, are you using XSLT (Extensible Style Sheet Language Transformations) to create other documents and resources from your web pages? People are equally divided about whether to use XHTML or HTML. Both HTML and XHTML use the same semantic or tags. However, XHTML tags all need to be in lowercase, while the case used does not matter in HTML. In addition, XHTML must be well-formed. Every element must have an end tag. All attributes must have a value and double or single quotation marks must surround all attribute values. If an XML parser encounters a situation where the syntax is not well-formed, it stops processing. In HTML, different case, unmatched quotation marks, and non-terminated and uncontained elements are allowed and commonplace. In this regard, HTML syntax is less rigorous than XHTML syntax. In this video, you learned that HTML5 includes features for categorizing sections of web pages, and managing data, video and audio tools. Enables you to develop a single, cross-browser application for the web and portable devices. and helps you to create a more engaging user experience. The DOM tree is an in-memory representation of a document. DOM trees contain nodes, which define the type of document and its structure, such as headers and paragraphs, text nodes, and comment nodes.