Hi! normally the value "btn" is for creating button when it's in an attribute like class right ? i found it in <a> element which is a link nothing relate to button!


“btn” is the name given to that class attribute.

When you name a class, it should be descriptive so you understand what its purpose is. So even though it is an anchor tag <a> it’s serving as a clickable “button”. The extra part that may be missing, is to style it with CSS to look like a button rather than just an underlined link.


thanks for your response i got this point. don’t mind if my question sound stupid, i’am just a beginner :sweat_smile: but when you write your code normally you should understand it because of knowing beforehand the semantic or the syntax of the language, but i think the main purpose is that the server understand and interprete it well, or other developper who consult it understand isn’t it ? and can “btn” here be replace by another class or attribute render the same result ?

Correct, “btn” could be replaced with any word you think is best. But understand that you can add more than one class. So that anchor tag could be written like this too <a class="btn learn-more-btn"></a>
More than one class is separated by a space.

Now I can apply general CSS rules to “btn” and more specific rules to “learn-more-btn”.

Hopefully that doesn’t confuse.

1 Like

no way, it’s perfect, i got it.
thank you