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
Since I need to learn how to build servers and da...
error message: ERROR 2002 (HY000): Can't conn...
Scenario: After installing the latest version of ...
Related Articles: Website Design for User Experien...
CSS Viewport units have been around for the past ...
Preface To delete a table, the command that comes...
Discovering Needs If only part of an area is allo...
1. Download the accelerated version of msyql dock...
A process is a program code that runs in the CPU ...
Preface This article mainly shares with you an ex...
<br />When discussing with my friends, I men...
1. Download the gitlab image docker pull gitlab/g...
Recently, the server has been frequently cracked ...
1. Brief introduction of the event An event is a ...
Table of contents tool Install the plugin Add a ....