5 cool and practical HTML tags and attributes introduction

5 cool and practical HTML tags and attributes introduction

In fact, this is also a clickbait title, and it cannot be said to be "showy". It's just that I am ignorant and have never seen these labels. These features are not very common on regular websites, so I feel they are quite fresh. Then I will make a series to record all the good HTML tags I encounter (they may be HTML5 tags, and there is no guarantee that all browsers are compatible).

1. contenteditable

This is a new tag added in HTML5, which can make the content of an area editable, such as the table below: (table in IE does not seem to support this attribute, but div and body seem to support it. If you use IE, please try to click on the $100 and $50 parts to edit them. I added the contenteditable tag in these two boxes. If you are not using IE, all the content should be editable)


Tip: You can modify some of the code before running


Note that this table is directly editable. We can change the text directly without adding any text boxes. If the sub-tag does not specify this attribute, it is inherited by default, so it is very convenient. (Of course, if you add this property to the body, everything will be editable, which is terrible...)

2. Fieldset tag

This thing is equivalent to the GroupBox in .NET, but I didn't know it before. Its function is to group related elements in the form:


Tip: You can modify some of the code before running

The legend tag specifies the title of this BOX.

3. Area tag

A hyperlink can be placed directly in a specific area on the picture! Use the map tag and the usemap attribute of img (note that after clicking on the image, remember to return to other pages ^_^):


Tip: You can modify some of the code before running

4. Output tag

This tag can directly display the result of the script (note: currently not supported by any version of IE). The following script does not seem to work, probably because of WP:


Tip: You can modify some of the code before running

5. Mark tag

You can directly highlight a piece of text without breaking it up:


Tip: You can modify some of the code before running

That’s all for today. I’ll post more good HTML tags and special effects later.

<<:  The process of installing MySQL 8.0.26 on CentOS7

>>:  Summary of CSS usage tips

Recommend

When to use Map instead of plain JS objects

Table of contents 1. Map accepts any type of key ...

HTML5+CSS3 header creation example and update

Last time, we came up with two header layouts, on...

Detailed explanation of Vue3 sandbox mechanism

Table of contents Preface Browser compiled versio...

Vue's global watermark implementation example

Table of contents 1. Create a watermark Js file 2...

Advantages of MySQL covering indexes

A common suggestion is to create indexes for WHER...

10 reasons why Linux is becoming more and more popular

Linux has been loved by more and more users. Why ...

Perfect solution for vertical centering of form elements

Copy code The code is as follows: <!DOCTYPE ht...

Tutorial on using Docker Compose to build Confluence

This article uses the "Attribution 4.0 Inter...

jQuery plugin to implement dashboard

The jquery plug-in implements the dashboard for y...

Detailed explanation of several examples of insert and batch statements in MySQL

Table of contents Preface 1.insert ignore into 2....

Comprehensive understanding of html.css overflow

Comprehensive understanding of html.css overflow ...

Implementation steps for installing RocketMQ in docker

Table of contents 1. Retrieve the image 2. Create...

jQuery implements simple button color change

In HTML and CSS, we want to set the color of a bu...