0% found this document useful (0 votes)
18 views16 pages

Lec 4

The document discusses HTML and its basic structure and tags. It describes how HTML is used to define the content and structure of web pages using tags. It also covers common tags for text formatting, headings, images, and forms.

Uploaded by

lahelex741
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views16 pages

Lec 4

The document discusses HTML and its basic structure and tags. It describes how HTML is used to define the content and structure of web pages using tags. It also covers common tags for text formatting, headings, images, and forms.

Uploaded by

lahelex741
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 16

Lecture 4

HTML
DA3330 - Business Application Development
Supun Gothama
Introduction
• Hyper Text Markup Language, or HTML is the markup
language used to create Web pages
• Defines the content of the page by using a special
markup
• All web applications and web pages are created using
HTML
• Latest version is HTML 5
Introduction
• HTML files are saved in .html or .htm files
• Can be written in using a text editor
• Any standard web browser can interpret HTML and
display the content
Tags
• The essence of HTML is tags

• A tag is a keyword enclosed by angle brackets


− Example: <p>

• There are opening and closing tags


− The affected text is between the two tags
− Example: <p>Hello</p>
Tags
• Whenever you have HTML tags within other HTML tags,
you must close the nearest tag first
• Example:
<p> <b>Bold text</b> </p>
Structure of a Web Page
• All Web pages share a common structure
• All Web pages should contain a pair of
− <html>
− <head>
− <title>
− <body> tags
Structure of a Web Page
<html>
<head>
<title> Let’s learn HTML </title>
</head>
<body>
content of the web page
</body>
</html>
Structure of a Web Page
• Head
− Appears before the body element
− Contains information about the page
− Does not appear in the browser window
• Title
− Defines the title of the HTML page
• Body
− All the visual content of the page should be within the body
Formatting
• <b> Bold text </b>
• <i> Italics </i>
• <u> underline </u>
• <p> new paragraph </p>
• <br> next line
Headings

• <h1> Headings </h1>


• <h2> Headings </h2>
• ..
• <h7> Headings </h7>
Images
<img src="path/to/image.jpg" />

• src is an attribute of img tag


− Should be a URL of an image
• The width and height attributes can be used to adjust
the size of an image
<img src="image.jpg" width="100" height="50"/>
Forms
• An HTML form is an area of the document that allows
users to enter information into fields
• A form may be used to collect personal information,
user preferences and other kinds of information
• A programming language script would be required to
process the information
Forms
Forms
• Elements of a form should be surrounded by a <form> tag
• Text input:
<input type="text" />
• Number input:
<input type="number" />
• Button:
<button>Click here</button>
Other Tags
Refer internet for the documentations of all available
HTML tags

• https://www.w3schools.com/html/default.asp
• https://htmldog.com/guides/html/
☑ HTML

☑ Tags

☑ Forms

Summary

You might also like