422,952 Members | 2,244 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 422,952 IT Pros & Developers. It's quick & easy.

Error: attribute name must be followed by an equals (=) sign and a value

P: 46
Hello

I am getting a green underline error in VS2017 with this line of code:

Expand|Select|Wrap|Line Numbers
  1. <a data-scroll class="btn btn-start animated fadeInUpBig" href="#services">Start now</a>
The underline is under 'data-scroll' with the following error: 'This attribute name must be followed by an equals (=) sign and a value. If the value is in quotation marks, the quotation marks must match'.

Isn't my line of code followed by an equals (=) sign with matching quotation marks?

Thank you.
4 Weeks Ago #1
Share this Question
Share on Google+
2 Replies


Rabbit
Expert Mod 10K+
P: 12,230
Isn't my line of code followed by an equals (=) sign with matching quotation marks?
Nope. It's followed by a different attribute, class.

Like the error message says, you need to follow it with the equals sign and a value.
<a data-scroll="some value" class="...
4 Weeks Ago #2

P: 46
Many thanks for that Rabbit!
2 Weeks Ago #3

Post your reply

Sign in to post your reply or Sign up for a free account.