Home  >  Article  >  Web Front-end  >  Introduction to 5 cool and practical HTML tags and attributes_HTML/Xhtml_Webpage Production

Introduction to 5 cool and practical HTML tags and attributes_HTML/Xhtml_Webpage Production

WBOY
WBOYOriginal
2016-05-16 16:37:131415browse

Actually, this is also a headline, and it cannot be said to be "dazzling". It's just because I am ignorant and have never seen these labels. These features are not very common on normal websites, so it feels very fresh to me. Then I will create a series to record all the good HTML tags I have encountered (maybe HTML5 tags, there is no guarantee that all browsers will be compatible).

1. contenteditable

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




Tip: You can modify part of the code before running


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

2. fieldset tag

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



Tip: You can modify part of the code before running

The

legend tag specifies the title of this BOX.

3. area tag

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


Planets

Sun Mercury Venus
Tip: You can modify part of the code before running

4. output标签

这个标签能够直接显示脚本的运算结果(注意:目前IE的任何版本都不支持),以下脚本似乎不工作,可能是因为WP的原因所致:



提示:您可以先修改部分代码再运行

5. mark标签

直接能够高亮一段文字,不需要把文字拆开即可实现:



提示:您可以先修改部分代码再运行

今天先到这吧,以后看到好的HTML标签和特效再贴上来。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn