What are the knowledge points that must be mastered in HTML?
How do you understand HTML semantics?
Learning video sharing: html video tutorial
Make the page content structured, it has the following advantages
1. Easy for users to read, the style is lost This will give the page a clear structure.
2. It is beneficial to SEO. Search engines determine the context and the weight of each keyword based on the tags.
3. Convenient for other devices to parse, such as blind readers rendering web pages based on semantics
4. Conducive to development and maintenance, semantics are more readable, codes are better maintained, and CSS3 The relationship is more harmonious
For example:
What is meta viewport used for and how to write it?
Usually viewport refers to the window and viewport. The area on the browser (or maybe a webview in an app) used to display the web page. The viewports on the mobile terminal and PC are different. The viewport on the PC is the browser window area, while on the mobile terminal there are three different viewport concepts: layout viewport, visual viewport, and ideal viewport
meta has two attributes name and http-equiv
1, name
keywords(关键字) 告诉搜索引擎,你网页的关键字 description(网站内容描述) 用于告诉搜索引擎,你网站的主要内容。 viewport(移动端的窗口) 后面介绍 robots(定义搜索引擎爬虫的索引方式) robots用来告诉爬虫哪些页面需要索引,哪些页面不需要索引 author(作者) generator(网页制作软件) copyright(版权)
2, http-equiv. As the name suggests, it is equivalent to the file header function of http
content-Type 设定网页字符集 //旧的HTML,不推荐 //HTML5设定网页字符集的方式,推荐使用UTF-8 X-UA-Compatible(浏览器采用哪种版本来渲染页面) //指定IE和Chrome使用最新版本渲染当前页面 cache-control(请求和响应遵循的缓存机制) expires(网页到期时间)
canvas canvas
const ctx = canvas.getContext(‘2d’); // 获取它的2d上下文 ctx.fillStyle = ‘green’; // 设置笔刷的填充色 ctx.fillRect(10, 10, 100, 100); // 利用画笔范围,矩形,比如圆
video
autoplay 布尔属性;视频马上自动开始播放,不会停下来等着数据载入结束。 controls 提供用户控制,允许用户控制视频的播放,包括音量,跨帧,暂停/恢复播放。 loop 布尔属性;指定后,会在视频结尾的地方,自动返回视频开始的地方。 track标签表示的是字幕 poster 表示的是封面
h5 mobile page
WebView是一种控件,它基于webkit引擎,因此具备渲染Web页面的功能。 基于Webview的混合开发,就是在 Anddroid (安卓)/(苹果)原生APP里,通过WebView控件嵌入Web页面。 很多APP都是外边套原生APP的壳,内容是H5页面(基于html+css+js的Web页面)。现在的移动端混合开发软件,如果对于交互渲染要求不是特别高的项目,基本都是这么玩的。
HTML5 new features
本地存储特性 设备兼容特性 HTML5提供了前所未有的数据与应用接入开放接口 连接特性 WebSockets 网页多媒体特性 支持Audio Video SVG Canvas WebGL CSS3 CSS3特性
Distinguish between ordinary display and high-definition screen
当devicePixelRatio值等于1时(也就是最小值),那么它普通显示屏。 当devicePixelRatio值大于1(通常是1.5、2.0),那么它就是高清显示屏。 不同像素的图利用媒体查询结合 devicePixelRatio 可以区分普通显示屏和高清显示屏
CSS design plan:
.css{/* 普通显示屏(设备像素比例小于等于1.3)使用1倍的图 */ background-image: url(img_1x.png); } @media only screen and (-webkit-min-device-pixel-ratio:1.5){ .css{/* 高清显示屏(设备像素比例大于等于1.5)使用2倍图 */ background-image: url(img_2x.png); } }
The server uses nginx to process the image
Cut the image of whatever size you want, we provide proportional scaling and custom size The cutting method is just to concatenate the string after the address.
The differences and characteristics of cookies, localStorage and SessionStorage
1. LocalStorage characteristics:
只保留在客户端 本地永久存储,关闭浏览器不会清除,除非用户从浏览器清除 每个域可以最多存储5MB
2. SessionStorage characteristics:
只保留在客户端 本地临时存储,在页面会话结束时会被清除 存储大小与localStorage相同
3. Cookie characteristics:
服务端和客户端都可以访问 可以设置有效期,过期后将会自动删除。如果不设置则是关闭浏览器后失效 存储大小只有4kb 有存储个数限制。每个浏览器限制不一样。建议20个以内。最多的浏览器可以支持50个
Related recommendations: html tutorial
The above is the detailed content of What are the knowledge points that must be mastered in HTML?. For more information, please follow other related articles on the PHP Chinese website!

To build a website with powerful functions and good user experience, HTML alone is not enough. The following technology is also required: JavaScript gives web page dynamic and interactiveness, and real-time changes are achieved by operating DOM. CSS is responsible for the style and layout of the web page to improve aesthetics and user experience. Modern frameworks and libraries such as React, Vue.js and Angular improve development efficiency and code organization structure.

Boolean attributes are special attributes in HTML that are activated without a value. 1. The Boolean attribute controls the behavior of the element by whether it exists or not, such as disabled disable the input box. 2.Their working principle is to change element behavior according to the existence of attributes when the browser parses. 3. The basic usage is to directly add attributes, and the advanced usage can be dynamically controlled through JavaScript. 4. Common mistakes are mistakenly thinking that values need to be set, and the correct writing method should be concise. 5. The best practice is to keep the code concise and use Boolean properties reasonably to optimize web page performance and user experience.

HTML code can be cleaner with online validators, integrated tools and automated processes. 1) Use W3CMarkupValidationService to verify HTML code online. 2) Install and configure HTMLHint extension in VisualStudioCode for real-time verification. 3) Use HTMLTidy to automatically verify and clean HTML files in the construction process.

HTML, CSS and JavaScript are the core technologies for building modern web pages: 1. HTML defines the web page structure, 2. CSS is responsible for the appearance of the web page, 3. JavaScript provides web page dynamics and interactivity, and they work together to create a website with a good user experience.

The function of HTML is to define the structure and content of a web page, and its purpose is to provide a standardized way to display information. 1) HTML organizes various parts of the web page through tags and attributes, such as titles and paragraphs. 2) It supports the separation of content and performance and improves maintenance efficiency. 3) HTML is extensible, allowing custom tags to enhance SEO.

The future trends of HTML are semantics and web components, the future trends of CSS are CSS-in-JS and CSSHoudini, and the future trends of JavaScript are WebAssembly and Serverless. 1. HTML semantics improve accessibility and SEO effects, and Web components improve development efficiency, but attention should be paid to browser compatibility. 2. CSS-in-JS enhances style management flexibility but may increase file size. CSSHoudini allows direct operation of CSS rendering. 3.WebAssembly optimizes browser application performance but has a steep learning curve, and Serverless simplifies development but requires optimization of cold start problems.

The roles of HTML, CSS and JavaScript in web development are: 1. HTML defines the web page structure, 2. CSS controls the web page style, and 3. JavaScript adds dynamic behavior. Together, they build the framework, aesthetics and interactivity of modern websites.

The future of HTML is full of infinite possibilities. 1) New features and standards will include more semantic tags and the popularity of WebComponents. 2) The web design trend will continue to develop towards responsive and accessible design. 3) Performance optimization will improve the user experience through responsive image loading and lazy loading technologies.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

SublimeText3 Chinese version
Chinese version, very easy to use

Notepad++7.3.1
Easy-to-use and free code editor
