Home >Web Front-end >HTML Tutorial >Introduction to the basic structure of html files

Introduction to the basic structure of html files

王林
王林forward
2020-02-18 18:28:194147browse

Introduction to the basic structure of html files

一个HTML文件的基本结构如下:

<html>
<head>...</head>
<body>...</body>
</html>

代码讲解如下:

1、称之为根标签,所有的网页标签都是在它们中间的。

2、

标签用于定义文档的头部,它是头部元素的容器。头部元素包含有、<style>、<scipt>、<link>、<meta>等标签。<p>3、在<body>和<body>标签之间的内容是网页的主体内容,如:<h1>、<span>、<a>、<img alt="Introduction to the basic structure of html files" >、<p>等网页内容标签,在这里的标签中的内容会在浏览器中展示。<p>(推荐教程:<a href="https://www.php.cn/div-tutorial.html" target="_blank">html入门教程)<p>整体代码如下展示:<pre class="brush:html;toolbar:false"><!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>认识html文件基本结构</title> </head> <body> <h1>html文件的基本结构包含<html></html><head></head><body></body></h1> </body> </html></pre><p>浏览器展示效果:<p><img src="https://img.php.cn/upload/image/936/355/732/1582021389863140.png" title="1582021389863140.png" alt="Introduction to the basic structure of html files"/><p>更多编程相关内容,请关注php中文网<a href="https://www.php.cn/course.html" target="_blank">编程入门栏目!</style>

The above is the detailed content of Introduction to the basic structure of html files. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:cnblogs.com. If there is any infringement, please contact admin@php.cn delete