Unit 5
Unit 5
Applications of HTML
HTML is used for various purposes. Let us take a look at them
1. Web Pages Development
HTML is famously used for creating web pages on the world wide web. Every web
page contains a set of HTML tags and hyperlinks which are used to connect other
pages. Every page on the internet is written using HTML.
2. Navigating the Internet
Navigating on the internet would have been quite a tedious task without HTML. The
anchor tags of HTML allows us to link pages and navigate easily. Imagine our life
without anchor tags, you would literally have to enter URL everytime. Using achor
tags, you can also navigate within a webpage.
3. Embedding Images and Videos
HTML allows us to embed images and videos with ease and gives us features to adjust
height, position and even rendering type. You can adjust controls, thumbnails,
timestamps and much more for videos. Earlier this was done using Flash and HTML
has made it easier with the help of <video> tag.
4. Clinet-side storage
HTML5 has made client-side storage possible using localStorage and IndexD due to
which we no longer need to reply on Cookies. Both of these tactics have their own set
of rules and characteristics. String-based hash-table storage is provided by localStorage.
Its API is straightforward, with setItem, getItem, and removeItem functions available to
developers. On the other hand, IndexDB is a larger and more capable client-side data
store. With the user’s permission, the IndexDB database can be enlarged.
5. Game development
Although you cannot create complex high-end video games with HTML, the <canvas>
element of HTML can be used to make 2D and 3D games using CSS and JavaScript
which can be run on browsers.
6. Data entry support
With the usage of new HTML5 standards in all the latest browsers, developers can
simply add the tags for required fields, text, data format, etc. and get the data. HTML5
now has several new attributes for data-entry and validation purposes.
7. Interacting with Native APIs
With the help of HTML, you can interact with your Operating system. With this
feature, you can easily drag files onto a web page to upload, full-screen a video, and
much more.
Features Of HTML
The learning curve is very easy (easy to modify)
Creating effective presentations
Adding Links wherein we can add references
Can display documents on platforms like Mac, Windows, Linux, etc
Adding videos, graphics, and audios making it more attractive
Case insensitive language
HTML Editor
Simple editor: Notepad
Notepad++
Atom
Best editor: Sublime Text
HTML Skeleton
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
</body>
</html>
HTML Basic
<!DOCTYPE html>
Instruction to the browser about the HTML version.
<html>
Root element which acts as a container to hold all the code
The browser should know that this is an HTML document
Permitted content: One head tag followed by one body tag
<head>
Everything written here will never be displayed in the browser
It contains general information about the document
Title, definitions of CSS and script sheets
Metadata(information about the document)
<body>
Everything written here will be displayed in the browser
Contains text, images, links that can be achieved through tags
Examples:
○ <p> This is our first paragraph. </p>
○ <a href=”http://www.google.com”>Go To Google</a>
○ <img src=”photo.jpg”>
Block Level
○ Takes up full block or width and adds structure in the web page
○ Always starts from the new line
○ Always end before the new line
○ Example:
■ <p >
■ <div>
■ <h1>…<h6>
■ <ol>
■ <ul>
Inline Level
○ Takes up what is requires and adds meaning to the web page
○ Always starts from where the previous element ended
○ Example :
■ <span>
■ <strong>
■ <em>
■ <img>
■ <a>
Now you can enroll for free to online HTML course in hindi
HTML Attributes
Properties associated with each tag is called an Attribute.
<tag name=”value”></tag> is the structure.
There are some Global Attributes that can be applied to all the tags.
o Title: Add extra information (hover)
o Style: Add style information(font,background,color,size)
There are some attributes that can be applied to specific tags.
o <img src=” URL” width=”100” height=”70” alt=” File cannot be loaded”>
o src is the attribute used in image tag to define the path
o Width is an attribute used to define width in pixels
o Height is an attribute used to define width in pixels
o Alt i.e alternate text if an image is not loaded
Name of the link
o href is used for defining the path of the link
o color is used to set the color of the horizontal line drawn on the webpage.
HTML Tags
Enclosed within <>
Different tags render different meanings.