Id element (don't know what I did wrong)


The instruction told me to change the color and font of h2 with id element. So I wrote it like how I attached it below. But nothing changed. Did I make a mistake or wrote something wrong?

	<h2 id="intro">

#intro {
    color: #B83C3A;
    font-family: Cursive;


Its due to this. I am not sure why you wrapped a h2 tag around another h2 tag but it complicates things. Simplify it so it looks like this.

	<h2 id="intro">Introduction</h2>


The top half of the code looks like this.
So if I want to add an "id" element to "h2", then what should I type?

<!DOCTYPE html>
		<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
	<div class="standout">
		<h3>Classes and IDs in CSS</h3>

Do I still write <h2 id="intro">Introduction</h2> ?


Yeah you need to add id="intro" to the above. Making it <h2 id="intro">Introduction</h2>.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.