You are on page 1of 35

Web System & Technologies Lesson 1

What is the Internet?


• Internet is a worldwide collection of computer networks that links
millions of computers used by businesses, the government,
educational institutions, organizations, and individuals using modems,
telephone lines, television cables, and other communications devices
and media
• A network is a group of two or more computers that are connected
together to share resources and information.
• The Internet backbone is a collection of high-speed data lines that
connect major computer systems located around the world
• An Internet Service Provider (ISP) is a company that has a permanent
connection to the Internet backbone.
What is the World Wide Web?
• The World Wide Web, also called the Web, is the part of the Internet
that supports multimedia and consists of a collection of linked
documents
• Hypertext Transfer Protocol (HTTP) is a set of rules for exchanging text,
graphics, sound, and other multimedia files
• Web pages are pages of information on the Web
• A Web site is a related collection of Web pages
• A home page is the first document users see when they access a Web
site
Web Servers
• Web pages are stored on a Web server, or host, which is a computer
that stores and sends (serves) requested Web pages and other files

• Publishing is copying Web pages and other files to a Web server


• After the page is published available for viewing by anyone in the
world on the Web
Web Site Types and Purposes

• Electronic commerce (e-commerce) is the buying and selling of goods


and services on the Internet
Web Browsers
• A Web browser, also called a browser, is a program that interprets and
displays Web pages and enables you to view and interact with a Web
page
• Microsoft Internet Explorer and Mozilla Firefox
• A Uniform Resource Locator (URL) is the address of a document or
other file accessible on the Internet
• https://www.w3schools.com/html/html_intro.asp

• A hyperlink, also called a link, is an element used to connect one Web


page to another
WHAT IS HTML?
HTML stands for Hyper Text Markup Language
HTMLis the standard markup language for creating Web pages HTML
describes the structure of a Web page
HTML consists of a series of elements
HTML elements tell the browser how to display the content
HTML elements label pieces of content such as "this is a heading", "this is a
paragraph", "this is a link", etc.
A SIMPLE HTML DOCUMENT EXPLANATION

The <!DOCTYPE html> declaration defines that this documents


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 title bar or in the page’s tab)
The <body> element defines the document’s body, and is a
container for all the visible content, such as headings,
paragraphs, images, hyperlinks, tables, lists, etc.
The <h1> element defines a large heading
The <p> element defines a paragraph
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>
Note: Some HTML elements have no content (like the <br> element). These elements
are called empty elements. Empty elements do not have an end tag!
WEB BROWSERS
The purpose of a web browser (Chrome, Edge, Firefox, Safari) is to read HTML
documents and display them correctly.
A browser does not display the HTMLtags, but uses them to determine how to display
the document:
HTML PAGE STRUCTURE
Below is a visualization of an HTML page structure:

Note: Only the content inside the <body> section (the white area above) will be displayed in
a browser.
HTML HISTORY
Since the early days of the World Wide Web, there have been many versions of
HTML:
HTML EDITORS
A simple text editor is all you need to learn HTML.

Learn HTML Using Notepad or Text Editor


Web pages can be created and modified by using professional HTMLeditors.
However, for learning HTMLwe recommend a simple text editor like Notepad (PC) or
TextEdit (Mac).
We believe in that using a simple text editor is a good way to learn HTML.
CREATINGYOURFIRSTWEBPAGE
Step 1: Open Notepad (PC)
Windows 10:
Open the Start Screen (the window symbol at the bottom left on your screen). Type
Notepad.
Step 2: Write Some HTML
Write the following HTML code into Notepad:
Step 3: Save the HTML Page
Save the file on your computer. Select File > Save As in the Notepad menu.
Name the file "index.htm" and set the encoding to UTF-8 (which is the preferred encoding
for HTML files).

Tip: You can use either .htm or .html as file extension. There is no difference, it is up to you.
Step 4: View the HTML Page in Your Browser
Open the saved HTML file in your favorite browser (double click on the file, or right-
click - and choose "Open with").
The result will look much like this:
HTML BASIC EXAMPLES
HTML Documents
All HTMLdocumentsmuststart with a document type declaration: <!DOCTYPEhtml>.
The HTML document itself begins with <html> and ends with </html>.
The visible part of the HTMLdocument is between <body> and </body>.
Example
THE < !DOCTYPE> DECLARATION
The <!DOCTYPE> declaration represents the document type, and helps browsers to
display web pages correctly.
It must only appear once, at the top of the page (before any HTML tags).
The <!DOCTYPE> declaration is not case sensitive.
The <!DOCTYPE> declaration for HTML5 is:
<!DOCTYPE html>
HTML HEADINGS
HTML headings are defined with the <h1> to <h6> tags.
<h1> defines the most important heading. <h6> defines the least important heading:
Sample Code: Output:
HTML PARAGRAPHS
HTML paragraphs are defined with the <p> tag:
Sample Code: Output:
HTML LINKS Output:
HTML linksare defined with the <a> tag:
Sample Code:

The link's destination is specified in the href


attribute.
Attributes are used to provide additional
information about HTML elements.
HTML IMAGES
HTML images are defined with the <img> tag.
The source file (src), alternative text (alt), width, and height are provided as
attributes: Output:
Sample Code:
HOWTO VIEWHTML SOURCE?
Have you ever seen a Web page and wondered "Hey! How did they do that?"
VIEWHTML SOURCE CODE:
Right-click in an HTMLpage and select "View Page Source" (in Chrome) or "View
Source" (in Edge), or similar in other browsers. This will open a window containing the
HTML source code of the page.
HTML Elements
An HTML element is defined by a start tag, some content, and an end tag.
HTML Elements
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>

Note: Some HTMLelements have no content (like the <br> element). These elements are called empty elements. Empty
elementsdo not have an end tag
NESTED HTML ELEMENTS
HTMLelements can be nested (this means that elements can contain other elements).
All HTMLdocuments consist of nested HTMLelements.
The following example contains four HTML elements
(<html>, <body>, <h1> and <p>):
Output:
Sample Code:
EXAMPLE EXPLAINED
The <html> element is the root element and it defines the whole HTMLdocument.
It has a start tag <html> and an end tag </html>.
Then, inside the <html> element there is a <body> element:
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
The <body> element defines the document's body.
It has a start tag <body> and an end tag </body>.
Then, inside the <body> element there is two other elements: <h1> and <p>:
<h1>My First Heading</h1>
<p>My first paragraph.</p>

The <h1> element defines a heading.


It has a start tag <h1> and an end tag </h1>:
<h1>My First Heading< /h1>

The <p> element defines a paragraph.


It has a start tag <p> and an end tag </p> :
<p>My first paragraph.</p>
NEVER SKIP THE END TAG
Some HTML elements will display correctly, even if you forget the end tag:
Sample Code: Output:

However, never rely on this!


Unexpected results and errors may
occur if you forget the end tag!
EMPTY HTML ELEMENTS
HTMLelements with no content are called empty elements.
The <br> tag defines a line break, and is an empty element without a closing tag:
Sample Code:
Output:
HTML IS NOT CASE SENSITIVE
HTMLtags are not case sensitive: <P> means the same as <p>.
The HTML standard does not require lowercase tags, but W3C recommends
lowercase in HTML, and demands lowercase for stricter document types like XHTML.
ENDOFLESSON1

You might also like