I have,
fruits = [ apple, banana, pineapple, oranges]
htmlfile = open('home-page.html','w')
htmlfile.write("<html>\n")
htmlfile.write("<head>\n")
htmlfile.write("<title> Home </title>\n")
htmlfile.write("</head>\n")
htmlfile.write("<body>\n")
htmlfile.write("<h1> Fruit-properties </h1?\n")
htmlfile.write("<a href = " 'fruit+'.html"> '+fruit+'</a><br>\n")
htmlfile.write("</body>\n")
htmlfile.write("</html>\n")
htmlfile.write.close()
I have separate code to create fruit.html for each fruit and can't write here because it is part of big code that I am writing.
so basically everything works fine. but when I click on any link, it is opened in the same browser. Is there any way that I can write in python to open the link in different tab??
I can't make use of webbrowser
option of python, because it is a linked page to my home-page.
Can somebody help?