Id attribute

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

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


Ensembles d'études connexes

MT5 (Momentum and its Conservation)

View Set

OChem Chapter 17: Carbonyl Compounds, Chapter 17

View Set

Fashion Business Practices Exam #2: Chapters 5, 6, 7, 9, 10

View Set

Ch. 1 - Collecting and Analyzing Data

View Set

a vindication of the rights of women by mary wollstonecraft

View Set

New Nations in South Asia and Southeast Asia

View Set

BUS 360: Chapter 3: Digital Marketing: Online, Social, and Mobile

View Set