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: 3062255 |
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 PHP Profiling Tools (Xdebug, Blackfire): Identifying bottlenecks.
- 2 Can I use ChatGPT-4 for free?
- 3 Is ChatGPT 4 O available?
- 4 What is the difference between GPT-4 and 4o?
- 5 Framework Best Practices: Code organization and maintainability.
- 6 Is GPT-4 available to the public?
- 7 Customizing/Extending Frameworks: How to add custom functionality.
- 8 Framework Security Features: Protecting against vulnerabilities.
- 9 Dependency Injection Container: How it works in Laravel/Symfony.
- 10 Nintendo Switch Reveals Virtual Game Cards To Make Owning Multiple Consoles More Flexible
- 11 Laravel Facades: Benefits and drawbacks.
- 12 Windows 10 KB5039299 Download and Install & Not Installing
- 13 Fix The First Descendant Low FPS Drop/Lagging/Stuttering on PC
- 14 Dogecoin's latest price today 2025
- 15 MSConfig Keeps Reverting to Selective Startup? 2 Solutions Here
Latest Tutorials
-
- Go language practical GraphQL
- 3041 2024-04-19
-
- 550W fan master learns JavaScript from scratch step by step
- 4381 2024-04-18
-
- Getting Started with MySQL (Teacher mosh)
- 2368 2024-04-07
-
- Mock.js | Axios.js | Json | Ajax--Ten days of quality class
- 3103 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
