I thought that in this case "det" would be more common to use, because the object you are talking about is not mentioned. If it had been like as followed in my example "den" would be correct: Der ligger en bok pø bordet. Den er rød. Now you know I am talking about the book and not about the table, because I used "den".
So moderaters why is "den" used in this case?
There's never any context on Duolingo. It's no different from some sentences starting with 'he' and some starting with 'she'. In real life there would be some context to let you know what the pronouns refer to. On Duolingo you are translating a sentence in isolation. They need to teach both 'den' and 'det' so sometimes they use one and sometimes the other.
Ok, but I was taught here that when you introduce a new noun and the noun is only mentioned later on in the text it is preferred to use "det" when you speak of "it". That has nothing to do with context, but is all about grammatical rules. I could be wrong however, don't get me wrong... I do not agree with you on that there is never any context on Duolingo. There are enough sentences like in my previous example.
Partially agree. If I pointed to a picture and asked a child what it shows, I might say "hva er det? Det er en mann."
But in this exercise, we can assume we already know what we are talking about (why would we talk about how something looks on the inside if we didn't even know what it was?). Then it really depends on the direction of the translation. If it's Norwegian-to-English, the incubators may decide to give us den/rød, which might mean we talk about a circle (en sirkel). They could just as well give det/rødt, and we could guess it was about a square (et kvadrat). The context is not given, but restricted by gender. But in the other direction, if they give it/red they must accept both solutions unless they give more context.
No it's not like that. "He" is obviously masculine, but "it" in that sentence doesn't have an obvious gender (actually, I thought that "it" always translated to det). If I'm asked to translate "it's red inside" from english, how do I decide whether to use det or den? Do I have to know (from context) whether the thing that "it" refers to is common or neuter?
What you're not getting is that den is obviously common and inanimate, det is obviously neuter and inanimate, han is obviously masculine and animate, and hun is obviously feminine and animate, in Norwegian. He is obviously masculine and animate, she is obviously feminine and animate, and it is obviously neuter and inanimate, in English. (Animacy has merged into gender in modern English.)
You then just use the correct pronoun for what you are referring to. You use context to determine which pronoun to use in Norwegian, just as you use it to determine which pronoun (he, it, they, or indeed I or you) to use in English.
You probably think that the he/she distinction amongst animates is natural, inevitable and not requiring context to determine. If you were Chinese, you would probably take the English sentence "it is red" and ask how you're supposed to know it's "it" instead of "he" or "she", because in Mandarin it's ta shi hongde. How are you supposed to know whether to use he, she or it if you don't know what or whom ta refers to?
Similarly, an Italian could complain about the word "hi" in English, saying "How am I supposed to know whether to use 'hi' or 'bye'? Just context?", because they are both ciao in Italian.