Www.codecademy.com/courses/learn-css

What does class=btn do?

3 Likes

Could you provide a link? Well without a link:

It uses a css rule on it if there is a rule.
Class-es and Id-s are selectors that css uses. In css you can Etc. resize the button or change its color.
But what you wrote isn’t correct, selector’s names must be in a quote.
For example here is some html:

<h1>Hello</h1>

This is just a heading but if we add a class or id that looks like

Hello


But if we add a selecto(id)r:
<h1 id="hello">Hello</h1>

and some css(id selector):

#hello {
  color: green;
}

It looks like this:
image
So do you know what id and class does now?

5 Likes

The . btn classes are designed to be used with the < button > element. However, you can also use these classes on <a> or <input> elements (though some browsers may apply a slightly different rendering).

This is some of the best work I can do without the code.

I hope this helps =)

*If this doesn’t help, please let me know!

3 Likes

As @trevorhodges wrote but it can be with every html tag but pairing it to other tags whould make the code confusing to others. :grinning:

3 Likes

Thank you for clarifying that @lolfail! :slightly_smiling_face:

3 Likes

Thanks, it has clarified a lot

2 Likes

Your welcome @oreva20! :slightly_smiling_face:

2 Likes

Well, it can be easiet used with button tags, and most commonly used with them.

2 Likes

Yes. I haven’t seen any without a button tag on personally.

3 Likes