Sales tax is something you’re most likely obliged to pay to your local authorities for the sales you’re making. It’s usually a fixed rate for types of goods and services, i.e. in some countries food and essentials have lower rates and luxury items may be subject to higher sales tax rate.
How you apply sales tax is simple. Your initial selling price is something that’s called “net selling price” and that’s without the sales tax. You multiply the net selling price with the tax rate applied to this type of good or service, for an example if the rate is 18%, you multiply your net selling price with 1,18 and you reach to the “gross selling price”. Net in this case is without the tax and gross is with the tax, gross is what your customers pay to you, net is what you get.
The difference between gross and net, in this case 18%, is something that you are obliged to pay to your tax authorities.
The tax is not your revenue since according to International Accounting Standards for an example and most likely by your local accounting standards just as well revenue includes only economic benefits that are received and receivable by the entity on its own account. If you think about it, taxes are collected on behalf of a third party, in this case the authorities.