Do you want to learn HTML programming?
This is the first tutorial on HTML programming. If you want to learn HTML, you are in the right place.
In this tutorial, you will learn all the basics you require to write and run your first HTML code. I will also explain different HTML program examples with output.
Table of Contents
HyperText Markup Language is popularly known as HTML. It is the language that the web browser understands. Every web developer should learn this language and it is the basic language to start with.
Every web page you see on the internet is written in the HTML language. Even the page you are reading now uses HTML.
So now it might be clear to you, that running HTML code you don’t require installing any software. You can execute the HTML file in any of your internet browsers.
HTML is the common language that is understood by all web browsers today.
In HTML, everything is written using tags and elements. It is a markup language that means it is used to mark the content in the web document.
An HTML document provides structural and semantic information of a webpage to the browser.
HTML contains a set of tags and elements that together form markup content. An element defines the purpose of a tag.
Start and end tags are used at the beginning and ending of an element.
For example:
<p> This is a paragraph </p>
The above is an example of the complete element from starting <p>
tag, the content ‘This is a paragraph’ to the ending tag </p>
.
The HTML element represents the root of any HTML document thus, <html>
is the root element. The root element is present in all the documents and codes. The root element always contains a <head>
and a <body>
element.
<head>
element is like a container that contains the information about the document and how it must be perceived by the browser or search engines.
It includes meta, titles, style, link, script, NoScript, and base. How to include these tags in the head? – we will see that in the latter part of the HTML tutorial.
Title Tag:
<title>
element is one mandatory element within the <head>
element. This title is displayed as the page title in the browser tab and also the search engines identify the page with the help of this title. So, each HTML document should compulsorily have a <title>
tag.
Example:
<head> Â Â <title>This is a page title </title> </head>
All the content that is visible in a browser is contained within the <body>
element. Each HTML document has a <body>
element under which all the content is written using different tags.
There can be only one <body>
element in a document.
Example:
<body> Â Â <h1>This is a heading</h1> </body>
Read more basic HTML tags you require to create a web page.
You might have wondered seeing some of the HTML tags do not have an ending tag.
Empty elements are those elements that have no content and can be used without a closing tag.
An example of such an element is <br> that is a break tag, it defines a break between lines. Empty HTML elements can be closed within the opening tag such as <br />
.
Except for the empty elements, the rest all the elements needs a closing tag.
A cumulative example of all the elements we have described above is below.
<!DOCTYPE html> <html> Â Â Â <head> Â Â Â Â Â Â <title>Page Title</title> Â Â Â </head> Â Â Â <body> Â Â Â Â Â Â <h1>Homepage Headline</h1> Â Â Â Â Â Â Â <p>This is before the break tag<br /> Â Â Â Â Â and this after the break tag.</p> Â Â Â </body> </html>
Note: DOCTYPE
is used to identify the type of document as an HTML file.
Don’t bother about the tags inside the body tag. I will tell you about these tags in the next tutorial in detail (link given below the post).
There are two ways you can do that.
.html
in Notepad (Windows) or Vim (Linux) or any of the text editors. Copy the above code and save it in the file. Open the file in any of the internet browsers.By executing HTML code, you can visualize and understand each of the HTML basic tags, in a better way.
If you are looking for a job? Visit Jooble.
Conclusion
In this HTML program examples with output, we have learned about the basic HTML elements and their uses. HTML elements define the structure of the web pages and contain a number of HTML tags.
HTML is a very simple language. And it is widely used to write web pages. HTML was developed in various versions and HTML5Â is the latest version.
I want some HTML programs for class 7 based on javascript, forms and frames.
Hi Aniket,
Please mention your clear requirement or you can seek help from our Facebook community members.
Super. Python is very practical and thanks for putting this example.
You’re welcome, Vaidehi!
Hmm good
Can you share?
I need html programs & codings for class 10
Hi Sumit,
I am not sure about class 10 students. How much HTML programming experience do they have? Are they beginners and started learning recently?
I want 20 HTML programs of computer class 10 for profect.
so do i
hello, thanks for your wonderful opening up or step you have giving a new beginner. but I want to learn how to design web environment.
Web designing is really a very broad topic and it comes with lots of options. Here are things have to learn to web development.
1) Frontend (HTML, CSS and JavaScript)
2) Backend (PHP, Python, NodeJS)
3) Database management (DBMS, SQL)
If you are not new and want to learn web development, learn Django. It is a Python framework for website development.
Please give me at least 20 HTML programs with their output for class 10.
Sure Jaslin. Will update this tutorial by adding more of such examples.
I want a example program with output for class 10 HTML .
I need to know how to write the output of the program given. PLS FAST!
hey, could you write code to create a simple website with 5 pages using HTML and CSS?
Your requirement is not so clear. You can create the webpages using simple HTML tags mentioned in this tutorial.
I need five HTML program in Au sheet and output also.
l want an HTML source code for creating a webpage for school.
Sir, I want 15 programs of HTML for my school project, please provide me.
Hi
I want 100 HTML programs for my project.
Sir, please send HTML 20 program with output.
I also want.
Of Course I can help and write codes in HTML, CSS, PHP, C, C++,JavaScript and Python
I need some simple examples of HTML in basic terms.
Thanks a lot…
so useful…
You’re welcome!
Thanks a lot , it was so useful…
You’re welcome! I hope you enjoy going through other tutorials as well…