Font Awesome Icon FA Paper Plane

I am trying to add a Font Awesome Icon with FA Paper Plane to my code.
The class I am using keeps telling me I need to add it even though I already did. Here is my code. What am I doing wrong?

 <button type="submit"
          class= "btn btn-primary"
   <i class="fa fa-paper-plane"></i>
      </button>
      </form>
   </div>

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

Hi @shystr0518 !

Welcome to the forum!

It looks like you didn’t close out your opening button tag.

Also, did you import font awesome into your project?

I think that may be the problem. On other lessons, they said they had preloaded it. Do you have the link for it so I can add it? Thanks for responding

Is this a challenge?
If so, we need to challenge link so we know what you are working on.

Here are the cdn links for font-awesome.

You just need to choose which version you are working on.
If you are using the latest one, then that would be version 6.

If you want to learn more about font awesome icons, you can go straight to the site

They will show you how to add it to your project.

Here is the link:

https://www.freecodecamp.org/learn/front-end-development-libraries/bootstrap/style-text-inputs-as-form-controls

Once I fixed your syntax error with the button element, I was able to pass.

Were you able to solve it?

Also, in the future, I would suggest using the ask for help button in the challenge which provides your full code and challenge link.

That will also help you get more replies to your post because users will have all of the information to help you. :slight_smile:

I don’t understand what you mean by syntax error. Where is the error? In the I class ?

You didn’t close the starting <button> tag (missing >).

Never mind. I found the error. I left out a >.
Such is coding. :smirk:

1 Like