Share some unpopular knowledge about html5
HTML is the unified language of the Web. These rough tags contained in angle brackets constitute today's Web. In 1991, Tim Berners-Lee wrote a document called "HTML Tags", which includes about 20 HTML tags used to mark web pages. He directly borrowed the markup style of SGML, which is the HTML markup style we saw later.
Today, the editor of Huwu will sort out the html5 cold knowledge that you may not know.
Run the browser address barJavaScriptCode
Many people should still know this. You can run JavaScript code directly in the browser address bar. The method is to start with javascript: followed by execution statement. For example:
Chr Ome will automatically remove the javascript: at the beginning of the code, so it needs to be added manually for correct execution. Although Firefox will not automatically remove it, it does not support running JS code in the address bar at all! !
Run HTML code in the browser address barIf more people know the little secret above, fewer people know this tip. In non-IE core browsers The address bar can run HTML code directly!
Editor Still making a fuss on the browser address bar, paste the following code into the address bar and run it, and the browser will become a primitive and simple editor, just like the notepad that comes with Windows, roar Roar.
attribute, when the element is specified with this attribute, the content of the element becomes editablestate.
By extension, after putting the following code into the console and executing it, the entire page will become editable!
##Use a tag to automatically parse URL
query
keywords,variablesparameter values, etc., but we never expected that the browser can easily help We accomplish this task without writing regular code to capture it. The method is to first create an a tag in the JS code and then assign the URL that needs to be parsed to the href attribute of a, and then we get everything we want.
As shown below:
Use the above method to Browser parameters to operate!
Elements with IDs on the page will create global variables
In an HTML page, all elements with ID attributes set will create corresponding global variables in the JavaScript execution environment, which means document.getElementById is as redundant as the human appendix. But in actual projects, it’s best to just write it honestly. After all, the chance of things going wrong with regular code is much smaller.
As shown below:
When loading the CDN file, You can omit the HTTP identifier
Nowadays, the popular CDN loads some common JS and CSS files from a dedicated server. For security considerations, some CDN servers use HTTPS to connect, while others use traditional HTTP, in fact, we can ignore this when using it and omit it from the URL.
Use the script tag to save any information
Set the script tag to type='text' and then you can save any information in it, and then you can Easily available in JavaScript code.
Of course, there are far more trivia than these.
【Related recommendations】
1. Free h5 online video tutorial
3. php.cn original html5 video tutorial
The above is the detailed content of Share some unpopular knowledge about html5. For more information, please follow other related articles on the PHP Chinese website!

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

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

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

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

Hot Topics



Guide to Table Border in HTML. Here we discuss multiple ways for defining table-border with examples of the Table Border in HTML.

This is a guide to Nested Table in HTML. Here we discuss how to create a table within the table along with the respective examples.

Guide to HTML margin-left. Here we discuss a brief overview on HTML margin-left and its Examples along with its Code Implementation.

Guide to HTML Table Layout. Here we discuss the Values of HTML Table Layout along with the examples and outputs n detail.

Guide to HTML Input Placeholder. Here we discuss the Examples of HTML Input Placeholder along with the codes and outputs.

Guide to Moving Text in HTML. Here we discuss an introduction, how marquee tag work with syntax and examples to implement.

Guide to the HTML Ordered List. Here we also discuss introduction of HTML Ordered list and types along with their example respectively

Guide to HTML onclick Button. Here we discuss their introduction, working, examples and onclick Event in various events respectively.
