There is a big difference between
- taking the tablespace offline or
- taking the datafiles offline

1:
ALTER TABLESPACE ... OFFLINE

1- does a checkpoint on the datafiles
2- takes the datafiles offline

1:
ALTER DATABASE DATAFILE ... OFFLINE

does not perform a checkpoint, so that if the database is open, you may need to perform media recovery when bringing it online.

That is the reason why:
- you cannot do 'alter database datafile ... offline' if you are in noarchivelog (but tablespace offline works)
- you cannot do 'alter tablespace ... offline' if database is read-only (but datafile offline works)

Note that in both cases, you can check the STATUS column from v$datafile to see if the file is online, offline or needs recovery.