I am not a native speaker of English so I get confused when writing since there are sometimes two different spellings of words in English — by which I mean an American spelling and a British spelling.
Are there specific situations where one spelling is recommended over the other?
I’m from the UK, but will use US spellings in some contexts. Programming languages generally use US spellings, the HTML
center tag or the CSS
color property for example, and it can be a bit jarring to write stuff like “use
color to set the colour”. Another issue is that spell checkers are always either US or UK, so you end up with loads of red lines on correct spellings if you use a UK spellchecker to discuss code.
Generally speaking, you can use either UK or US spellings, even when addressing one or the other audience (I’ve never known anyone that objected); just be consistent.