Writing proper is a correspondence between marks and sounds to represent speech.
Early Sumerian symbols depicting kinds of goods (wheat, sheep, beer, etc.), and marks next to these to indicate quantities, are classed as proto-writing.
There's also more general use of symbols to represent ideas or groups, like a cross representing Jesus or Christianity, for example, which aren't classed as writing
> Writing proper is a correspondence between marks and sounds to represent speech.
I don't think this is the proper definition, since by this standard, Egyptian hieroglyphs, Chinese ideograms, Norse runes and many others would not be considered writing; and any attempt to notate sign languages would not be writing by definition.
Instead, writing is a direct and consistent correspondence between marks and elements of human language (alphabets and abjads represent speech sounds, various ideographic systems represent semantics, you can have hybrids etc). This still makes sure that tallies or just general symbols or icons are not a form of writing, but it doesn't require any phonetic aspect to it either.
All true written languages are phonetic to some extent, even though they may not be alphabetical the way English is. Chinese characters have phonetic components indicating tone and pronunciation, Egyptian hieroglyphs are largely syllabic, Norse runes are alphabetic like English. In Chinese and Egyptian, there are purely non-phonetic symbols representing ideas (and other things like determinatives), but most have some kind of phonetic meaning (this is my understanding at least).
There's a spectrum of how phonetic a language is, where Finnish is on one end (sounds very closely align with spelling) and Chinese characters on the other, but all written languages are phonetic to some degree.
Yes, I would just add as clarification that from my learning of (Mandarin) Chinese, each character is unambiguously associated with a syllable (including tone), so if you know the syllable corresponding to the character, you should be able to read a sentence exactly (modulo occasional changes to the tones of some syllables to make it flow better). (If we defined "phonetic" to have that meaning then Chinese is actually very phonetic!)
The converse is not the case: Chinese is very homophonic so there are a lot of syllable (sounds) that have many different meanings and hence characters associated with them.
I should explain a little further what I mean: there are "pure" ideograms even in English, like the & and % characters. These unambiguously refer to the words "and" and "percent", but the way they're written gives no clue whatsoever to a reader on how they're pronounced. If you had gone your entire life reading and writing English but somehow never encountered them, the way they're written is entirely unhelpful. Emoji are an even more abstract example, that don't even correspond to any word at all, just usually indicating mood or something like that.
It's a common misconception that all Chinese characters are like that, but my understanding is that while there are many, many more ideograms in Chinese than English, something like 80% of the characters do in some way indicate pronunciation (even if it's just something like tone) or use the "rebus principle" or something like that. So again, it's a spectrum, but all writing systems are phonetic to some extent. Human's wouldn't be able to use it to communicate effectively otherwise.
I will say that I'm not a linguist, nor can I read or write a word of Mandarin Chinese, and will happily stand corrected. This is just what I've picked up from reading books about the history and development of writing.
Norse runes are just an alphabet. As long as your language uses the same set of sounds, you can write with them today.
People get confused about them because there's a tie-in with the old Germanic religions where they're used by the gods for divination, and the neopagans have adopted them for that purpose. But they're really just a set of alphabets optimized for carving into wood.
> writing is a ... correspondence between marks and elements of human language
Yes, this is what I had in mind by saying "speech", but you're right, the connection to language is the essential part, and sound just happens to be the paradigmatic medium of human language