introduceHTML provides the contextual structure and meaning of the content of a web document; HTML itself has no expression. For example, we see that <H3> is bold and the font size is 2em; <strong> is bold, but don’t think that these are the expression of HTML. This is the default style of HTML at work. So we need to know that HTML has nothing to do with the expression of the page . Expression is the business of CSS. The role of HTML in a page is structure and meaning. To put it simply, it is to divide the content. What is put here is what we put. StructuringIf a web page is compared to a house, then HTML is the reinforced concrete walls and the roof and beam frames; and CSS is the decorative materials, floor paint and the like. A good page structure means that even without CSS decoration, the page structure is still clear and the house is still visible. The DIV+CSS that people often talk about is just a popular term, not DIV throughout the article. Remember: DIV is not God! SemanticHTML is a supplementary representation of the content and meaning (i.e. semantics) of text. It tells us, "This line is a heading, these lines form a paragraph, this is a bulleted list, that is a link." It doesn't tell us, "These words are blue, those are red, this part is on the right, these are italic." That's the job of CSS. In short: HTML tells us what a piece of content is (or what it means), not what it looks like. Copy code The code is as follows:<!--Unsemanticized--> <div id="header"> <div class="H3">Former Brick Siege Master</div> <div class="h2">Building with blocks is also about art</div> </div> <!--After semanticization--> <div id="header"> <H3>Former Brick Siege Master</H3> <h2>Building with blocks is also about art</h2> </div> What are the benefits of semantics?
Appendix: New elements in HTML5
|
<<: Teach you how to use Portainer to manage multiple Docker container environments
>>: Sample code for making a drop-down menu using pure CSS
FireFox is a commonly used browser with many exte...
1. Software Introduction VirtualBox VirtualBox is...
conda update conda pip install tf-nightly-gpu-2.0...
English: A link tag will automatically complete h...
1. Before configuring the IP address, first use i...
Table of contents 1. let keyword 1.1 Basic Usage ...
Table of contents 1. Installation 1. Introduction...
introduction When I was learning more about datab...
Preface I just bought a new VPS. The data disk of...
I believe that people who have experience with Re...
1. Change the transparency to achieve the gradual...
Table of contents Preface 1. Get the length of a ...
Docker usage of gitlab gitlab docker Startup Comm...
Introduction I will write about the problem I saw...
Table of contents 1. Definition and Use 1.1 Defin...