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: 3062198 |
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 to Automatically Fix Column Width to Fit Your Data in Excel
- 2 How to Import Tables From the Web to Excel 365
- 3 Kingdom Come: Deliverance 2 - How To Study Faster
- 4 Kingdom Come: Deliverance 2 - Fortuna Walkthrough
- 5 How to Control Windows Update Settings to Avoid Forced Restarts
- 6 How to Use the TREND Function in Excel
- 7 This Innovative Keyboard Is Interesting, but Is It Just a Gimmick?
- 8 How to Set YouTube to Automatically Rotate When Opened on Samsung Phones
- 9 How To See Captions for Any Video You Watch on a Samsung Galaxy Phone
- 10 I Always Use Excel to Create Heat Maps: Here's How You Can Too
- 11 You Can Now Buy Microsoft Office 2024
- 12 Marvel’s Spider-Man 2 Using More Video Memory, Top Fixes to Try
- 13 Samsung Galaxy S25 Series Hands-On: Extremely Iterative, but the Ultra Is Nicer to Hold
- 14 Kingdom Come: Deliverance 2 - Max Level Cap
- 15 What Is Apple’s Enhanced Visual Search and Should You Turn It Off?
Latest Tutorials
-
- Go language practical GraphQL
- 2690 2024-04-19
-
- 550W fan master learns JavaScript from scratch step by step
- 4071 2024-04-18
-
- Getting Started with MySQL (Teacher mosh)
- 2197 2024-04-07
-
- Mock.js | Axios.js | Json | Ajax--Ten days of quality class
- 2965 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