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: 3062098 |
Download: 242 |
Latest Downloads
Fantasy Aquarium
Girls Frontline
Wings of Stars
Little Flower Fairy Fairy Paradise
Restaurant Cute Story
Shanhe Travel Exploration
Love and Producer
The most powerful brain 3
Odd Dust: Damila
Young Journey to the West 2
24 HoursReading Leaderboard
- 1 How Can I Safely Access and Convert a C Array of `const char *` to Go Strings Using `cgo`?
- 2 Can I Wrap Text in Select List Options?
- 3 Is Stateful Metaprogramming Still Legal in C 17?
- 4 How to Interleave Multiple Lists in Python?
- 5 How Can I Effectively Import CSV Data into MySQL Using PHP, Addressing Common Issues Like Data Type Mismatches and Execution Time Limits?
- 6 JavaScript Shared Memory
- 7 Are Quotation Marks Necessary for Multi-Word Font Families in CSS?
- 8 How to Check if an Array Element Contains a Value from a Whitelist in PHP?
- 9 How Can I Order Related Model Records Using Laravel\'s `orderBy` Relationship?
- 10 How to Resolve the \"clang: error: unknown argument: \'-mno-fused-madd\'\" Error During psycopg2 Installation?
- 11 dtaddin.dll - What is dtaddin.dll?
- 12 How to Resolve Static Linking Errors with Oracle Libraries in CGO Applications?
- 13 How to fix "No available camera input" error in Windows?
- 14 Learning GO : - Packages
- 15 How Can I Select an HTML Element by Its Name Attribute Using jQuery?
Latest Tutorials
-
- Go language practical GraphQL
- 2114 2024-04-19
-
- 550W fan master learns JavaScript from scratch step by step
- 3539 2024-04-18
-
- Getting Started with MySQL (Teacher mosh)
- 1864 2024-04-07
-
- Mock.js | Axios.js | Json | Ajax--Ten days of quality class
- 2674 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