HTML or Hypertext Markup Language in full form is the markup language to create webpages.
Any HTML document has mainly two parts:
Any HTML document has mainly two parts:
- Head
- Body
An HTML code is written using tags. Like <html> tag means the beginning of an HTML document and </html>tag means the end of the HTML section. Similarly for head, <head >tag is used and for body, <body>tag is used.
Usually and HTML consists of a start tag and an end tag, the content is written between these two tags. Like:
<p> content abc.... ...of paragraph </p>
(start tag) (end tag)
Note:
- <title> tag is always written within <head> tag.
List of popular tags
Tag Description
<!DOCTYPE> Defines
the document type
<html> Defines an HTML document
<head> Defines
information about the document
<title> Defines
a title for the document
<body> Defines
the document's body
<h1> to <h6> Defines
HTML headings
<p> Defines
a paragraph
<br> Inserts
a single line break
Example of HTML program:
<!DOCTYPE html>
<html>
<head>
<title>
My first program
</title>
</head>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.<br>
Here I start learning. </p>
</body>
</html>
<html>
<head>
<title>
My first program
</title>
</head>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.<br>
Here I start learning. </p>
</body>
</html>
Result:
Here I start learning.
My First Heading
My first paragraph.Here I start learning.
Great
ReplyDelete