This article mainly introduces the detailed explanation of the tags and document structure of HTML programming, which is the basic knowledge in the introduction to HTML. Friends who need it can refer to it.
The purpose of tagging content with HTML is to give web page semantics. In other words, it is to give your web content the meaning that certain user agents can understand.
HTML specifies a set of tags to mark content with different tags. Each tag is a description of what it contains. The most commonly used HTML describes titles, paragraphs, links, and images. Currently, HTML has a total of 114 tags, but according to the 80/20 principle, using about 25 of them can meet 80% of the tag needs.
HTML The latest version of HTML5 has newly specified a batch of structured tags to group tags of related content, thereby better standardizing the overall structure of the web page. These new tags include <header>, <nav> (i.e. navigation), <article>, <section>, <aside>, and <footer>.
1. Tag closureFor each element containing content (such as title, paragraph, and picture), there are two different ways to label them according to whether the content contained is text. One is to use a closed label and the other is to use a non-closed label.
1.1 Closed tags for textExample: <h1>Hello, CSS!</h1>
1.2 Use self-closed labels for reference contentExample: <img src=images/dog.jpg style="border: 1px solid rgb(165, 165, 248); padding: 0px 0px 5px; margin: 8px 0px 1.1em; font-family: 'Courier New', monospace; overflow: hidden; width: 646.796875px; word-break: break-all; color: rgb(68, 68, 68);">XML/HTML Code Copy content to clipboard