HTML stands for Hyper Text Markup Protocol, it describe the structure of web pages. Browser understands the only html and display things according to codes what we write in HTML language.
Before going to learn HTML you should know the following thing well:
- Basic typing Skills
- Notepad or Notepad++
- Saving files, directories
- Image format as png, jpg
After little its introduction now we start learning HTML step by step. As we know HTML tags are used to create web pages that is why we must have to learn what are HTML tags at the first place.
What is HTML Tag?
In simple words Tags are the predefined words that are embedded directly into the text of a HTML document. Each HTML tag tells that the browser should do something instead of simply displaying the text. In HTML, the tags begin with (<) and end with (>) HTML tags can be of two types.
A tag is known to be a paired tag if the text is placed between a tag and its companion tag means closing tag
. In paired tags, the first tag is referred to as Opening Tag and the second tag is referred to as Closing Tag. It is also called non singular tags
<i> This text is in italics. </i>
Here <i> is called opening tag. and </i> is called closing tag
An unpaired tag does not have a companion tag. Unpaired tags are also known as Singular or Stand Alone Tags. It is also called singular tag.
<br> , <hr>
These tags do not require any companion or closing tag.
Basic Structure of HTML Page:
As we know that each tag does its own function in Html page, so now we are going to create very basic page.
Remember each tag we used in html is to be closed.
<head> Meta goes here
<title> Title Goes here </title> </head>
<center><h1> My Website </h1></center>
This is my own website,
Using above code we just created very simple webpage, lets explain the tags what we used in coding.
You can at the very first place we used this tag, it only tells the browser this is an html webpage, all other coding is kept inside the html tag as we closed at the very end point.
After the <html> we use this one, it provide information to browser about your webpage. More simple <head> element is a container for metadata (data about data) and is placed between the <html> tag and the <body> tag. HTML metadata is data about the HTML document. Metadata is not displayed. Metadata typically define the document title, character set, styles, links, scripts, and other Meta information that is why only few tags are used in <head> section that are under.
<title>, <style>, <meta>, <link>, <script>, and <base>.
It is also for the browser, actually it describes the title of your webpage.
It is our area, all things you write in this section are visible
It is for heading, when we put this tag our content will be large.
creates a line horizontally, it is unpaired tag that has no closing
Puts our text in center of the page
This is very basic introduction and creation of simply web page; you try this code and observe its working in browser, as
- Open your notepad or notepad++
- Write above code there or copy past
- Save it by crl+s , but file name should be with html extension such as “website.html”
- Open saved file with browser
If you have any question related to this one, must put in under comment section thanks