Trams
Trams are the most frequent form of public transport in Vienna and the tram system dates back to the 1800s. I should point out that one or two upgrades have taken place, since.
The entire city is criscrossed by tramlines, whereby most go to and from the city center (like spokes on a wheel) and fewer go across town. Each tramline is powered by overhead electric cables, and has a number or letter designation. Most lines run from the early morning until after midnight, with special night trams also in operation on selected lines.

The 10. © Mark Brownlow
There are no special rules of the road for using them, other than to note that seats marked with colored symbols for the old, the handicapped, pregnant women or young mothers should be kept free for the same. As you approach your stop, you should press the exit button on any door to warn the driver.
In reality, there’s always someone waiting so the tram will likely stop anyway, but you need to press the button to get the door to open when you do stop.

Modern tram. © Mark Brownlow
If you’re driving, remember that the trams are the kings of the road. Don’t block a tramline unless you really must - they don’t take kindly to unnecessary delays and are bigger than you.
Most importantly, if you’re driving alongside a tram and it’s nearing a stop, you must slow down and stop, too, even if the road ahead is clear. You can only pass a tram at or near a stop if there are no people around and if you go at crawling pace.