What do html documents contain




















HTML Tags. HTML Attributes. HTML Graphics. HTML 5. HTML Course. HTML Questions. Table of Contents. Save Article. This structure isn't only required for your document to be compliant but will also allow you to provide useful information about your document. The basic structure of any HTML document consists of the following sections or elements:. Every HTML document must begin with a basic declaration that identifies its type. This is a very useful measure that inform browsers beforehand, what type of document they are about to process, allowing them to adjust their processing mechanisms accordingly.

The DTD is inserted usign a special tag! This declaration can only be present at the begining of the document.

Unless you're writing documents for a very particular scenario, this is the declaration you're going to use. To see other DTDs go to the! After having placed the DTD right at the top of the document, it's time to create the main container: a place where the whole document except the DTD will fall into. Depending upon the version of HTML, there are a number of different doctype declarations that names the document type definition DTD in use for the document.

Each DTD differs from other in the elements it supports and differ as follow:. Such elements are either metadata that describe information about the page or includes sections that are used to fetch information from external resources like CSS stylesheets or JavaScript files. Header of a page is represented by the head tag. For setting page title, the title element is the only one that is required within the tags.

The same is used by Search engines to identify the title of a page. All of the content that is visible on a web page is nested between opening and closing body tags. The body is the primary container of the content that makes up a web page. All of our code was dropped in between the body tags and styled with CSS.

The header element is used to contain the content that appears at the top of every page of your website: the logo, tagline, search prompt, and possibly a navigational menu. Use the main element between header and footer elements to contain the primary content of your web page. The main element cannot be a descendant of an article , aside , header , footer , or nav element.

Instead, it should be a direct descendant of the body element. Navigational menus are commonly placed at the top of a web page, in a sidebar, or in the page footer. Wherever you happen to place a navigational menu, wrap it in nav tags. If your website includes blog posts, articles, or any other content that could just as well appear on another website as syndicated content, wrap that content in an article post.



0コメント

  • 1000 / 1000