Challenge: Query and Select DOM Elements
メニューを表示するにはスワイプしてください
Task
You have a shopping list in your HTML, and you need to select specific elements using various DOM querying methods.
- Select by ID: Select the
<h1>element with the IDtitle; - Select by Class: Select all elements with the class
item; - Select by Tag: Select all
<li>elements; - Select the First Matching Element: Select the first
<li>element with the classitem; - Select All Matching Elements: Select all
<li>elements with the classitem.
index.html
index.css
index.js
- Use
getElementByIdto select the<h1>element with the IDtitle; - Use
getElementsByClassNameto select all elements with the classitem; - Use
getElementsByTagNameto select all<li>elements; - Use
querySelectorto select the first<li>element with the classitem; - Use
querySelectorAllto select all<li>elements with the classitem.
index.html
index.css
index.js
すべて明確でしたか?
フィードバックありがとうございます!
セクション 2. 章 3
AIに質問する
AIに質問する
何でも質問するか、提案された質問の1つを試してチャットを始めてください
セクション 2. 章 3