Basic 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
<!DOCTYPE html>: tells the browser to use the modernHTML5standard;<html>: the root element. Everything on the page is placed inside this tag;<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.
<body>: contains everything users see on the page:- text;
- images;
- links;
- buttons.
How to Think About It
<head> → page settings. <body> → page content.
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に質問する
AIに質問する
何でも質問するか、提案された質問の1つを試してチャットを始めてください
セクション 1. 章 2