Suppose we have below two files that we want to compare inside VSCode.
Open file explorer as shown in the image below.
right click on the file you want to compare → click
Select for Compare
In this step, we will select the file with which we want the comparison.
right click on the file → click
Compare with Selected
VSCode display highlights the differences between two files as we can see in the screenshot below.
Tip: If you are on OSX you can navigate to directory and type command diff index.html index-old.html