Using the File API, which was added to the DOM in HTML5, it's now possible for web content to ask the user to select local files and then read the contents of those files. This selection can be done by either using an HTML input type="file" element or by drag and drop. Jan 08, 2018 · Now, that line of text that we wrote is working because we saved the file as an HTML file that your browser can recognize. But for real HTML on the internet, we need to add some more tags to the file in order for everything to work properly. Doctype and HTML tags. The very first tag you need is the doctype tag. For example, if the original file was letter.txt, save the edited version as letter.html. If you are a Kermit user, you can find a script to convert plain text to HTML HERE . If the text contains lists, tables, or other structures, read on. Usually we keep all the images in a separate directory. So let's keep HTML file test.htm in our home directory and create a subdirectory images inside the home directory where we will keep our image test.png. Example. Assuming our image location is "image/test.png", try the following example − External JavaScript file. We can create external JavaScript file and embed it in many html page. It provides code re usability because single JavaScript file can be used in several html pages. An external JavaScript file must be saved by .js extension. It is recommended to embed all JavaScript files into a single file. Rules defined in internal style sheet overrides the rules defined in an external CSS file. Example. Let's re-write above example once again, but here we will write style sheet rules in the same HTML document using