Doubt on project 3 Controlling LED in both html and Javascript code

I couldn’t use A0 pin on analogWrite() function in case of html and at the same time can’t use pin value as A0 in singleButton function() in javascript too.
why I can’t use A0 Analog pin(configured GPIO Pin) in LED?
Even it has onboard ADC, finally getting digital output after that conversion?
Is there having any unique code or other circuit connection to control LED in A0 pin?
Please reply as soon as possible?

@ramanenvenki the way analogWrite works is different from analogRead. A0 is just an analog input, analogWrite() will work on pins 0, 1, 2, 3, 4.

The reason for this is analogWrite() works based using PWM(Pulse width modulation), check out this to learn more about PWM.