HTML Document Structure
The different elements that define the various sections of a webpage make up the structure of an HTML document. The structure of an HTML document is broken down as follows:
1. Document Type Declaration (DOCTYPE):
An HTML document starts with the <!DOCTYPE html> declaration, which indicates the version of HTML being used. For HTML5, <!DOCTYPE html> is utilized in contemporary web development.
2. HTML Element:
An HTML document's root element is the <html> element. It is the parent element of all other elements.
3. Head Element:
Metadata about the HTML document, including the title, character set, linked stylesheets, and metadata, are contained in the <head> element.
Typical components found in the <head> consist of:
<meta charset="utf-8">: Indicates the document's character encoding.
<title>: Specifies the webpage title that appears in the title bar or tab of the browser.
<link>: Provides links to outside resources, like stylesheets or icons.
4. Body Element:
The HTML document's actual content, including text, images, links, and other elements, is contained in the <body> element.
5. Heading Elements:
The heading elements <h1> through <h6> in HTML are available for defining headings at various levels.
6. Paragraph Element:
Text paragraphs are defined by the <p> element.
7. Lists (Ordered and Unordered):
List items (<li>), unordered lists (<ul>), and ordered lists (<ol>) are all supported in HTML.
8. Links (Anchor Element):
To make hyperlinks, use the <a> element.
10. Images (Image Element):
To embed images, use the <img> element.
11. Tables:
The <table> element is used to create tables, and the <tr>, <td> (data cell), and <th> (header cell) elements are used to define rows and cells.
Labels: HTML
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home