Search code examples
htmladobe-brackets

Brackets code editor doesn't let me close h1 class


I apologise in advance if I'm missing something very obvious. I'm just getting started on web development.

I'm using Brackets and I'm trying to apply a class to h1 using this code:

<h1 class="floatright">A Message from the Chief</h1>

The problem is, when I type the closing " in floatright, the rest of the code (basically the rest of the body) flags up in red. However, if I leave it as

 <h1 class="floatright><h1>A Message from the Chief</h1>

Brackets seems to think it's ok. I've attached two screenshots for more details. Am I missing something very obvious here?

http://i.imgur.com/NRofnAq.jpg

And:

https://i.sstatic.net/RlRvQ.jpg


Solution

  • You are missing the closing " in your style attribute on line 70.

    A good clue there is to see where the red starts, then work forward carefully from there.