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

<PLEASE USE THIS TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/en/courses/web-beginner-en-WF0CF/2/4?curriculum_id=50579fb998b470000202dc8b#

<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>
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">
	<h2>Introduction</h2>
</h2>

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

<do not remove the three backticks above>

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>
1 Like

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>
<html>
	<head>
		<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
		<title>Result</title>
	</head>
	<body>
		<h2>Introduction</h2>
	<div class="standout">
		<h3>Classes and IDs in CSS</h3>
	</div>	
	

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.