<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>My First HTML Page</title>
</head>
<body>
<h1>Welcome to HTML Structure</h1>
<p>This is the basic structure of an HTML document.</p>
</body>
</html>
重要なコンポーネントを分解してみましょう:
<html>タグ:他のすべてのHTMLコンテンツを囲むルート要素
lang="en"属性:ドキュメントの言語を指定します(この場合は英語)
2つの主な子要素:
<head>:ドキュメントに関するメタデータを含む
<body>:Webページの表示可能なコンテンツを含む
Webブラウザでの例の出力は次のようになります:
Welcome to HTML Structure
This is the basic structure of an HTML document.
We use cookies for a number of reasons, such as keeping the website reliable and secure, to improve your experience on our website and to see how you interact with it. By accepting, you agree to our use of such cookies. Privacy Policy