Skip to Content
MOBILE HTML5學習手冊
book

MOBILE HTML5學習手冊

by Estelle Weyl
June 2014
Intermediate to advanced
488 pages
9h 56m
Chinese
GoTop Information, Inc.
Content preview from MOBILE HTML5學習手冊
26
|
第二章
有一些屬性幾乎可讓所有 HTML 元素使用—包括核心或全域的屬性,以及國際化
internationalization)的屬性(於下一節討論),有一些屬性屬於某些元素,我們會在
第三章討論它們。
全域與國際化屬性
HTML5 加入一些幾乎可套用到所有元素的國際化及核心屬性。
id
class
title
style
lang
,與
dir
屬性仍然可支援所有元素。HTML5 的核心屬性加入了
accesskey
hidden
tabindex
以及五種推薦的互動屬性:
contenteditable
contextmenu
spellcheck
draggable
dropzone
。接下來將會討論這些屬性。
除了全域屬性之外,所有元素都可以使用 microdata(微資料)屬性、WIA-ARIA 角色
aria-
屬性,以及自訂資料屬性,它們的寫法是
data-*
,其中的
*
由你建立,是你自
創的屬性。HTML5 加入了
data-
前置詞來讓開發人員建立不會與未來版的 HTML 衝突
的屬性。第 33 頁將會討論
data-*
屬性。microdata ARIA 存取屬性會在第六章討論。
id
id
屬性是獨一無二的識別符。在同一個文件中,不能有兩個元素擁有同樣的
id
,而且元
素最多只能有一個
id
。在 HTML5
id
值必須至少有一個字元,而且不能有空格。這與
之前的版本不同,在之前的版本中,
id
值必須以 A-Z a-z 的字母開頭,之後可有字母
A-Za-z)、數字(0-9)、連字號(-)、底線( ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

JAVASCRIPT網頁應用程式設計

JAVASCRIPT網頁應用程式設計

Alex MacCaw

Publisher Resources

ISBN: 9789863471240