0

id attribute is not working in <div> tag. ex:<div id="intro">

Hi šŸ‘‹ I am learning CSS. In class 3.1. id and class selectors. This id attribute is not working in <div> tag. ex:<div id="intro">. Is it like this? Please help me. Thank you.

28th Jun 2022, 9:30 PM
Dhanya Raj Ravi
Dhanya Raj Ravi - avatar
3 Answers
+ 2
Cant find this lection, but your code looks fine. To add id to element you type it as name="value" inside opening tag of element like <div class="container"></div> same is for id, or any other
28th Jun 2022, 9:41 PM
PanicS
PanicS - avatar
+ 2
Also in html with that id intro in css you would label that as #intro and class=ā€œintroā€ is another way which would be labeled as .intro
29th Jun 2022, 4:00 PM
Junior
Junior - avatar
0
Thank you ā¤ļø
29th Jun 2022, 12:39 AM
Dhanya Raj Ravi
Dhanya Raj Ravi - avatar