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: 3062233 |
Download: 242 |
Latest Downloads
Horror Beat Phase Maker
Himalayan Children
Zebra AI
Supermarket Manager Simulator
Red Alert Online
Delta Force
Pokémon UNITE
Fantasy Aquarium
Girls Frontline
Wings of Stars
24 HoursReading Leaderboard
- 1 Kingdom Come: Deliverance 2 - Feast For The Poor Quest Walkthrough
- 2 Roblox: Pets Go - How To Get Diamonds
- 3 Roblox: Jujutsu Shenanigans - Locust Guy Guide
- 4 Roblox: Ninja Time - How To Get Spins
- 5 5 Proven Solutions for Monster Hunter Wilds Anti Tamper Error
- 6 How to Remove Empty Rows in Excel
- 7 Split Fiction Fatal Error: Discover Methods to Fix It on Windows
- 8 NYT Connections Answers And Hints - March 12, 2025 Solution #640
- 9 Exact Steps to Recover Deleted Files in Wise Duplicate Finder
- 10 How to Use Windows 11 Update Effectively: Best Practices and Tips
- 11 how to unlink rockstar account from steam
- 12 Enhance Your System Performance: A Complete Guide to Windows 11 Update
- 13 Step-by-Step Tutorial for Managing Windows 11 Update Successfully
- 14 when next steam sale
- 15 Mastering Windows 11 Update: Tips for a Hassle-Free System Upgrade
Latest Tutorials
-
- Go language practical GraphQL
- 2925 2024-04-19
-
- 550W fan master learns JavaScript from scratch step by step
- 4270 2024-04-18
-
- Getting Started with MySQL (Teacher mosh)
- 2305 2024-04-07
-
- Mock.js | Axios.js | Json | Ajax--Ten days of quality class
- 3052 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
