0% found this document useful (0 votes)
2 views

Chapter -2 HTML5

HTML5 is the standard markup language for creating web pages, defining their structure and content. Key elements include the document declaration, header tags, hyperlinks, images, audio and video tags, lists, tables, and forms, each serving specific functions in web development. The document outlines the syntax and attributes for these elements, providing a foundational understanding for building web pages.

Uploaded by

premdandin01
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Chapter -2 HTML5

HTML5 is the standard markup language for creating web pages, defining their structure and content. Key elements include the document declaration, header tags, hyperlinks, images, audio and video tags, lists, tables, and forms, each serving specific functions in web development. The document outlines the syntax and attributes for these elements, providing a foundational understanding for building web pages.

Uploaded by

premdandin01
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

HTML5-Introduction

HTML stands for Hyper Text Markup Language. It is


used to design the structure of web pages.HTML tells
the web browser how to display the content on web
page. Example, headings,images,lists etc.
Structure of HTML5
<!DOCTYPE html>
<html>
<head>……..</head>
<title>………</title>
<body>
content
</body>
</html>
1. <!DOCTYPE html> - This declaration defines that this
document is an HTML5 document.
2. <html></html> - Every HTML program must begin with
<html> opening tag and must close with </html> tag.
3. <head> </head> - This tag must include a specific
heading for the program.
4. <title></title> - It indicates the name given to web page.
5. <body></body> - It is used to define main content of the
html document which includes text,images,link etc.
Header Tags
The <header> tag in HTML is used to define the header
for a document or a section as it contains the
information related to the title and heading of the
related content.
The <Header> element contains:
• Heading elements (h1 to h6) that allow us to change
the size of document.
• h1 is largest font size.
• h6 is smallest font size.
Marquee Tag.
• An HTML marquee is a scrolling piece of text
displayed either horizontally across from left to
right, right to left or vertically down your webpage
depending on the settings.
• This is created by using HTML <marquee> tag.
• By default marquee tag will scroll the text from
right to left.
Syntax:
<marquee attribute_name=“attribute_value”>
content
</marquee>
Font tag
The font tag is used to change the color, size, and style
of a text.
Syntax: <font attribute = "value"> Content </font>
Attributes are color, face, size.
Hyperlink in html
• Hyperlink allows the user to link to a particular website.
• The HTML <a> tag defines a hyperlink.
• The <a> tag indicates where the hyperlink starts and the
</a> tag indicates where it ends. Whatever text gets
added inside these tags, will work as a hyperlink.
• Syntax: <a href="url">link text</a>
• Ex : <a href=“https://www.google.com”>visit google
website</a>
Image Tag.
HTML img tag is used to display image on the web page.
HTML img tag is an empty tag that contains attributes only,
closing tags are not used in HTML image element.
Images are not technically inserted into a web page; images
are linked to web pages.
<img> tag is the image tag in HTML.
It has two attributes:
1. src – Indicates path of image where image is saved.
2. alt – Allows user to give alternate name to image.
<img> tag has width, height as two properties for changing
height and width of image.
Meter tag
• The <meter> tag defines a scalar measurement within
a known range, or a fractional value.
• Examples: Disk usage.
• The <meter> tag should not be used to indicate
progress (as in a progress bar).
Audio and Video tag
Audio tag is used to embed sound content in html document
such as music. Various audio file formats are .mp3, .wav etc.
Video tag – Video tag is used to embed video files in the html
document. Various video file formats are .mp4, .ogg.
Audio and video tag attributes
• src - Specifies the URL of the audio file.
• controls - Specifies that audio controls should be
displayed (such as a play/pause button etc).
• type – indicates type of audio file.
Lists in html.
Html lists are defined as group of related items.
Html lists are of 3 types:
1. Ordered list.
2. Unordered list.
3. Description list.
1. Ordered list – Items in the list are displayed in
numbered form.It starts with <ol> tag and ends with
</ol> tag.
Other types of number form that are used with <ol>
types are:
1) I,II,III. 4) A,B,C.
2) i,ii,iii.
3) a,b,c.
2. Unordered list.
• Items in the list are displayed in non - numeric form.It
starts with <ul> tag and ends with </ul> tag.
• Other types of number form that are used with <ul>
types are:
square, circle,bullet,none.
3. Description list – It is list of terms with a description
of each term. It starts with <dl> tag and ends with </dl>
tag.
<dl> tag – description list.
<dt> tag – defines term name/head.
<dd> tag – provides in brief description about term.
Tables in html.
• Tables allow web developers to arrange data in terms of rows
and columns.
• Each table is collection of cells which stores data.
Tags used in html table:
1. <table> - defines a html table.
2. <th> - defines table header.
3. <tr> - defines a row in table.
4. <td> - defines a cell in table that contains data.
5. <caption> - allows to add heading to entire table.
Attributes in html table:
1. Border - Adds a border to a table in html.
2. Cellpadding - Allows to adjust the distance/white spaces
between cell borders and the data in the cell.
3. Cellspacing - Allows to adjust the space between the cells of
a table.
4. Table border color - Add color to border of table.
5. Width and height - Allows to adjust width and height of
table.
HTML FORMS
• Html forms are used to collect data of a user as input for
processing.
• To create an html form we use <form> element, along with
closing tag </form>.
• This <form> element is a collection of various types of
<input> elements.
• The <input> element can be displayed in various ways based
on type attribute.
• <label> - This element is used to give labels for various
elements in the form.
Meter tag
It defines scalar measurement within a known range. It uses
properties min, max.
Example: Disk usage.

You might also like