Introduction to HTML
The language that is used for developing web pages is called HTML (Hypertext markup language).
HTML is made up of 2 words -: Hypertext and markup Language.
Hypertext is the text displayed on a computer screen or some other electronic device. Hypertext gets connected with other text that the reader can immediately access through hyperlinks. In other words, we can say that Hypertext documents are interconnected by hyperlinks.
Hypertext can also refer to tables, images, and other presentational content.
Markup language-: How we format the content or structure the content.
Q) Why HTML called a markup language?
HTML is called markup Language because it allows users to organize the appearance of the web page.
Q) What is the difference between programming language and mark language?
Programming language are those through which we give instruction to our system whereas markup Languages are those which basically used for documentation and formatting of text.
In an HTML document HTML is specified using tags.
Tags
Tags are basic instructions that are directly embedded into the text of the document.
An HTML tag is a signal to a browser that it should do something other than just throw text up on the screen.
Tags basically begin with an open-angle bracket (<) and end with a close-angle bracket (>).
Type of tags
There are basically two types of tags-:
(1) Paired Tag (2) Singular Tag / Standalone tag
Companion tag no companion tag.
Ex-: < B> -----< /B>
The opening tag activates the effect and the closing tag turns the effect off.
Additional information supplied to HTML tags known as Attributes.
Steps to create HTML document-:
(1) Open Notepad.
(2) Write HTML instructs.
(3) Save it as "*.HTML" or "*.htm”
Structure of HTML document
It has a rigid structure -:
< ! DOCTYPE HTML>
<html>
< Head>
< title> < /title>
< /Head>
< Body> </ Body>
< /html>
Explanation:-
According to the structure the first element is <!DOCTYPE html> this element basically give the information about the version of HTML and <!DOCTYPE html> represent HTML5.
The next element is <html> this is a paired tag and contains the entire HTML document inside it.
The next element is <head> this represents the header portion of the HTML document. It is also a paired tag and contains other tags like <title>, <script>, etc.
Inside the <head > we have a <title> tag which represents the title of the HTML document.It is also a paired tag.
Then comes the <body> element which holds the entire body of the HTML document. It is also a paired tag and it can also have other tags inside it like <p>, <h1>, <b> etc.
Example:-
<!DOCTYPE html>
<html>
<head>
<title> Test </title>
</head>
<body>
<p> Bing Studious One </p>
</body>
</html>
When we execute the HTML file we get the output as:-
0 Comments
Please do not enter any spam link in the comment box