If we introduce the nesting rules of basic HTML web page tags, the first thing we need to talk about is the classification of elements. Elements can be divided into block-level elements and line-level elements. What are block-level elements? It can occupy a single line, and you can set the width and height, the default is 100%; the row-level element is the opposite, its content determines its width and height, and special characters are treated as text. <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>HTML block-level, line-level elements, special characters, nesting rules</title> </head> <body> <!-- Block element: occupies a single line, width and height can be set, default width is 100% --> Block elements are divided into text and container types. Text block elements: p, h1-h6 Container block elements: div, table, tr, td, frame, ul>li, ol, dl, dt, dd (sequence) <!-- Row element: does not occupy a single row, width and height depend on the content--> Row element: a img input strong em del span Special characters: literal br   hr </body> </html> The nesting rules are summarized as follows: 1. Block elements can be nested within row elements 2. Row elements can be nested within row elements 3. Row elements cannot be nested within block elements 4. Text block elements cannot be nested within block elements 5. Container block elements can nest block elements The following blog posts on the basic concepts of HTML web pages, the basic structure of HTML web pages, the introduction of HTML basic tags, images, text, hyperlinks, lists, tables, the interactive principles of HTML basic tags, radio buttons, check boxes, drop-down boxes, and the comparison between web page DIV+CSS layout and ifame traditional layout are all the parts of HTML. The main purpose of learning HTML is to understand its semantic nesting rules to build pages. As for the CSS and interactive logic JS of the page, they are the content to be practiced below! |
<<: How to display percentage and the first few percent in MySQL
>>: How to set the position of the block element in the middle of the window
This tutorial shares the process of manually inst...
1. Spread Operator The spread operator is three d...
Preface: The most commonly used architecture of M...
Note that this is not a project created by vue-cl...
Detailed example of removing duplicate data in My...
This article example shares the specific code of ...
The solutions to the problems encountered during x...
Preface When Ahhang was developing the Springboot...
1. First download from the official website of My...
The CSS counter attribute is supported by almost ...
Table of contents Preface first step: Step 2: Mod...
I have a server with multiple docker containers d...
Install Oracle_11g with Docker 1. Pull the oracle...
noscript definition and usage The noscript elemen...
Table of contents Preface 1. Cause of the problem...