Hello friends Welcome to Gran💡Light. In this blog we will see How To Write A Basic Program In [Programming Language]
How to Write A Basic Program in HTML
HTML is a powerful coding language that can be used to create complex applications, but it’s also simple enough for beginners to learn. In this tutorial, we’ll show you how to write a basic program in HTML using the Notepad program.
Step 1: Create a New File
Open Notepad and create a new file. You can do this by selecting “File >New” from the menu bar. Name your file something descriptive like “basic-program.html” so you can easily recognize it later.
Step 2: Add HTML Tags
Next, add some HTML tags. HTML tags are used to define different elements of a web page, such as headings, paragraphs, and links. For this basic program, we’ll use the following tags:
- <html> - This tag marks the beginning of the HTML document.
- <head> - This tag marks the beginning of the head section of the document, which contains information about the page.
- <title> - This tag contains the title of the page.
- </title> - This tag marks the end of the title section.
- </head> - This tag marks the end of the head section.
- <body> - This tag marks the beginning of the body section, which contains all of the visible content on the page.
- <p> - This tag defines a paragraph.
- </p> - This tag marks the end of a paragraph.
- </body> - This tag marks the end of the body section.
- </html> - This tag marks the end of the HTML document.
Save the file when you’re finished.
Step 3: Add Content
Now you’re ready to add some content to the page. Between the <body> tags, add a heading and a few paragraphs with some text. Here’s an example:
<h1>Welcome to My Page</h1> <p>This is the first paragraph on my page.</p> <p>This is the second paragraph on my page.</p>
When you’re done adding content, save the file.
Step 4: View the Results
Now you’re ready to view the results of your program. Open the HTML file in a web browser such as Chrome, Firefox, or Edge. You should see the heading and the two paragraphs that you added. Congratulations, you’ve just created your first HTML program!
For more information, visit Our blog.
Technology That You Don't Know