current location: Home > Download > Learning resources > Web page production > "The Difference Between HTML5 and HTML4"
"The Difference Between HTML5 and HTML4"
Classify: Learning materials / Web page production | Release time: 2017-12-22 | visits: 3062175 |
Download: 242 |
Latest Downloads
Red Alert Online
Delta Force
Pokémon UNITE
Fantasy Aquarium
Girls Frontline
Wings of Stars
Little Flower Fairy Fairy Paradise
Restaurant Cute Story
Shanhe Travel Exploration
Love and Producer
24 HoursReading Leaderboard
- 1 How Can I Prevent File Access Errors When Updating PictureBox Images?
- 2 How to fix Windows installation error 0x80300002?
- 3 How to Perform a Whole Word Search in MySQL?
- 4 Understanding Lists in Python
- 5 Understanding Asynchronous JavaScript: Enhancing Web Performance
- 6 Data Engineering Foundations: A Hands-On Guide
- 7 Why Do Auto-Increment IDs Still Increase After a SQL Transaction Rollback?
- 8 Does SQL Server Identity (Auto-Increment) Continue Incrementing After a Transaction Rollback?
- 9 How to Resolve File Lock Exceptions When Assigning Images to PictureBoxes?
- 10 How to Execute a WHERE…IN Subquery Using Doctrine 2's Query Builder?
- 11 Minimum Length of String After Operations
- 12 Why Do SQL Server Identity Gaps Appear After Transaction Rollbacks?
- 13 Can SQL Server Reclaim Identity Sequence Gaps After Transaction Rollbacks?
- 14 How to Split a String by the '#' Character in C#?
- 15 How Can I Prevent MySQL "AFTER UPDATE" Triggers from Firing on Unchanged Rows?
Latest Tutorials
-
- Go language practical GraphQL
- 2500 2024-04-19
-
- 550W fan master learns JavaScript from scratch step by step
- 3900 2024-04-18
-
- Getting Started with MySQL (Teacher mosh)
- 2080 2024-04-07
-
- Mock.js | Axios.js | Json | Ajax--Ten days of quality class
- 2860 2024-03-29
one. Changes in syntax
1.1 Marking method in HTMl5
1. Content type
The file extension remains unchanged, it is still .htm or .htm, and the content type is "text/html"
2. DOCTYPE statement
<!DOCTYPE HTML>
3. Specify the encoding of characters
<meta charset = “utf-8”> (utf-8 is recommended)
1.2 HTML ensures compatibility with previous HTML versions
three aspects:
1. Marked elements can be omitted
The elements that do not allow the use of closing tags are: area, base, br, col, command, embed, hr, img, input, keygen, link, meta, param, source, track, wbr.
The end tag elements that can be omitted are: li, dt, dd, p, rt, rp, optgroup, option, colgroup, thread, tbody, tfoot, tr, td, th.
All marked elements that can be omitted are: html, head, body, colgroup, tbody.
2. Attributes with boolean
Reference code example:
<!—Writing only attributes without writing attribute values means that the attribute is true-->
<input type = “checkbox” checked>
<!—Attribute value= attribute name, which means the attribute is true-->
<input type = “checkbox” checked = “checked”>
3. Omit quotation marks
When the attribute value does not include empty strings, "<", ">", "=", single quotes, double quotes and other characters, the symbols on both sides of the attribute can be omitted.
<input type = text>
1.2 Marking example
<!DOCTYPE HTML>
<meta charset = “utf-8”>
<title>HTML5 markup example</title>
<p>This code is HTML5
<br/>Written in syntax