UNIT 1: INTRODUCTION TO HTML 1. What is HTML? HTML is the standard markup language for creating Web pages. HTML stands for Hyper Text Markup Language HTML describes the structure of Web pages using markup HTML elements are the building blocks of HTML pages HTML elements are represented by tags HTML tags label pieces of content such as "heading", "paragraph", "table", and so on Browsers do not display the HTML tags, but use them to render the content of the page. A sample program for HTML: Example <html> <head> <title>Page Title</title> </head> <body> <h1>My First Heading</h1> <p>My first paragraph.</p> </body> </html> What is Scripting Language? A script language is a programming language that supports scripts: programs written for a special run-time environment that automate the execution of tasks. Scripting language are sometimes referred as very high programming language. Some of the scripting language are pearl, python, java script. What is Internet? The Internet is the global system of interconnected computer networks that use the Internet protocol suite (TCP/IP) to link devices worldwide. A global computer network providing a variety of information and communication facilities, consisting of interconnected networks using standardized communication protocols.
16
Embed
UNIT 1: INTRODUCTION TO HTML · UNIT 1: INTRODUCTION TO HTML 1. What is HTML? HTML is the standard markup language for creating Web pages. HTML stands for Hyper Text Markup Language
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
UNIT 1: INTRODUCTION TO HTML
1. What is HTML?
HTML is the standard markup language for creating Web pages.
HTML stands for Hyper Text Markup Language
HTML describes the structure of Web pages using markup
HTML elements are the building blocks of HTML pages
HTML elements are represented by tags
HTML tags label pieces of content such as "heading", "paragraph", "table",
and so on
Browsers do not display the HTML tags, but use them to render the content
of the page.
A sample program for HTML:
Example
<html>
<head>
<title>Page Title</title> </head>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>
What is Scripting Language?
A script language is a programming language that supports scripts: programs
written for a special run-time environment that automate the execution of tasks.
Scripting language are sometimes referred as very high programming
language. Some of the scripting language are pearl, python, java script.
What is Internet?
The Internet is the global system of interconnected computer networks that
use the Internet protocol suite (TCP/IP) to link devices worldwide.
A global computer network providing a variety of information and
communication facilities, consisting of interconnected networks using standardized
communication protocols.
A Brief Overview of TCP/IP and its Services:
• A TCP/IP is collection of protocols ,applications and services.There are five
layers within TCP/IP Protocol such as
➢ Application Layer
➢ Transport Layer
➢ Network Layer
➢ Data link Layer
➢ Physical Layer
Physical Layer:
The physical layer is pure hardware in any network infrastructure. This
includes cable, satellite or any connection medium and network interface card,
which transmits electrical signals and so on.
Data link Layer:
This is the layer that is responsible for splitting data into packets to be sent
across the connection medium such as cables, satellite and so on.
Network Layer:
This layer gets packets from the data link layer and sends them to the correct
network address. If more than one possible route is available for the data to travel,
the network layer figures out the best route.
Transport Layer:
The network layer routes the data to its destination, it cannot guarantee that
the packets holding data will arrive in the correct order.
The transport layer job is to make sure that the packets have no errors and
they received in the correct order.
Application Layer:
It contains the application that the user uses to send or receive data. Without
this layer the computer and its user would never be able to send the data.
Text Formatting:
HTML Tags:
An HTML tag is a signal to a browser that it should do something. All
HTML tags begin with an open angle bracket (<) and end with a close angle
bracket (>).
HTML tags can be two types:
• Paired Tags
• Singular Tags
Paired Tags:
A tag is said to be a paired tag if the text is placed between a tag and its
companion tag. In paired tags, the first tag is referred to as Opening Tag and the
second tag is referred to as Closing Tag.
Example: <i>this text is in italics. </i>
Singular Tags:
A Singular or Stand-Alone Tag does not have a companion tag. Singular tags are
also known as unpaired tag.
Example: <br> , <hr>
Commonly Used HTML Commands:
The Structure of the HTML program
An HTML document is a file containing Hypertext Markup Language,
and its filename most often ends in the .html extension. An HTML document is a
text document read in by a Web browser.
The entire web page is enclosed within <HTML></HTML> tags. Within
these tags two distinct sections are created using the <HEAD></HEAD> tags and
the <BODY></BODY> tags.
Document Head
By using head part you can provide following information related to that web page.
Provide title of that page.
Description about that page.
The html tags used to indicate the start and of the head section. The title tags are
used within this head tags.
Example:
<HEAD><TITLE>WEB PAGE TITLE</TITLE></HEAD>
Document Body
Body part contains the actual information which is display on web page. The
tags used to indicate the start and end of the main body of textual information.
<BODY> .............</BODY>
TITLE:
A web page could have a title that describes what the page is about without
being too wordy. This can be achieved by using the TITLE tag. Text include
between the <TITLE>.....</TITLE> tag shows up in the title bar of the browser
window.
Example:
<TITLE>.... </T ITLE>
TEXT FORMATTING:
• Paragraph breaks
• Line breaks
Paragraph breaks:
A blank line always separate paragraphs in textual material. On encountering
this tag the browser, moves onto a new line, skipping one line between the
previous line and the new line.
Example:
<p>this is the first paragraph of text.
This is the first paragraph of text.</p> <p>this is the second paragraph.
This is the second paragraph.</p>
Output:
This is the first paragraph of text. This is the first paragraph of text. This is the
second paragraph. This is the second paragraph.
Line Breaks:
When text needs to start from a new line and not continue on the same line
(without skipping a blank line). The <br> tag should be used. The tag simply
jumps to the start of the next line.
Example:
SRM University,<br>Ramapuram,<br>Chennai<br>
Output:
SRM University,
Ramapuram, Chennai.
Heading Styles
The <h1> to <h6> tags are used to define HTML headings.<h1> defines the most
important heading. <h6> defines the least important heading.
Example:
The six different HTML headings:
<h1>This is heading 1</h1>
<h2>This is heading 2</h2>
<h3>This is heading 3</h3>
<h4>This is heading 4</h4>
<h5>This is heading 5</h5>
<h6>This is heading 6</h6>
<Hr> tag
The <hr> tag represents a horizontal rule. In HTML, the <hr> tag has no end
tag.
Attribute Value Description
align left
center
right
Specifies the alignment of a <hr> element
size pixels Specifies the height of a <hr> element
width Pixels % Specifies the width of a <hr> element
Text Styles:
• Bold
• Italics
• Underline
Bold:
Display the text in BOLDFACE style. The tags used are <b>... </b>
Example:
<b>This text is bold</b>
Output:
This text is bold
Italics:
Display the text in italics. The tags used are <i>... </i>
Example:
<i>this text is italics</i>
Output:
this text is italics
Underline:
Display the text as Underlined, The tags used are <u>... </u>
Example:
<u>Welcome to our home page</u>
Output:
Welcome to our home page
Centering
<center>...</center> tags are used to center everything found between them – text,
lists, images, rules, tables or any other page element.
Example:
<Center>Welcome to our home page</Center>
Output:
Welcome to our home page
Font tag:
Specify the font size, font face and color of text.
Example:
<font face="verdana" size="22" color="green">This is some text!</font>
Output:
This is some text!
Lists:
There are three list types in HTML:
• Unordered List
• Ordered List
• Definition List
Unordered List:
It used to group a set of related items in no particular order. An unordered
list starts with the <ul> tag and end with </ul>tag. Each list item starts with the
<li> tag.
Example:
<ul>
<li>Coffee</li> <li>Tea</li> <li>Milk</li> </ul>
Output:
o Coffee o Tea o Milk
Ordered list:
It used to group a set of related items, in a specific order. An ordered list,
created using the <ol> tag, and each list item starts with the <li> tag. Ordered list
contain information where order should be emphasized.
Example:
<ol type="A">
<li>Coffee</li> <li>Tea</li> <li>Milk</li> </ol>
Output:
A. Coffee B. Tea C. Milk
Definition List:
Definition List values appear within tags <dl>...</dl>. It consists of two
parts:
Definition Term Appears after the tag. Definition Description Appears after the