Id attribute
type out: "My Header" h2 using the id attribute with CSS and the background color is blue, the text is white, and the text is center
<!DOCTYPE html> <html> <head> <style> #myHeader { background-color: blue; color: white; text-align: center; } </style> </head> <body> <h2 id="myHeader">My Header</h2> </body> </html>
write out a bookmark with adding a link from a different page. The link is html_demo.html and you need to jump to Chapter 4. no paragraph just write out the book mark link
<a href="html_demo.html"#C4">Jump to Chapter 4</a>
write out a bookmark using the id attribute. I want to jump to chapter 4 using h2
<h2 id="C4">Chapter 4</h2>
write out a bookmark using a link on the same page and the sentence will say "Jump to chapter 4"
<p><a href="#C4">Jump to Chapter 4</a></p>
what is the difference between class and ID
a class name can be used by multiple html elements while an id name must only be used by one html element within the page
can you have more than one element with the same id in an html document
no
what is the syntax for id
write a hash character # followed by the id name and css curly brackets