Home > Article > Web Front-end > How to read html
<tag>content</tag><p>The outer angle brackets of
<tag>
play a special role and indicate the role of this tag. </tag>
Indicates the end of the tag to tell the browser the scope of the corresponding tag.
< ;html>
: Defines the root element of the document; <head>
: Defines the head of the document, including metadata, titles and other media elements;<body>
: Defines the main part of the document, including all main content; <h1>
~<h6>
: Define the title, 1 represents the highest level title, 6 represents the lowest level title; <p>
: Define the paragraph; < a>
: Define the anchor point, that is, the link; <img>
: Define the image element. class
: Define one or more class names (style classes) for the element; id
: Define the unique id of the element; src
: Define the URL of the image; href
: Define the target URL of the link; style
: used to directly define CSS styles for elements. <!DOCTYPE html> <html> <head> <title>My first HTML page</title> </head> <body> <h1>Welcome to my page</h1> <p>This is my first HTML page.</p> <a href="https://www.example.com">Click here for more information</a> </body> </html><p> By running this code, you will see a simple web page that contains a title, a paragraph, and a Link. <p>In short, learning HTML is not difficult. As long as you understand its basic structure and common tags, and then practice continuously, you can easily read HTML code and write your own web pages.
The above is the detailed content of How to read html. For more information, please follow other related articles on the PHP Chinese website!