HTML 74
HTML 74
HTML 74
Image map lets you link to many different web pages using a single
image. You can define shapes in images that you want to make part
of an image mapping.
6) How to create a Hyperlink in HTML?
The HTML provides an anchor tag to create a hyperlink that links one page to
another page. These tags can appear in any of the following ways:
Semantic HTML is a coding style. It is the use of HTML markup to reinforce the
semantics or meaning of the content. For example: In semantic HTML <b> </b> tag
is not used for bold statement as well as <i> </i> tag is used for italic. Instead of
these we use <strong></strong> and <em></em> tags.
The HTML iframe tag is used to display a nested webpage. In other words, it
represents a webpage within a webpage. The HTML <iframe> tag defines an inline
frame. For example:
<!DOCTYPE html>
<html>
<body>
<h2>HTML example</h2>
Use the height and width attributes to specify the size of the iframe:
<iframe src="https://www.edureka.co/" height="300" width="400"></iframe>
</body>
</html>
HTML layout specifies a way in which the web page is arranged. Every website has
a specific layout to display content in a specific manner. Following are
different HTML elements which are used to define the different parts of a webpage:
Marquee is used for the scrolling text on a web page. It scrolls the image or text up,
down, left or right automatically. You should put the text which you want to scroll
within the <marquee>……</marquee> tag.
<br> tag – Usually <br> tag is used to separate the line of text. It breaks the current
line and conveys the flow to the next line
<p> tag – This contains the text in the form of a new paragraph.
<blockquote> tag – It is used to define a large quoted section. If you have a large
quotation, then put the entire text within <blockquote>……….</blockquote> tag.
The difference between span and div is that a span element is in-line and usually
used for a small chunk of HTML inside a line,such as inside a paragraph. Whereas,
a div or division element is block-line which is equivalent to having a line-break
before and after it and used to group larger chunks of code.
Example:
<div id="HTML">
This is <span class="Web Dev">interview</span>
</div>
The purpose of using alternative texts is to define what the image is about. During an
image mapping, it can be confusing and difficult to understand what hotspots
correspond to a particular link. These alternative texts come in action here and put
description at each link which makes it easy for users to understand the hotspot links
easily.
13) What is the use of an iframe tag?
The HTML character entities are used as a replacement for reserved characters in
HTML. You can also replace characters that are not present on your keyboard by
entities. These characters are replaced because some characters are reserved in
HTML.
Yes, we can create a multi-colored text on a web page. To create a multicolor text,
you can use <font color =”color”> </font> for the specific texts that you want to color.
To make a picture a background image on a web page, you should put the following
tag code after the </head> tag.
Here, replace the “image.gif” with the name of your image file which you want to
display on your web page.
HTML SVG is used to describe the two-dimensional vector and vector or raster
graphics. SVG images and their behaviors are defined in XML text files. So as XML
files, you can create and edit an SVG image with the text editor. It is mostly used for
vector type diagrams like pie charts, 2-Dimensional graphs in an X, Y coordinate
system.
<svg width="100" height="100">
<circle cx="50" cy="50" r="40" stroke="yellow" stroke-
width="4" fill="red" />
</svg>
The button tag is used in HTML 5. It is used to create a clickable button within the
HTML form on the web page. This tag creates a “submit” or “reset” button. The
button tag code is as follows:
HTML supports a wide range of media formats for sound, music, videos, movies, and
animations. Some of the extensions supported by each media format are:
Images– png, jpg, jpeg, gif, apng, svg, bmp, BMP ico, png ico
Audio– MIDI, RealAudio, WMA, AAC, WAV, Ogg, MP3, MP4
Video– MPEG, AVI, WMV, QuickTime, RealVideo, Flash, Ogg, WebM, MPEG-4 or
MP4
Cell Spacing is referred to as the space or gap between the two cells of the same
table. Whereas, Cell Padding is referred to as the gap or space between the content
of the cell and cell wall or cell border.
Example:
Inline CSS: It is used for styling small contexts. To use inline styles add the style
attribute in the relevant tag.
External Style Sheet: This is used when the style is applied to many pages. Each
page must link to the style sheet using the <link> tag. The <link> tag goes inside the
head section.
<head>
<link rel="stylesheet" type="text/css" href="mystyle.css" />
</head>
Internal Style Sheet: It is used when a single document has a unique style. Internal
styles sheet needs to put in the head section of an HTML page, by using
the <style> tag in the following way:
<head>
<style type="text/css">
hr {color:sienna}
p {margin-left:20px}
body {background-image:url("images/back40.gif")}
</style>
</head>
Inline
Certain HTML elements allow you to execute a piece of JavaScript when a certain
event occurs. For example, a button allows you to run a script when you click on it.
These events are accessed through attributes and differ based on the events that
are available on each element. Here is an example that shows an alert with a
message when the user clicks on it:
Script block
You can define a script block anywhere on the page, which will get executed as soon
as the browser reaches that part of the document. This can be inside the <head> or
<body> section of your document.
<script>
var x = 5;
var y = 6;
var result = x + y;
alert(“X + Y is equal to " + result);
</script>
It allows you to keep the content of the page separate to how users interact with that
content. Also, it allows you to load the same script on multiple pages. As with the
script block, you can load a JavaScript file from the <head> or <body>.
<script src="my-code.js"></script>
24) What is HTML – META TAGS
Tag Description
Practical