Satish Mulgi Satishkumarmulgi@dypvp - Edu.in
Satish Mulgi Satishkumarmulgi@dypvp - Edu.in
Satish Mulgi Satishkumarmulgi@dypvp - Edu.in
Introduction
Satish Mulgi
smulgi7@gmail.com
satishkumarmulgi@dypvp.edu.in
HTML Introduction
🠶 HTML stands for Hyper Text Markup Language
🠶 HTML is 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
🠶 <!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
</body>
</html>
🠶 The <!DOCTYPE html> declaration defines that this document 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, 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
🠶 The <p> element defines a paragraph
Common Html Tags
Html Tag: <html> …</html>
🠶 The <html> tag represent the root of an html document
🠶 The <html> tag tells the browser that this is an html document
🠶 All other html tags are nested between the <html> and </html>
Head Tag: <head>..</head>
🠶 It is used for indicating the head section of html document
🠶 The head tag includes a title for the document, scripts, styles and so on
Title Tag: <title> .. </title>
🠶 The title tag is used for declaring title of the html document
🠶 The title usually displayed in the browsers title bar (at the top)
🠶 The title tag is placed between the opening and closing head tag
Body Tag: <body> … </body>
🠶 The body tag define the document body
🠶 The body tag is used for indicating the main content section of html document
🠶 The body tag contains all the content of html document such as text, images, lists, tables, hyperlink etc.
Attributes of Body Tag:
🠶 Bgcolor: specifies the background color for a web page
🠶 e.g. <body bgcolor=red> .. </body>
🠶 Background: specifies a background image of a web page
🠶 e.g. <body background=“ path of image file”>..</body>
🠶 Text: Specifies color of text for a web page
🠶 e.g. <body text=Yellow>..</body>
🠶 Link: specifies the color of unvisited links of a web page
🠶 e.g. <body link=blue> .. </body>
🠶 Vlink: specifies the color of visited links of a web page
🠶 e.g. <body vlink=green>.. </body>
What is an HTML Element and Attributes ?
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>
HTML Attributes
🠶 All HTML elements can have attributes
🠶 Attributes provide additional information about elements
🠶 Attributes are always specified in the start tag
🠶 Attributes usually come in name/value pairs like: name="value“
🠶 The <a> tag defines a hyperlink. The href attribute specifies the URL of the page the link goes to:
<a href="https://google.com">Visit Google Site </a>
🠶 The <img> tag is used to embed an image in an HTML page. The src attribute specifies the path to
the image to be displayed:
<img src="img_girl.jpg“ width="500" height="600">
HTML Headings & Paragraphs
HTML bookmarks are used to allow readers to jump to specific parts of a Web page. Bookmarks can be useful if your webpage is
very long. To make a bookmark, you must first create the bookmark, and then add a link to it. When the link is clicked, the page will
scroll to the location with the bookmark.
Then, add a link to the bookmark ("Jump to Chapter 4"), from within the same page:
<a href="#C4">Jump to Chapter 4</a>
Assignments
🠶 Create an html5 page which will display names of your family members on separate lines in different sizes. State
size of each line in its text.
🠶 Create an html5 page which will display names of players of Indian cricket team with all the different text styles
(bold, italic and underlined) and its combinations on separate lines. State style of each line in its text.
🠶 Create an html5 page containing the polynomial expression as follows
ao + a1x+ a2x2 + a3 x3
🠶 Create an html5 page with following specifications
🠶 Title should be about MYCOLLEGE
🠶 Put the windows Logo image in the background
🠶 Place your College name at the top of the page in large text followed by address in smaller size
🠶 Add names of courses offered each in a different color, style and typeface.
🠶 Add scrolling text with a message of your choice
🠶 Add college image at the bottom
🠶 Create an html5 page with following specifications
🠶 Title should be about MYCITY
🠶 Place your City name at the top of the page in large text and in blue color
Creating List through HTML
🠶 HTML offers web authors three ways for specifying lists of information.
🠶 All lists must contain one or more list elements. Lists may contain −
❑ <ul> − An unordered list. This will list items using plain bullets.
🠶 <ol> − An ordered list. This will use different schemes of numbers to list your items.
<dl> − A definition list. This arranges your items in the same way as they are arranged in a dictionary.
🠶 HTML Unordered Lists (<ul>):
🠶 An unordered list is a collection of related items that have no special order or sequence. This list is created by using
HTML <ul> tag. Each item in the list is marked with a bullet.
🠶 The type Attribute:
🠶 You can use type attribute for <ul> tag to specify the type of bullet you like. By default, it is a disc. Following are the
possible options −
🠶 <ul type = "square">
🠶 <ul type = "disc">
🠶 <ul type = "circle">
Creating List through HTML
🠶 HTML Ordered Lists:
🠶 If you are required to put your items in a numbered list instead of bulleted, then HTML ordered list will be used. This list is
created by using <ol> tag. The numbering starts at one and is incremented by one for each successive ordered list element
tagged with <li>.
🠶 The type Attribute:
🠶 You can use type attribute for <ol> tag to specify the type of numbering you like. By default, it is a number. Following are
the possible options −
🠶 <ol type = "1"> - Default-Case Numerals.
🠶 <ol type = "I"> - Upper-Case Numerals.
🠶 <ol type = "i"> - Lower-Case Numerals.
🠶 <ol type = "A"> - Upper-Case Letters.
🠶 <ol type = "a"> - Lower-Case Letters.
🠶 The start Attribute:
🠶 You can use start attribute for <ol> tag to specify the starting point of numbering you need. Following are the possible
options −
🠶 <ol type = "1" start = "4"> - Numerals starts with 4.
🠶 <ol type = "I" start = "4"> - Numerals starts with IV.
🠶 <ol type = "i" start = "4"> - Numerals starts with iv.
🠶 <ol type = "a" start = "4"> - Letters starts with d.
🠶 <ol type = "A" start = "4"> - Letters starts with D.
Creating List through HTML
🠶 HTML Definition Lists:
🠶 HTML supports a list style which is called definition lists where entries are listed like in a dictionary
or encyclopedia. The definition list is the ideal way to present a glossary, list of terms, or other
name/value list.
🠶 Definition List makes use of following three tags.
🠶 <dl> − Defines the start of the list
🠶 <dt> − A term
🠶 <dd> − Term definition
🠶
Assignments
🠶 Write a HTML code to generate the following output
🠶 Undergraduate Courses
🠶 BBA(CA)
🠶 BCA(Science)
🠶 B.Sc.(Computer Science)
🠶 Post Graduate Courses
🠶 M.Sc.(Comp.Sci.)
🠶 M.Sc.(CA)
🠶 MCA
🠶 Write a HTML code to generate the following output
🠶 Flowering Plant
1. Rose
2. Lily
3. Jasmin
🠶 Non Flowering Plant
1. Fern
2. Spore
Creating Tables through HTML
🠶 The HTML <table> tag is used for defining a table. The table tag contains other tags that define the structure
of the table. The <table> tag defines an HTML table.
🠶 An HTML table consists of the <table> element and one or more <tr>, <th>, and <td> elements.
🠶 The <tr> element defines a table row, the <th> element defines a table header, and the <td> element defines a
table cell.
🠶 Specific Attributes:
Attribute Value Description
RS Paise
Price
Book_No Book_Name
RS Paise
🠶 Create HTML page to Divide the frames in to different sections as shown below and add
appropriate HTML files to each frame.
IT Industries in INDIA
City Pune
1. Pune ∙ Infosys
2. Mumbai ∙ Persistent