I believe the support page does include the 2013 iMac. The range of "iMac (Mid 2011-Mid 2014)" reads to me as iMac (Mid 2011 to Mid 2014) which would include 2013.
View attachment 819044
I do not think that HDMI would work, otherwise Apple would probably have listed it as an option in the support document. I currently do not have a iMac capable of supporting Target Display so I can not test it and can only go by the Apple Support information.