📅  最后修改于: 2023-12-03 15:15:33.534000             🧑  作者: Mango
HTML (Hypertext Markup Language) is the standard markup language used to create web pages. It defines the structure and content of a web page through a series of tags and attributes.
The basic structure of an HTML document consists of a document type declaration, an HTML tag, and a head and body section.
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>This is a Heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
<!DOCTYPE html>
declaration defines the document type and version of HTML being used.<html>
tag encloses the entire document.<head>
section contains information about the document, such as the title and links to external stylesheets and scripts.<body>
section contains the visible content of the web page.HTML is largely based around the use of elements, which are defined by tags and attributes.
Tags are used to define the start and end of an element, and can be nested within each other to create more complex structures.
<p>This is a paragraph with <em>italicized</em> text.</p>
<p>
tag defines a paragraph element.<em>
tag defines an element for text that should be emphasized or italicized.Attributes provide additional information about an element, and are defined within the opening tag using name/value pairs.
<img src="image.jpg" alt="Description of image">
src
attribute specifies the source URL of the image.alt
attribute provides a description of the image for accessibility purposes.HTML provides the core structure and content of a web page. By using tags and attributes, developers can create complex and visually appealing layouts with ease.