Dear viewers, A computer is a practical technology. If we learn only theory, then it will cause severe harm to us.
Day-1: Practical Session
What is HTML?
- HTML stands for Hyper Text
Markup Language
- HTML elements label pieces of
content such as "this is a heading",
- HTML is the standard markup
language for creating Web pages
- HTML describes well the
structure of a Web page
- HTML consists of a series of
elements
- HTML elements handle the browser
how to display the content
"this is a
paragraph", "this is a link", etc.
My First Simple HTML Page
<!DOCTYPE html>
<html>
<head>
<title>My First HTML Web Page</title>
</head>
<body bgcolor=’pink’>
<h1>My
First Heading</h1>
<p>My first paragraph. </p>
</body>
</html>
=====================
Output
=====
Example Explained
- The <!DOCTYPE html> declaration defines that this
is an HTML5 document
- The <html> element is the root element of an HTML
page
- The <head> element contains meta information about
the HTML page
- The <title> element specifies a title for the HTML
page (which is shown in the browser's title bar or in the page's tab)
- The <body> element defines the document's body, how
will look and is a container for all the visible contents, such as
headings, paragraphs, images, hyperlinks, tables, lists, etc.
- The <h1> element defines a large heading or bigger
in size
- The <p> element defines a paragraph and its’
content
====================================
Day-2: Practical Session
What is an HTML Element?
An HTML element is defined by a start tag,
some content, and an end tag:
<tagname> Content goes
here... </tagname>
The HTML element is
everything from the start tag to the end tag:
<h1>My First Heading</h1>
<p>My first paragraph.</p>
|
Start tag |
Element content |
End tag |
|
<h1> |
My First Heading |
</h1> |
|
<p> |
My first paragraph. |
</p> |
|
<br> |
none |
none |
Practical with HTML day by day
Note: Some HTML elements have no content
(like the <br> element) are called empty elements.
HTML Page Structure
Below is a visualization of an HTML page
structure:
Note:
The content that is inside the <body>
section will be displayed in a browser.
The content inside the <title> element
will be shown in the browser's title bar.
Now Full code is :
<!DOCTYPE html>
<html>
<head>
<title>My First HTML Web
Page</title>
</head>
<body bgcolor='lightblue'>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
<p>This is another
paragraph.</p>
</body>
</html>
=================
Output:
Practical with HTML day by day
==================================



