Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the semantic inline elements in HTML5

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly shows you "what are the semantic inline elements in HTML5". The content is simple and clear. I hope it can help you solve your doubts. Let the editor lead you to study and learn this article "what are the semantic inline elements in HTML5".

HTML4 uses five different inline elements to represent slightly different computer code: var, code, kbd, tt, and samp. However, it cannot represent basic values such as time, numbers, and so on. HTML5 provides several new inline elements to meet the needs of non-technical authors.

M

The m element indicates that the text is "marked", but it doesn't have to be emphasized. Think of it as a highlighted section in the book. The cache page of Google is a typical use case. If you link to a cached copy, the search term is flagged. For example, if you search for "Egret", the cached Google page might look like this:

TheGreatEgret (alsoknownasthe

AmericanEgret) isalargewhitewadingbirdfoundworldwide.

TheGreatEgretflieswithslowwingbeats.The

ScientificnameoftheGreatEgretisCasmerodius

Albus.

The name of this element is currently controversial. Before the specification is released, it may be changed from m to mark.

Time

The time element represents a time value, such as 5vv 35P.M. For example:

Iamwritingthisexampleat

5:35P.M.onApril23rd.

The time element can help browsers and other programs recognize the time in the HTML page. It does not require any specific formatting to be applied to the content of the element. However, each time element should have a datetime attribute that contains a time value that is more suitable for machine recognition, such as:

Iamwritingthisexampleat

5:35P.M.onApril23rd.

Time values suitable for machine reading may be helpful for search engines, calendar programs, and so on.

Meter

The meter element represents a numeric value within the specified range. For example, it can be used to represent salary, the percentage of French voters who voted for LePen, or test scores. Here, I use meter to mark the data provided by a Google programmer on SoftwareDevelopment2007:

AnentrylevelprogrammerinSiliconValley

Canexpecttostartaround$90000peryear.

The meter element helps browsers and other clients identify the quantity in the HTML page. It does not require any specific formatting to be applied to the content of the element. However, each meter element can have up to six attributes, which represent this number in a form that is more suitable for machine recognition:

Value

Min

Low

High

Max

Optimum

All of these attributes should contain a decimal number. For example, the score for the final exam can be written as follows:

Yourscorewas

B.

This means that the student's score is 88.7 in the percentile system. The lowest possible score is 0, but the actual minimum score is 65. The highest possible score is 100, but the actual highest score is 96. The user agent can display this information with some kind of numeric control, or it can display additional data in a tooltip, but perhaps the most common case is to apply styles to it like other inline elements.

Progress

The progress element represents the status of a process in progress, like a progress bar in a graphical user interface (GUI) application. For example, you can use it to represent the percentage of a file that has been downloaded or the current location when the movie is played. The following progress control indicates that the download is 33% complete:

Downloaded:

33%

The value attribute represents the current state of the operation. The max attribute represents the total amount of operations. This element indicates that the total amount of data to be downloaded is 4603807 bytes, and 1534602 bytes have been downloaded.

Omit the max property and you can show unlimited progress.

The progress bar should be updated dynamically using the JavaScript language as the operation progresses. In a static case, this element doesn't make much sense.

The above is all the content of the article "what are the semantic inline elements in HTML5". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report