MindMap Gallery HTML
Front-end knowledge summary of HTML, including HTML semantics, new knowledge points in HTML5, etc.
Edited at 2021-03-01 21:03:24This is a mind map about bacteria, and its main contents include: overview, morphology, types, structure, reproduction, distribution, application, and expansion. The summary is comprehensive and meticulous, suitable as review materials.
This is a mind map about plant asexual reproduction, and its main contents include: concept, spore reproduction, vegetative reproduction, tissue culture, and buds. The summary is comprehensive and meticulous, suitable as review materials.
This is a mind map about the reproductive development of animals, and its main contents include: insects, frogs, birds, sexual reproduction, and asexual reproduction. The summary is comprehensive and meticulous, suitable as review materials.
This is a mind map about bacteria, and its main contents include: overview, morphology, types, structure, reproduction, distribution, application, and expansion. The summary is comprehensive and meticulous, suitable as review materials.
This is a mind map about plant asexual reproduction, and its main contents include: concept, spore reproduction, vegetative reproduction, tissue culture, and buds. The summary is comprehensive and meticulous, suitable as review materials.
This is a mind map about the reproductive development of animals, and its main contents include: insects, frogs, birds, sexual reproduction, and asexual reproduction. The summary is comprehensive and meticulous, suitable as review materials.
HTML
src/href
href: hypertext reference, used on elements such as link and a. href is a reference and page association, establishing a connection between the current element and the referenced resource.
src: represents a reference resource, replaces the current element, and is used in img, script, and iframe.
Strict mode, mixed mode
Strict mode: Run at the highest standard supported by the browser
Mixed mode: The page is displayed in a loosely backward-compatible manner, simulating the behavior of older browsers
Progressive enhancement, graceful degradation
Progressive enhancement: ensure the most basic functions at the beginning, and then improve and add
Graceful degradation: build full functionality from the beginning and then make it compatible with older browsers
Label
img title and alt
title refers to the picture information, alt refers to the actual text when the picture is not displayed.
The difference between title and h1
title is the website information theme, h1 is the article theme; title weight is higher than h1
The difference between b and strong, the difference between i and em
b means bold, strong not only adds boldness but also strengthens the tone; i means italics, em means emphasis and italics
DOM and BOM
DOM is the document object model, html document
BOM is the browser object model, which operates the API that appears in the browser (window, etc.)
meta viewport
Function: Make the width of the current viewport equal to the width of the device, while not allowing the user to manually zoom
Principle: Mobile browsers usually render pages in a virtual window that is wider than the mobile screen. This virtual window is the viewport; the purpose is to display web pages that are not mobile-adapted normally so that they can be fully displayed to the user;
Understanding of web standards, usability, and accessibility
Availability
accessibility
maintainability
HTML global attributes
accesskey: Set shortcut keys to provide quick access
class: class
contenteditable: The specified element is editable
contextnemu: Customize the content of the right-click mouse pop-up menu
data-*: Add custom attributes to elements
dir: Set the element text direction
draggable: Set whether the element can be dragged
dropzone; set element drag and drop type
hidden: set hidden
id: unique identifier
lang: language
spellcheck: whether to enable spelling and grammar checking
style: inline css style
title: Suggested information related to the element
translate: Whether the content of elements and descendant nodes needs to be localized
What is the difference between canvas and svg
canvas: Draw 2D graphics through JavaScript.
SVG: A language for describing 2D graphics using XML.
HTML5 new features
Add new element
main structural elements
article/section/nav/aside/time/pubdate
non-main structural elements
header/hgroup/footer/address
CanvasCanvas
Drawing steps
Get canvas, get context, fill and draw borders, set drawing style, specify line width, specify color value, draw
method
Create a circular path: context.arc(x, y, radius, startAngel, endAngel, anticlockwise)
moveTo(x, y), lineTo(x, y)
Media video, audio
use
Attributes
Geo API
local storage
localStorage; data storage without time limit
sessionStorage‘data storage for a session
Offline application
manifest
applicationCache
form
New input types; calendar, date, time, email, url, search, number
form validation
Add new page elements
figure\figcaption\details\mark\progress\meter\menu\command\ol\dl\strictly restricted cite\redefined small
Add new attributes
autofocus, placeholder, form, required, autocomplete, min, max, multiple, pattern, step; formaction, formenctype, formmethod, formnovalidate, formtarget
File API
FileList object and file
Blob object
FIleReader interface
Drag and drop API
Implementation steps
Set the draggable attribute of the object element you want to drag and drop to true
Write event handling code related to drag and drop
event
dragstart, drag, dragenter, dragover, dragleave, drop, dragend
Communication API
Cross-document messaging
WebSockets communication
Web Workers processing threads
var worker = new Worker('worker.js')
worker.onmessage=function(event, {}}
Doctype
Tell the browser which HTML or XHTML specification the document uses; tell the browser according to which specification to parse the page
semantic understanding
Do the right thing with the right label
The page content is structured and the structure is clearer
Improve SEO, search engine crawlers rely on html tags
Convenient for reading and later maintenance