如果你非常精通HTML,看到这个标题,也许你会想起HTML4中的
HTML5中新增的这个是一个非常有用的标记,但很明显没有被web文档撰写者重视,特别是没有被科技文章编写者重视。为什么这样说呢?不知道你有没有这样的经历,哦,我记起了一篇有趣的文章,《Java程序员的堕落》,强烈推荐你去读一下,但我要说的是,里面列举的那几百个奇怪的缩略词,你认识几个:
Core Java, J2EE, JSP, JDBC, Servlets, AJAX, XML, HTML, XSLT, Web Services, CSS, JavaScript, SQL, Oracle 10g, MySQL 5.0., JMS,Eclipse, Adobe Flex Builder 3.x,UML, JDBC, SVN, JUnit, VSS, Jira, HTML, DHTML, CSS, AJAX, JavaScript, XML, MXML, Action Script, Servlet, JSP, JSTL, Hibernate 3.x, Spring 2.x, IBatis, SOAP, UDDI, WSDL, Apache Axis, Web logic Server 8.x, Apache Tomcat 5.0, Struts Framework, MVC, ANT, Maven. 复制代码
我想,如果你能全部解释这些缩略词中每个字母代表的意思,我想你竖起大拇指。我在阅读一些博客时,特别是科技、编程文章时,经常会遇到一些不懂代表什么意思的缩略词,而作者也没有给出任何提示。对很多刚入门的程序员,或很多外行人,我们应该以一种合适的方式让他们知道每个缩略词的意思。
对,方法就是使用标记。
abbr缩略词标记用法
abbr标记的用法跟其它所有的HTML标记用法非常相似。下面是一个例子:
<p>如今<abbr title="是指Model-View-Controller模式">MVC</abbr>模式越 来越被人们诟病,而使用 快速<abbr title="是create, read, update, delete四个词的首字母缩略">CRUD</abbr>生成开发 更是被一些著名程序员唾弃。</p>
把你的缩略词用标记包起来,然后在标记的title属性上指明这个缩略词是从哪几个词缩略而来的,或说明这个简写词的含义。
abbr缩略词标记的效果
这样写会有什么效果呢?能给读者带来哪些好处?下面我们可以来现场体验一下。
如今MVC越来越被更多的人诟病,而使用快速CRUD生成开发更是被一些著名程序员唾弃。
你会看到,缩略词下面是有小点的,而且,将你的鼠标移动到缩略词上,会看到提示,提示信息就是标记上title属性里填写的缩略词解释。太方便了。不是吗。
abbr缩略词标记的美化
如果你使用的是火狐浏览,这种下带小点的装饰是系统自带的。但如果你使用的是谷歌浏览器或IE,这看不到这些小点。你需要在CSS样式表里添加下面一小段样式规则:
abbr[title], acronym[title] { border-bottom: 1px dotted; } 复制代码
当然,你也可以修改成更漂亮的样式,比如用红色的下划线。
页面友好性是一个Web应用或web页面成功的重要指标,作为一个Web程序员,我们应该处处注意像缩略词这样的标记在网页中所起的作用,只有当用户感觉到方便时,我们开发出的东西才真正体现出它的价值。
以上就是HTML5中缩略词标记的重要作用的内容,更多相关内容请关注PHP中文网(www.php.cn)!

MicrodatainHTML5enhancesSEOanduserexperiencebyprovidingstructureddatatosearchengines.1)Useitemscope,itemtype,anditempropattributestomarkupcontentlikeproductsorevents.2)TestmicrodatawithtoolslikeGoogle'sStructuredDataTestingTool.3)ConsiderusingJSON-LD

HTML5introducesnewinputtypesthatenhanceuserexperience,simplifydevelopment,andimproveaccessibility.1)automaticallyvalidatesemailformat.2)optimizesformobilewithanumerickeypad.3)andsimplifydateandtimeinputs,reducingtheneedforcustomsolutions.

H5 is HTML5, the fifth version of HTML. HTML5 improves the expressiveness and interactivity of web pages, introduces new features such as semantic tags, multimedia support, offline storage and Canvas drawing, and promotes the development of Web technology.

Accessibility and compliance with network standards are essential to the website. 1) Accessibility ensures that all users have equal access to the website, 2) Network standards follow to improve accessibility and consistency of the website, 3) Accessibility requires the use of semantic HTML, keyboard navigation, color contrast and alternative text, 4) Following these principles is not only a moral and legal requirement, but also amplifying user base.

The H5 tag in HTML is a fifth-level title that is used to tag smaller titles or sub-titles. 1) The H5 tag helps refine content hierarchy and improve readability and SEO. 2) Combined with CSS, you can customize the style to enhance the visual effect. 3) Use H5 tags reasonably to avoid abuse and ensure the logical content structure.

The methods of building a website in HTML5 include: 1. Use semantic tags to define the web page structure, such as, , etc.; 2. Embed multimedia content, use and tags; 3. Apply advanced functions such as form verification and local storage. Through these steps, you can create a modern web page with clear structure and rich features.

A reasonable H5 code structure allows the page to stand out among a lot of content. 1) Use semantic labels such as, etc. to organize content to make the structure clear. 2) Control the rendering effect of pages on different devices through CSS layout such as Flexbox or Grid. 3) Implement responsive design to ensure that the page adapts to different screen sizes.

The main differences between HTML5 (H5) and older versions of HTML include: 1) H5 introduces semantic tags, 2) supports multimedia content, and 3) provides offline storage functions. H5 enhances the functionality and expressiveness of web pages through new tags and APIs, such as and tags, improving user experience and SEO effects, but need to pay attention to compatibility issues.


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

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

SublimeText3 Chinese version
Chinese version, very easy to use
