Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
学ぶ Basic HTML Document Structure | Section
HTML Essentials

bookBasic HTML Document Structure

メニューを表示するにはスワイプしてください

Every HTML page follows the same basic structure. It defines how the browser should understand and display the content.

Here is a simple example of an HTML document:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>My First Page</title>
  </head>
  <body>
    <h1>Hello, World!</h1>
    <p>This is my first web page.</p>
  </body>
</html>

Main Parts of the Document

  1. <!DOCTYPE html>: tells the browser to use the modern HTML5 standard;
  2. <html>: the root element. Everything on the page is placed inside this tag;
  3. <head>: contains information about the page that is not visible to users. Common elements:
    • <title>: sets the name of the browser tab;
    • <meta charset="UTF-8">: ensures text displays correctly.
  4. <body>: contains everything users see on the page:
    • text;
    • images;
    • links;
    • buttons.

How to Think About It

<head> → page settings. <body> → page content.

Note
Note

You don't need to memorize everything yet. Focus on recognizing the structure. You'll use it in every HTML file.

すべて明確でしたか?

どのように改善できますか?

フィードバックありがとうございます!

セクション 1.  2

AIに質問する

expand

AIに質問する

ChatGPT

何でも質問するか、提案された質問の1つを試してチャットを始めてください

セクション 1.  2
some-alt