Unit 1
Unit 1
Dr. Bharathi P. T,
Assistant Professor,
Dept. of CSE, SIT
[email protected]
Web programming
• Web programming refers to the writing,
markup and coding involved in Web development.
• Refers to the creating, building, and maintaining of websites.
•Web
The word Web Development is made up of two words, that
is:
• Web: It refers to websites, web pages or anything that
works over the internet.
• Development: It refers to building the application from
scratch.
Static and Dynamic web pages
https://protonix-india.com/ http://sit.ac.in
Static and Dynamic web pages
Sl.N
o Static Web Page Dynamic Web Page
In static web pages, Pages will In dynamic web pages, Content of
1. remain same until someone pages are different for different
changes it manually. visitors.
In static web pages, Information are In dynamic web page, Information are
3.
change rarely. change frequently.
Static Web Page takes less time for Dynamic web page takes more time for
4.
loading than dynamic web page. loading.
Backend Developer
• Server-side development
• It is a type of development that involves programs that run on
a server.
• Connecting websites to databases, Coding dynamic websites
Jobs Designation with Web
Development
Full stack Developer
• Build and maintain both the front-end and the back-end of a
website.
Client-side (Front End) Programming
2) C++
4) Python
5) Ruby on Rails
6)C#
World Wide Web (WWW)
The Internet is often confused
with the World Wide Web.
HTML
HTML History
HTML – Web Programming Language
HTML5
Structure
HTML • The <!DOCTYPE html> declaration
defines that this document is an
HTML5 document
<!DOCTYPE html>
<html>
• The <html> element is the root
element of an HTML page
<head>
• The <head> element contains meta
<title>Page information about the HTML page
Title</title>
• The <title> element specifies a title for
</head> the HTML page (which is shown in the
browser's title bar or in the page's tab)
<body>
• The <body> element defines the
document's body, and is a container for
all the visible contents
</body>
• Like headings, paragraphs, images,
</html>
hyperlinks, tables, lists, etc.
HTML and XHTML: Version
History
HTML and XHTML: Version Histor
HTML 2.0 Classic HTML supported by browsers such as Mosaic. It supports
core HTML elements and features such as tables and forms, but
not consider any of the browser innovations of advanced
features such as style sheets, scripting, or frames
HTML 3.0 was never widely adopted, most likely due to the heavy
use of browser-specific markup
HTML 3.2 supports many presentation-focused elements such as font, as
well as early support for some scripting features.
HTML 4.0 It provides a basis of transition to Cascading Style Sheets (CSS)
Transitional as well as a base set of elements and attributes for multiple-
language support, accessibility, and scripting.
HTML 4.0 Strict Removes most of the presentation elements from the HTML
specification, such as font, in favor of using CSS for page
formatting.
4.0 Frameset The frameset specification provides a rigorous syntax for
framed documents that was lacking in previous versions of
HTML.
HTML 4.01 A minor update to the 4.0 standard that corrects some of the
Transitional/ errors in the original specification.
Strict/Frameset
HTML and XHTML: Version
HTML5 Extend it to address Web application development, multimedia,
History
and the ambiguities found in browser parsers.
XHTML 1.0 The transitional form preserves many of the basic presentation
Transitional features of HTML 4.0 transitional but applies the strict syntax
rules of XML to HTML.
XHTML 1.0 A reformulation of HTML 4.0 Strict using XML. This language is rule
Strict enforcing and leaves all presentation duties to technologies like
CSS.
XHTML 1.1 A restructuring of XHTML 1.0 that modularizes the language for
easy extension and reduction.
XHTML 2.0 A new implementation of XHTML that will not provide
backward compatibility with XHTML 1.0 and traditional
HTML. XHTML 2 will remove all presentational tags and will
introduce a variety of new tags and ideas to the language.
XHTML Modularization of XHTML (1.1)
Basic 1.0 designed to work with less-power ful Web clients such as mobile
phones.
XHTML some fairly specific to the constrained interfaces found
Basic 1.1 in mobile devices.
Document Type Statements and Language
Versions
• All HTML documents must start with a <!DOCTYPE>
declaration.
Example
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN">
version of HTML
being
used, in this case
4.01
Document Structure HTML 4.0
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML
4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equip="Content-Type"
content="text/html; charset=utf-8">
<title>Page Title</title>
</head>
<body>
</body>
Document Structure XHTML
version of XHTML
being used, in this
case 1.0
<head>
<meta http-equip="Content-Type"
content="text/html; charset=utf-8" />
<title> Page Title </title>
</head>
<body>
</body>
</html>
In either HTML
or XHTML (but
not in HTML5),
we can replace
the
<body> tag with
a
<frameset> tag,
which encloses
potentially
numerous
<frame> tags
corresponding to
individual
portions of the
browser
window, termed
<!DOCTYPE HTML > Frameset example1
<HTML>
<HEAD>
<TITLE>Simple frameset</TITLE>
<FRAMESET cols="50%,50%">
<FRAME border="1" name="frame1" src="#">
</FRAME>
</FRAMESET>
</HEAD>
<BODY>
</BODY>
</HTML>
<HTML>
<HEAD> Frameset example2
<TITLE>Simple frameset</TITLE>
<FRAMESET cols="30%,70%">
<FRAMESET rows="50%,50%" >
<FRAME frameborder="1" name="frame1" src="">
</FRAME>
<FRAME frameborder="1" name="frame2" src="">
</FRAME>
</FRAMESET>
<FRAMESET rows="20%,80%">
<FRAME frameborder="1" name="frame3" src="">
</FRAME>
<FRAME frameborder="1" name="frame4" src="">
</FRAME>
</FRAMESET>
</HEAD>
<BODY>
</BODY>
</HTML>
The <frameset>
tag also should
include a
noframes
element that
provides a
version of the
page for
browsers that
do not support
frames
Frame example3
<!DOCTYPE html>
<html>
<body>
<h1>The iframe
element</h1>
<iframe
src="https://www.w3schools
.com" title="W3Schools Free
Online Web Tutorials"> Use the <iframe> tag to embed
</iframe> another document within the current
HTML document:
</body>
</html>
The Document Head
• It is used to describe the content of the document.
• The element acts like the front matter or cover page of a
document.
• head element is information about the page that is useful
for setting the page title, defining interactivity, visual
styling, and providing other useful information that
describes or controls the document.
<!DOCTYPE >
<html>20
<hea
d>
<title>Page
Title</title>
</
head>
<body
>
</
body>
</
html>
The Document Head
<title> Defines the title of the document. The title must be text-only, and it is
shown in the browser's title bar or in the page's tab.
Character Code
Description of
webpage Keywords
Author
Screen size
adjustment
Browser refresh
<style> Used to enclose Cascading Style Sheet (CSS) format, relating to fonts, colors,
positioning, and other aspects of content presentation
<style type="text/css" media="screen">
h1 {font-size: xx-large; color: red; font-style: italic;}
/* all h1 elements render as big, red and italic */
</style>
Other Elements in the head
<base> Used to specifies an absolute URL address that is used to
provide server and directory information for
partiallyspecified URL addresses, called
relative links, used within the document
<ol type=“A">
<li>List item 1</li> Ordered Listing with A,B,C numbering
</ol>
Tag Meaning
<ol type="i"> Ordered Listing with i,ii,iii numbering
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
</ol>
<ol start="5"> Ordered Listing start with 5,6,7
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
</ol>
<strike>Example</strike> To strike Example
<table> Table tag to create table tr
<tr> - row
<th>Month</th> th – header
<th>Savings</th> td- values
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
</table>
Tag Meaning
<div> paragraph1 </div> For different sections
<div> paragraph2 </div>
<div> paragraph3 </div>
<dl> Definition description
<dt>Coffee</dt>
<dd>Black hot drink</dd>
<dt>Milk</dt>
<dd>White cold drink</dd>
</dl>
<pre> Preformatted text. The text will be
Text in a pre element is displayed in a displayed exactly as written in the
fixed-width font, and it preserves both HTML source code.
spaces and line breaks
</pre>
<p>My favorite color The <ins> tag defines a text that has been
is <del>blue</del> inserted into a document. Browsers will usually
<ins>red</ins>!</p> underline inserted text.
The <del> tag defines text that has been
deleted from a document. Browsers will usually
strike a line through deleted text.
Tag Meaning
<blockquote cite="https://www.brainyqu HTML <blockquote> tag is used to define a block
ote.com/authors/erin_cummings"> of text which is quoted from another source. The
<p> Browser usually displays the content within
At the end of the day, you are solely re <blockquote> tag as indented text.
sponsible for your success and your failur
e. And the sooner you realize that, you ac
cept that, and integrate that into your wo
rk ethic, you will start being successful.
</p>
</blockquote>
The Document
Body
XHTML
• XHTML stands for eXtensible HyperText Markup
Language
• XHTML is a stricter, more XML-based version of HTML
• XHTML is supported by all major browsers
</body>
</html>
Document Structure XHTML
version of XHTML
being used, in this
case 1.0
<img src="test.gif">
<img SRC="test.gif">
<IMG src="test.gif">.
XHTML Rules
• (X)HTML Follows a Content Model
<ul>
<strong>T e s t o f s p a c e s </strong><br>
<strong>T
e s
t o f s p a c e s</strong><br>
all the spaces, tabs, and returns are collapsed to a
single element:
Physical tag:
• Provides a visual appearance to the text.
• to make pages look a particular way
• they are designed to provide certain instructions
regarding the display of enclosed text
Logical tag:
• to specify the structure or meaning of content
• Adds some logical or semantic value to the text.
• They are designed to mention the meaning of the
enclosed text
<strong></strong> tag. This “strong” tag implies
that the text is of great importance.
<em>This is emphasized text</em>
<kbd>This is keyboard text</kbd>
What are Semantic Elements?
• A semantic element clearly describes its meaning to both the
browser and the developer.
<figure>
<img src="pic_trulli.jpg" alt="Trulli" style="width:100%">
<figcaption>Fig.1 - Trulli, Puglia, Italy.</figcaption>
</figure>
<nav>
<a href="/html/">HTML</a> |
<a href="/css/">CSS</a> |
<a href="/js/">JavaScript</a> |
<a href="/python/">Python</a>
Semantic Elements
<header>
<h1>A heading here</h1>
<p>Posted by John Doe</p>
<p>Some additional information here</p>
</header>
<footer>
<p>Author: Hege Refsnes</p>
<p><a href="mailto:[email protected]">[email protected]</a></p>
</footer>
<article>
<h2>Google Chrome</h2>
<p>Google Chrome is a web browser developed by Google,
released in 2008. Chrome is the world's most popular web
browser today!</p>
</article>
Myths and
Misconceptions
About
HTML and XHTML
Myths and Misconceptions About HTML and
XHTML
Misconception: HTML Is a Programming Language
• HTML is unlike programming in that it does not specify logic.
It specifies the structure of a document.
• .
Sample Questions on module 1
1. Distinguish between static and dynamic webpages.
2. Explain the Document Structure of HTML 4.0.
3. Explain the Document Structure of XHTML
4. What is HTML? Explain the Document Structure of HTML5.
5. List and explain the elements of the Document Head. Or
explain the following document head tags 1)title 2)meta 3)link
4)script
5)style 6)base
6. What is XHTML? Illustrate the rules of XHTML.
7. What are physical and logical tags?
8. Explain the myths and misconceptions About HTML and XHTML.
9. What do you mean by DTD and validation of document?
10. Explain the following tags with an example
1)<p> 2)h1,h6 3)div 4)ul, ol 5)dl,dt,dd 6)pre 7)hr
8)blockquote
9)Table 10)script 11)ins 12)del 13)<!---- >