Hi, I'm Bhavik. Welcome to JustAnswer. I'm reviewing your question now, and will reply back ASAP.
In which programing language this codes needs to be written ?
Hey there, my name is***** you still need this done?
There's already a tool out there that will do this. It's called a Web browser.
Oh, by the '>>>' I presume you want a Python function. You might have specified that.
"Type is: html" is expecting WAY too much--unless that's just a boneheaded "check the suffix and report that as the 'file type' in absence of contradictory data." Of course, I could have a JPG file that is NAMED such-and-such dot cpp, for example. Did you want to DETECT FILE FORMATS or just recognize suffixes?