Danish tax legislation applies whether you sell a non-Danish or a Danish home - both in relation to deciding if you can sell the property without being taxed and to calculating a possible taxable profit.
If you have used the home entirely or partly for private purposes, you will not be taxed in Denmark on a possible profit. But if you have used the property solely for rental purposes, you will be taxed in Denmark on a possible profit. However, you will be entitled to a tax relief, if you have already paid non-Danish tax on the profit of the sale.