CSE326 Lec2

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 17

1

CSE326
Internet Programming Laboratory
Lecture #2
2
Dr. Navneet Kaur, Lovely
Professional University

Outline
 Difference between tag and an element
 Attribute
 <!DOCTYPE html>
 meta tag
 Horizontal rules
 Line breaks
 Citations
 Quotations
 Definitions
3

Difference between tag and an


element
Tag:
<></>
 Any text written inside the angle brackets is a tag.
 The text inside the angle brackets is just used to tell the
browser how to display or transform regular text located
between the opening tag and the closing tag.
Element:
 An element is an opening tag, a closing tag, and all the
content that is included between the two tags.
<tag attribute=“”></tag >
4

Attribute
 These are additional values that configure the elements or
adjust their behavior in various ways to meet the criteria the
users want.
<html lang=“en”>
</html>
5

<!DOCTYPE html>
 This is a special declaration that helps the browser display
the page correctly by telling it the type of code we’re writing
(in this case it’s HTML5).
 It should appear once at the start of the document before any
other elements.
 This is a special element that doesn’t require a closing tag.
 This ensures that the web page is parsed the same way by
different web browsers.

<!DOCTYPE html>
6

meta tag
 Meta tag provides information about a webpage.

<head> Unicode Transformation


Format
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-
scale=1.0">
</head>
7

meta tag
 Meta data is represented by the <meta> tag.

<meta name="description" content="This is the description of


your webpage. It provides a brief overview of the content on the
page.">

 This provides the information about the HTML document

 Meta data is used by the browsers and search engines.

<meta name="keywords" content="keyword1, keyword2,


keyword3">

<meta name="author" content="John Doe">


8

 <meta charset="UTF-8">

 Character set:
You can also provide the character encoding information
that is used in the document by <meta>tag.
9

Horizontal rules
 The <hr> tag defines a thematic break in an HTML page.
 It is also called as the horizontal rule.

<hr>

section break
10

Line breaks
 The <br> tag inserts a single line break.
<br>
 It is generally used in poem or address where the division
of line is necessary
11

Quotations
 The Quotation elements in HTML are used to insert quoted
texts in a web page, that is the portion of texts different from
the normal texts in the web page.
<q> </q>
<blockquote> </blockquote>
12

<blockquote> ….. </blockquote>


 whereas for long quotation we are going to use HTML tag
called as <blockquote> ….. </blockquote>.
 This tag is specially used to indicate text on web browsers
differently from normal text.
 <blockquote>tag is used in HTML to represent block-level
quote in webpage document.

Those tags are most useful for styling purposes because they
distribute your web page’s flow into different sections.
13

Citations
 The <cite> HTML element is used to mark up the title of a
cited creative work.
A book
A research paper
An essay
A poem
A musical score
A song

The text in the <cite> element usually renders in italic.


<p><cite>Scenery</cite> by Isha. Painted in 2024.</p>
14

Definitions
 The <dfn> HTML element is used to indicate the term being
defined within the context of a definition phrase or sentence.
15

References
 https://www.w3schools.com/html/html_elements.asp
 https://www.w3schools.com/html/html_attributes.asp
 https://www.w3schools.com/tags/tag_doctype.asp
 https://www.w3schools.com/tags/tag_meta.asp
 https://www.w3schools.com/tags/tag_hr.asp
 https://www.w3schools.com/tags/tag_br.asp
 https://www.w3schools.com/html/html_quotation_elements.a
sp
 https://www.w3schools.com/tags/tag_dfn.asp
16

Program link
 https://onecompiler.com/html/3zjgr9vhe
17
Dr. Navneet Kaur, Lovely Profession
al University

Thank you

You might also like