Open In App

How to access an HTML document in a browser ?

HTML represents Hypertext Markup Language and is web – based scripting language. Its primary object is to make and design website pages. Records with the HTML (or HTM) augmentation just hold back text and references to different documents, similar to pictures or video.

How to access an HTML file in the browser:



    file:///C:/Users/VOSTRO/Desktop/GeekforGeeks/fav1.html

Example:




<!DOCTYPE html>
<html>
<head>
    <style>
        body {
            background-color: powderblue;
        }
        h1 {
            color: blue;
        }
        p {
            color: red;
        }
    </style>
</head>
<body>
    <h1>This is a heading</h1>
      
<p>This is a paragraph.</p>
  
</body>
</html>

Method 1: The file must be saved in .html format.



 

 

Method 2: Drag and Drop the HTML file to the Default Browser.

 

Method 3: Access an HTML File in a Browser using Notepad++

Step1: Open Notepad++ write a HTML code and save the file in HTML format.

 

Step2:

Example (If it is chrome browser)

 "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
then Add this String to browser path  "$(FULL_CURRENT_PATH)"

 The path is:

 "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"   "$(FULL_CURRENT_PATH)"

 


Article Tags :