Examples
HTML Basic Page
Creating a Basic HTML Page
Basic HTML page uses <!DOCTYPE html>, <head>, and <body> for structure.
Understanding the HTML Document Structure
An HTML document is structured using several key tags that define its overall layout and functionality. The essential components of a basic HTML page are the <!DOCTYPE html>, <html>, <head>, and <body> elements. These elements ensure that your webpage is correctly interpreted by web browsers.
The <!DOCTYPE html> Declaration
The <!DOCTYPE html> declaration is the first thing that should appear in your HTML document, before the <html> tag. It tells the browser which version of HTML the page is using. In modern web development, this is typically HTML5, which is declared simply as <!DOCTYPE html>.
The <html> Element
The <html> element is the root element of an HTML page. It wraps all the content of the page, including the <head> and <body> sections. Everything enclosed within the <html> tags is part of the HTML document.
The <head> Section
The <head> section contains meta-information about the HTML document. This can include the page title, links to stylesheets, scripts, and other metadata that are important for the page but not directly visible in the browser's window.
The <body> Section
The <body> element contains all the content that you want to display on the webpage, such as text, images, links, tables, and more. It's where the main content of the HTML document is placed.
Putting it All Together
Now that you understand the individual components, let's put them together to create a complete HTML document. Below is an example of a simple HTML page structure.
Conclusion
Creating a basic HTML page involves using the <!DOCTYPE html>, <html>, <head>, and <body> elements. Understanding these components will provide a solid foundation for building more complex web pages in the future. Experiment with adding more elements to your HTML page to enhance its functionality and appearance.
Examples
- Previous
- Microdata
- Next
- Form Example