HTML Notes
HTML Notes
Day-2 https://youtu.be/ML43iLHvOoE
Day-3 https://youtu.be/nS3YRucnE2A
Day-4 https://youtu.be/SeQgj1XhZxo
Day-5 https://youtu.be/g-itA5uBOqg
Day-6 https://youtu.be/n_iy3pqsEPw
Client
A client is an electronic device that connects to and uses the resources
of a remote computer, or server.
Clients may be desktop or a laptop or a tablet or a mobile phone or a TV
etc.
The device which is used by the user is called a “Client”.
User
The person who is working on/operating a client machine is known as
User or end-user.
Client:
It is a machine or device (desktop or laptop or tablet or mobile phone or TV etc),
which can access the data from a server machine.
The device which is used by the user is called a “Client”, a person who is working
on a client machine is known as User.
STATIC WEB APPS: The applications which can't handle business logic are known
as static web apps. Static apps will contain only client layer.We can develop static
web applications using HTML. To provide look and feel to these static pages we can
use CSS. To handle client layer business logic we can use Javascript.We can't
maintain end user interaction(state) using static web apps.
DYNAMIC WEB APPS:The applications which are able to handle business logic are
known as dynamic web apps. These types of apps contain at least 2 layers: client
and business. If we need to store client data then these application contains data
layer too.We can develop client layer using HTML, CSS & javascript and business
layer using any one of the server programming language like .NET, JAVA/J2EE &
PHP etc...We can store end user data using any database like mongo db, MS-SQL,
MySql, Oracle etc.
What is HTML?
It is specially designed hypertext for web browsers, with meaningful tags or
elements in simple English language.
HTML Versions
From the W3C organization there are the following versions released.
Version Specification Release Date
1.0 N/A (HTML 1.0) 1993
2.0 HTML 2.0 24-Nov-1995
3.2 W3C: HTML 3.2 14-Jan-1997
4.0 W3C: HTML 4.0 24-Apr-1998
4.1 W3C: HTML 4.1 24-Dec-1999
5.0 WHATWG 28-Oct-2014
(Adv Markup Language For Mobiles)
5.1 W3C: HTML 5.1 -Nov-2016
(Adv Markup Language For Small Electronic Devices)
5.2 W3C: HTML 5.2 14-Dec-2017
HTML Intro
1. HTML was developed by “Tim-Berners-Lee”, released in 1993 and
maintained by W3C Org.
7. HTML is “client side tech”. That means the html code executes on
the client browser but not on the server.
web tech:
which sw are supporting to design web pages or providing API to
dev web coding those sw are called as web tech.
>client side tech ex: html/css, js, jquery, BS ...
used for static web pages.
bw rec source code & trans after execution then produced
the output.
>server side tech ex: servlet, jsp, asp.net, php, cgi, nodejs, cold
fusion ...
dynamic web pages.
code trans, execute with in server only, and produced output,
this output sent to the client machine.
9. HTML is used in all real time web sites today; html is the only
language available in the world for designing Web Pages.
10. The file extension either "filename.html" or "filename.htm"
11. HTML is an interpreter-based language. That means the HTML code
will be converted into machine language in +. Browser interprets HTML
code.
Translators: converting high level code (human) into machine level
code (MP/OS) is called translation. who performs this operation
are called translators.
types: >compiler ex: c, cpp,...
>interpreter ex: html, js, oracle,...
>assembler
12. for working html no need installs any software, and browser is
responsible for executing & producing output of html programs.
14. HTML is not a case sensitive language that means you can write the
html code in either uppercase or lower case.
Tag:
● A tag is a keyword, enclosed within "<" and ">" in HTML language.
● It is a special kind of text placed between the left angular brace
and right angular brace(<tag_name>).
● Tag is a predefined program, program is instructions / command to
the browser.
● Tag is used to display some specific output in the web page.
● browser did not identify the tag; it shows a blank page or it prints
as text.
● tags also represented as elements.
● tag has some attributes(properties), those are used to change look
& feel (components or output).
types of tags:
in html we have two types tags, those are:
>paired tags
contains open tag and closing tag.
opening tag specifies starting point of operation/output, closing tag specifies
ending point of operation/output.
Syn: <tagname>something</tagname>
ex: <html> ... </html>
<head> ... </head>
<body> … </body>
<script> ... </script>
<style> ... </style>
<p> … </p>
note: paired tags also called as body-full tags
>unpaired tags
contains only an open tag.
VOID => ITS not RETURNING ANY VALUE
Syn: <tagname> or <tagname/>
ex: <br/> <img/><input/>
<hr>
<link>
note: Unpaired tags also called as body-less tags
Structure of HTML
as per W3C we have to follow the following structure to design web pages (but it’s
not comp).
<!DOCTYPE html>
>versioning section
>head section
>body section
versioning section
this is providing information to browser which version we are using in
webpage/program. So, browser is interpreting code and producing output as per
given specification.
Syn:
<!DOCTYPE htmlversion-url>
HTML4.0:
XHTML:
HTML5:
html tag
The <html> tag represents the starting and ending of the html program. html tag
contains two child/sub tags those are head tag and body tag.
head tag
head tag represents a non-content section (means not output) of the web page.
This information doesn't appear on the webpage/in the browser (it's called as non-
content), but it's used internally by the browser.
this tag is used to set icons, title, to provide some meta data (info about web app),
css settings, java scripting etc...
Syn:
<head>
<link>
<title></title>
<meta>
<style></style>
<script></script>
...
</head>
body tag
body tag represents content information (means output) of the web page.
this information appears on the webpage/in the browser (it’s called content).
this tag is used to design UI or to display output.
some of tags:
<body>
<form>
<h1>
<h2>
<p>
<div>
<input>
<a>
<audio>
<video>
<iframe> etc...
</body>
comment lines
Syn:
<!-- comments -- >
heading tags
these tags are used to print data/text in heading format.
html provides 6 heading tags, those are h1, h2, h3, h4, h5, h6.
Syn:
Note: inside the body section we can repeat any tag and no.of times.
p tag
> p stands for paragraph.
Syn:
Note:
>browser/html doesn't accept more than one space (space bar & tab key), means
while designing the program we are given more space but browser prints only
one space.
>browser/html doesn't accept enter key (line breaking), means while designing a
program we use enter key but browser prints data without breaking line.
br tag
Ø br stands for break line (enter key)
Ø its un-paired
Html entities
=> every operator is used to perform some task or to print some special text.
Syn: &operator;
Syn: &#operator;
ex1
<!-- example on heading tags -->
<!DOCTYPE html>
<html lang="en">
<body>
<h1>Hypertext Markup Language</h1>
<h2>Hypertext Markup Language</h2>
<h3>Hypertext Markup Language</h3>
<h4>Hypertext Markup Language</h4>
<h5>Hypertext Markup Language</h5>
<h6>Hypertext Markup Language</h6>
<h1>Cascading Style Sheets</h1>
<h3>JavaScript</h3>
<h5>Angular</h5>
</body>
</html>
ex2
<!-- example on p tag -->
<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body>
<h3>No Cost EMI:</h3>
<p>In an attempt to make high-end products accessible to all, our No Cost
EMI plan enables you to shop with us under EMI, without shelling out any
processing fee. Applicable on select mobiles, laptops, large and small appliances,
furniture, electronics and watches, you can now shop without burning a hole in
your pocket. If you've been eyeing a product for a long time, chances are it may be
up for a no cost EMI. Take a look ASAP! Terms and conditions apply.</p>
ex3
<!-- example on br tag and html operators -->
<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body>
red apple<br>
yellow mango<br/> <br/> <br/> <br/>
black grape<br>
100$<br> 100€ <br> 100£ <bR> 100¥ <br>
<hi> <br>
Intel© Core™ I7® Processor <br>
¼ ½ ¾ <br>
10÷3 <br>
₹1000 <br>
😈 😍 😒 😗 😜 😡
😦
</body>
</html>
formatting tags
<b><strong> <u> <i><em> <strike> <sub> <sup>
Inline tags
b tag or strong
> b stands for bold
> b tag used to print text in bold format
>both are paired tags & inline tags
Syn:
<b> text </b>
<strong> text </strong>
u tag
> u stands for underline
> u tag used to print text with underline (draws a line base of text)
> u is paired tag
Syn:
<u> text </u>
strikeout tag
> strikeout tag used to print text with line (draws a line middle of text)
>strikeout is paired tag
Syn:
<strike> text </strike>
superscript tag
>this tag used to display text top of upper line
> superscript is paired tag
Syn:
<sup> text </sup>
subscript tag
>this tag used to display text bottom of baseline
> subscript is paired tag
Syn:
<sub> text </sub>
I or em tag
>i stand for italic (inclined)
>i tag used to print text with little banding
>i is paired
Syn:
<i> text </i>
<em> text </em>
ex4
<!-- example on formatting tags -->
<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body>
<strong>HTML</strong>
<b>CSS</b>
<br>
<em>JavaScript</em>
<i>BootStrap</i>
<br>
<strike>AngularJS</strike>
<br>
<u>ReactJs</u>
<br>
Glucose => C<sub>6</sub>H<sub>12</sub>O<sub>6</sub>
<br>
(a-b)<sup>2</sup> = a<sup>2</sup> + b<sup>2</sup> - 2ab
<br>
<!-- nesting tags -->
<h1>
<u>
<em>
Siva Kumar Y
</em>
</u>
</h1>