Home > Web Front-end > H5 Tutorial > body text

Structure and semantics of HTML5 (4): Semantic inline elements_html5 tutorial skills

WBOY
Release: 2016-05-16 15:51:48
Original
1303 people have browsed it

HTML4 uses 5 different inline elements to represent slightly different computer codes: var, code, kbd, tt, and samp. However, it cannot represent basic values ​​such as time and numbers. HTML5 provides several new inline elements to meet the needs of non-technical writers.
m
The m element indicates that the text is "marked", but does not necessarily need to be emphasized. Think of it like a highlighted section in a book. Google's cached pages are a typical use case. If linking to a cached copy, the search term is flagged. For example, if you search for "Egret", a cached Google page might look like this:
TheGreatEgret(also known as the
AmericanEgret)isalargewhitewadingbirdfoundworldwide.
TheGreatEgretflieswithslowwingbeats.
Casmerodiusalbus. There is currently controversy over the name of this element. It may be changed from m to mark before the specification is released.
time

The time element represents a time value, such as 5:35P.M., EST, April 23, 2007. For example: Iamwritingthisexampleat

5:35P.M.onApril23rd

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

Iamwritingthisexampleat

5:35P.M.onApril23rd

.
A machine-readable time value may be useful for search engines, calendar programs, etc.

meter

 The meter element represents a numeric value within the specified range. For example, it could be used to represent salaries, the percentage of French voters who voted for LePen, or test scores. Here, I use meter to plot data provided by a Google programmer on Software Development 2007: AnentrylevelprogrammerinSiliconValley
canexpecttostartaround
$90,000

peryear.
The meter element helps browsers and other clients identify quantities in HTML pages. It does not require any specific formatting to be applied to the element content. However, each meter element can have up to 6 attributes, which represent this quantity in a form more suitable for machine recognition: 🎜>These attributes should all 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 on the hundred point scale. The lowest possible score is 0, but the actual lowest score is 65. The maximum possible score is 100, but the actual maximum 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 probably the most common case is to style it like any other inline element.

progress

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



The value attribute represents the current status of the operation. The max attribute indicates the total amount of operations. This element indicates that the total amount of data to be downloaded is 4,603,807 bytes and 1,534,602 bytes have been downloaded. Ignore the max attribute to display infinite progress.
When the operation is in progress, JavaScript language should be used to dynamically update the progress bar. In a static case, this element has little meaning.
 

 (To be continued)

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template