119430
119430
HTML- HyperTextMarkupLanguage,
Becomeawebdesigner- If you want to start acareeras a professional web designer, HTML and
CSS designing is a must skill.
Understandweb - If you want to optimize your website, to boost its speed and performance, it is
good to know HTML to yield best results.
Learnotherlanguages- Once you understands the basic of HTML then other related
technologies like javascript, php, or angular are become easier to understand.
Applications of HTML
Webpagesdevelopment- HTML is used to create pages which are rendered over the web.
InternetNavigation- HTML provides tags which are used to navigate from one page to
another and is heavily used in internet navigation.
ResponsiveUI- HTML pages now-a-days works well on all platform, mobile, tabs, desktop or
laptops owing to responsive design strategy.
OfflinesupportHTML pages once loaded can be made available offline on the machine
without any need of internet.
Gamedevelopment- HTML5 has native support for rich experience and is now useful in
gamingdevelopmentarena as well.
HTMLElements
An HTML file is made of elements.
These elements are responsible for creating web pages and define content in that webpage. An
element in HTML usually consist of a start tag <tag name>, close tag </tag name> and content
inserted between them.
some elements does not have content and end tag such elements are known
asVoidelementsoremptyelements. These elements are also called asunpairedtag.
Some Voidelementsare<br>(representsalinebreak),<hr>(representsahorizontalline),etc.
Block-levelandInlineHTMLelements
For the default display and styling purpose in HTML, all the elements are divided into two
categories: Block-level element, Inline element
Block-levelelement:
• These are the elements, which structure main part of web page, by dividing
a page into coherent blocks.
• A block-level element always start with new line and takes the full width of web page,
from left to right.
• These elements can contain block-level as well as inline elements.
Followingaretheblock-levelelementsinHTML.
<address>, <article>, <aside>, <blockquote>, <canvas>, <dd>, <div>, <dl>, <dt>, <fieldset>,
<figcaption>, <figure>, <footer>, <form>, <h1>-<h6>, <header>, <hr>, <li>, <main>, <nav>,
<noscript>, <ol>, <output>, <p>, <pre>, <section>, <table>, <tfoot>, <ul> and <video>.
Inlineelements:
• Inline elements are those elements, which differentiate the part of a given text and
provide it a particular function.
• These elements does not start with new line and take width as per requirement.
• The Inline elements are mostly used with other elements.
<a>, <abbr>, <acronym>, <b>, <bdo>, <big>, <br>, <button>, <cite>, <code>, <dfn>, <em>, <i>,
<img>, <input>, <kbd>, <label>, <map>, <object>, <q>, <samp>, <script>, <select>,
<small>,<span>,<strong>, <sub>, <sup>, <textarea>, <time>, <tt>, <var>.
Example:
<!DOCTYPE html>
<html>
<head><title>Example</title>
</head>
<body>
<ahref="[Link] on link</a>
<spanstyle="background-color: lightblue">
this is inlineelement </span>
<p>This will take width of text only</p>
</body>
</html>
HTMLFormatting
• processof formatting text for better look and feel.
• HTML provides us ability to format text without using CSS.
• These tags are used to make text bold, italicized, or underlined. There are almost 14
options available that how text appears in HTML and XHTML.
InHTMLtheformattingtagsaredividedintotwocategories:
Physicaltag:These tags are used to provide the visual appearance to the text.
Logicaltag:These tags are used to add some logical or semantic value to the text.
Element Description
name
<b> This is a physical tag, whichis used to bold the textwritten
between it.
<strong> This is a logical tag, whichtells the browser that the textis
important.
HTMLHeading
A HTML heading or HTMLhtag can be defined as a title or a subtitle which you want to display on
the webpage.
When you place the text within the heading tags <h1>.........</h1>, it is displayed on the browser
in the bold format and size of the text depends on the number of heading.
There are six different HTML headings which are defined with the <h1> to <h6> tags, from
highest level h1 (main heading) to the least level h6 (least important heading).
h1 is the largest heading tag and h6 is the smallest one. So h1 is used for most important heading
and h6 is used for least important.
HTML Paragraph
HTML paragraph or HTML p tag is used to define a paragraph in a webpage.
It is a notable point that a browser itself add an empty line before and after a paragraph.
An HTML <p> tag indicates starting of new paragraph
<p>
I am
going to provide
you a tutorial on HTML
and hope that it will
be very beneficial for you.
</p>
<p>
Look, I put here a lot
of spaces but I know, Browser will ignore it.
</p>
<p>
You cannot determine the display of HTML</p>
<p>because resized windows may create different result.
</p>
An HTML<hr>tagis used to apply a horizontal line between two statements or two paragraphs.
HTML Phrase tag
The HTML phrase tags are special purpose tags, which defines the structural
meaning of a block of text or semantics of text.
When you use the<dfn>and</dfn>tags, it allow to specify the keyword of the content.
<blockquotecite="[Link]
The first step toward success is taken when you refuse to be a captive of t he environment in
which you first find yourself.?</p></blockquote>
<cite>-Mark Caine</cite>
An HTML<q>.......</q>element defines a short quotation. If you will put any content between
<q> ....... </q>, then it will enclose the text in double quotes.
The HTML<code></code>element is used to display the part of computer code. It will display
the content in monospaced font.
HTML Anchor
The HTMLanchortagdefinesahyperlinkthatlinksonepagetoanotherpage. It can create hyperlink to
other web page as well as files, location, or any URL. The "href" attribute is the most important
attribute of the HTML a tag. and which links to destination page or URL.
The href attribute is used to define the address of the file to be linked.
If we want to open that link to another page then we can usetargetattributeof <a> tag. With the
help of this link will be open in next page.
The targetattribute can only use with href attribute in anchor tag. If we will not use
target attribute then link will open in same page.
<ahref="[Link]
(bye-mailonly)</a>
<ahref="#section1">GotoIntroduction</a>
<h2id="section1">Introduction</h2>
<ahref="[Link]#section3.1.1">GotoSection3.1.1</a>
<!–-[Link]-->...
<divid="section3.1.1">
<h3>[Link]</h3></div>
<!--Thedocumenttextfollowshere-->
<h2id="section1">Introduction</h2>...Section1followshere...
<h2id="section2">Somebackground</h2>...Section2followshere...
<h3id="section2.1">ProjectHistory</h3>...Section2.1followshere...
Images:<img>
Inserting an image with <img> tag:
<imgsrc="/img/[Link]">
Image attributes:
src Location of image file (relative or absolute)
alt Substitute text for display (e.g. in text mode)
height Number of pixels of the height
width Number of pixels of the width
border Size of border, 0 for no border
We can create a table to display data in tabular form, using <table> element, with the
help of <tr> ,<td>, and <th> elements.
In Each table, table row is defined by <tr> tag, table header is defined by <th>, and table
data is defined by <td> tags.
• Table rows split into three semantic sections: header, body and footer
–<thead>denotes table header and contains <tr> and <th>elements instead
of<td>elements
–<tbody>denotes collection of table rows that contain the very data
–<tfoot>denotes table footer but comes BEFORE the<tbody>tag
–<colgroup>and <col>define columns (most often used to set column widths)
Complete HTML Table: Example
<table>
<colgroup>
<col style="width:100px" /><col />
</colgroup>
<thead>
<tr><th>Column 1</th><th>Column 2</th></tr>
</thead>
<tfoot>
<tr><td>Footer 1</td><td>Footer 2</td></tr>
</tfoot>
<tbody>
<tr><td>Cell 1.1</td><td>Cell 1.2</td></tr>
<tr><td>Cell 2.1</td><td>Cell 2.2</td></tr>
</tbody>
</table>
HTML Table Tags
Tag Description
<table> It defines a table.
<tr> It defines a row ina table.
<th> It defines a header cellin a table.
<td> It defines a cell ina table.
<caption> It defines the table caption.
<colgroup> It specifies a group ofone or more columnsin a table
for formatting.
<col> It is used with <colgroup>element to specify
column properties for each column.
<tbody> It is used to groupthe body content ina table.
<thead> It is used to groupthe header content ina table.
<tfooter> It is used to groupthe footer content ina table.
Cell Spacing and Padding – Example [Link]
<html>
<head><title>Table Cells</title></head>
<body>
<table cellspacing="15" cellpadding="0">
<tr><td>First</td>
<td>Second</td></tr>
</table>
<br/>
<table cellspacing="0" cellpadding="10">
<tr><td>First</td><td>Second</td></tr>
</table>
</body>
</html>
The cellpadding attribute of HTML table tag is obselete now. It is recommended to use
CSS.
<style>
table, th, td {
border: 1px solid pink;
border-collapse: collapse;
}
th, td {
padding: 10px;
}
<style>
table {
width:100%;
}
th, td {
border: 1px solid pink;
border-collapse: separate;
}
</style>
HTML Lists
HTML Lists are used to specify lists of information. All lists may contain one or more list
elements.
Type Description
Type "1" This is the default type. Inthis type, the list itemsare
numbered with numbers.
Type "I" In this type, the list itemsare numbered with upper case roman
numbers.
Type "i" In this type, the list itemsare numbered with lower case roman
numbers.
Type "A" In this type, the list itemsare numbered with upper case letters.
Type "a" In this type, the list itemsare numbered with lower case letters.
2. start attribute
The start attribute is used with ol tag to specify from where to start the list items.
<ol type="i" start="5">
<li>HTML</li> Output:
<li>Java</li> v. HTML
<li>JavaScript</li> vi. Java
<li>SQL</li> vii. JavaScript
</ol> viii. SQL
3. reversed Attribute:
This is a Boolean attribute of HTML <ol> tag, and it is new in HTML5 version. If you use the reversed
attribute with tag then it will numbered the list in descending order (7, 6, 5, 4......1).
<ol reversed>
<li>HTML</li>
<li>Java</li>
<li>JavaScript</li>
<li>SQL</li>
</ol>
there are 4 types of attributes in <ul> tag.
Type Description
Type "disc" This is the default style. In this style, the list items are marked with bullets.
Type "circle" In this style, the list items are marked with circles.
Type "square" In this style, the list items are marked with squares.
Type "none" In this style, the list items are not marked .
The type attribute is not supported in HTML5, instead of type you can use CSS property of list-style-type.
Following is the example to show the CSS property for ul tag.
<ul style="list-style-type: square;">
<li>HTML</li>
<li>Java</li>
<li>JavaScript</li>
<li>SQL</li>
</ul>
HTML iframes
HTML Iframe is used to display a nested webpage (a webpage within a webpage).
The HTML <iframe> tag defines an inline frame, hence it is also called as an Inline frame.
An HTML iframe embeds another document within the current HTML document in the rectangular region.
The webpage content and iframe contents can interact with each other using JavaScript.
Iframe Syntax
<iframe src="URL"></iframe>
Set Width and Height of iframe
You can set the width and height of iframe by using "width" and "height" attributes. By default, the
attributes values are specified in pixels but you can also set them in percent. i.e. 50%, 60% etc.
Example: (Pixels)
<!DOCTYPE html>
<html>
<body>
<h2>HTML Iframes example</h2>
<p>Use the height and width attributes to specify the size of the iframe:</p>
<iframe src="[Link] height="300" width="400"></iframe> </body>
</html>
Example: (Percentage)
<!DOCTYPE html>
<html>
<body>
<h2>HTML Iframes</h2>
<p>You can use the height and width attributes to specify the size of the iframe:</p> <iframe src="https://
[Link]/" height="50%" width="70%"></iframe> </body>
</html>
using CSS to set the height and width of the iframe.
<!DOCTYPE html>
<html>
<body>
<h2>HTML Iframes</h2>
<p>Use the CSS height and width properties to specify the size of the iframe:</p>
<iframe src="[Link] style="height:300px;width:400px"></iframe>
</body>
</html>
allow-same- If this keyword is used then the embedded resource will be treated as
origin downloaded from the same source.
The srcdoc attribute is used to show the HTML (code)content in the
Srcdoc
inline iframe. It overrides the src attribute (if a browser supports).
It indicates that browser should provide a scroll bar for the iframe or
Scrolling
not. (Not supported in HTML5)
auto Scrollbar only shows if the content of iframe is larger than its
dimensions.
yes Always shows scroll bar for the iframe.
no Never shows scrollbar for the iframe.
HTML Form
An HTML form is a section of a document which contains controls such as text fields, password fields,
checkboxes, radio buttons, submit button, menus etc.
An HTML form facilitates the user to enter data that is to be sent to the server for processing such as
name, email address, password, phone number, etc.
HTML forms are required if you want to collect some data from of the site visitor.
</form>
Tag Description
Tag Description
hidden
8
An arbitrary string that is not normally displayed to the user.
select
9
An enumerated value, much like the radio type.
textarea
10
A free-form text field, nominally with no line break restrictions.
button
11
A free form of button which can initiates any event related to button.
Attribute Value Description
accept file_extension Specifies a filter for what file types the user can
audio/* pick from the file input dialog box (only for
video/* type="file")
image/*
media_type
The email field in new in HTML 5. It validates the text for correct email address. You must use @ and . in
this field.
<form>
<label for="email">Email: </label>
<input type="email" id="email" name="email"/> <br/>
</form>
Radio Button Control
The radio button is used to select one option from multiple options. It is used for selection of gender, quiz
questions etc. If you use one name for all the radio buttons, only one radio button can be selected at a
time. Using radio buttons for multiple options, you can only choose a single option at a time.
<form>
<label for="gender">Gender: </label>
<input type="radio" id="gender" name="gender" value="male"/>Male
<input type="radio" id="gender" name="gender" value="female"/>Female <br/>
</form>
Checkbox Control
The checkbox control is used to check multiple options from given checkboxes.
<form>
Hobby:<br>
<input type="checkbox" id="cricket" name="cricket" value="cricket"/>
<label for="cricket">Cricket</label> <br>
<input type="checkbox" id="football" name="football" value="football"/>
<label for="football">Football</label> <br>
<input type="checkbox" id="hockey" name="hockey" value="hockey"/>
<label for="hockey">Hockey</label>
</form>
Dropdown menus:
<select name="gender">
<option value="Value 1"
selected="selected">Male</option>
<option value="Value 2">Female</option>
<option value="Value 3">Other</option>
</select>
Form labels are used to associate an explanatory text to a form field using the field's ID.
<label for="fn">First Name</label>
<input type="text" id="fn" />
Clicking on a label focuses its associated field (checkboxes are toggled, radio buttons are checked)
Labels are both a usability and accessibility feature and are required in order to pass accessibility
validation.
Single-line text input fields:
<input type="text" name="FirstName" value="This is a text field" />
Multi-line textarea fields:
<textarea name="Comments">This is a multi-line text field</textarea>
Hidden fields contain data not shown to the user:
<input type="hidden" name="Account" value="This is a hidden text field" />
The tabindex HTML attribute controls the order in which form fields and hyperlinks are focused when
repeatedly pressing the TAB key
• tabindex="0" (zero) - "natural" order
• If X > Y, then elements with tabindex="X" are iterated before elements with tabindex="Y"
Elements with negative tabindex are skipped, however, this is not defined in the standard
<input type="text" tabindex="10" />
HTML5 input elements introduced several new values for the type attribute. These are listed below.
4 month A date consisting of a year and a month encoded according to ISO 8601.
5 week A date consisting of a year and a week number encoded according to ISO 8601.
6 time A time (hour, minute, seconds, fractional seconds) encoded according to ISO 8601.
7 number It accepts only numerical value. The step attribute specifies the precision, defaulting to 1.
8 range The range type is used for input fields that should contain a value from a range of numbers.
email It accepts only email value. This type is used for input fields that should contain an e-mail
9 address. If you try to submit a simple text, it forces to enter only email address in
email@[Link] format.
url It accepts only URL value. This type is used for input fields that should contain a URL address. If
you try to submit a simple text, it forces to enter only URL address either in
10
[Link] format or in [Link] format.
HTML5 introduced a new element <output> which is used to represent the result of different types of
output, such as output written by a script.
You can use the for attribute to specify a relationship between the output element and other elements in
the document that affected the calculation (for example, as inputs or parameters).
The value of the for attribute is a space-separated list of IDs of other elements.
HTML5 Example:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Title of the document</title>
</head>
<body>
Content of the document......
</body>
</html>
Note The default character encoding in HTML5 is UTF-8.
<bdi> Defines a part of text that might be formatted in a different direction from other text
<details> Defines additional details that the user can view or hide
<dialog> Defines a dialog box or window
<figcaption> Defines a caption for a <figure> element
<figure> Defines self-contained content, like illustrations, diagrams, photos, code listings, etc.
<!DOCTYPE html>
<html>
<head><meta charset="utf-8" />
<title>Title</title>
<link href="css/[Link]" rel="stylesheet" />
<link href="css/[Link]" rel="stylesheet" />
</head>
<body>
<header>
<hgroup>
<h1>Header in h1</h1>
<h2>Subheader in h2</h2>
</hgroup>
</header>
<nav>
<ul><li><a href="#">Menu Option 1</a></li>
<li><a href="#">Menu Option 2</a></li>
<li><a href="#">Menu Option 3</a></li>
</ul>
</nav>
<section>
<article>
<header>
<h1>Article #1</h1>
</header>
<section>
This is the first article. This is <mark>highlighted</mark>.
</section>
</article>
<article>
<header>
<h1>Article #2</h1>
</header>
<section> This is the second article. These articles could be blog posts, etc.
</section>
</article>
</section>
<aside>
<section>
<h1>Links</h1>
<ul><li><a href="#">Link 1</a></li>
<li><a href="#">Link 2</a></li>
<li><a href="#">Link 3</a></li>
</ul>
</section>
<figure>
<img width="85" height="85"
src="[Link]
alt="Jennifer Marsman" />
<figcaption>Jennifer Marsman</figcaption>
</figure>
</aside>
<footer>Footer - Copyright 2011</footer>
</body>
</html>
HTML <meter> Tag
to measure data within a given range (a gauge):
<meter value="2" min="0" max="10">2 out of 10</meter><br>
<meter value="0.6">60%</meter>
The <meter> tag defines a scalar measurement within a known range, or a fractional value. This is also known as a
gauge.
The <meter> tag should not be used to indicate progress (as in a progress bar).
Attribute Value Description
form form_id Specifies one or more forms the <meter> element belongs to
optimum number Specifies what value is the optimal value for the gauge
max number Specifies how much work the task requires in total
value number Specifies how much of the task has been completed
<canvas>gives you an easy and powerful way to draw graphics using JavaScript.
It can be used to draw graphs, make photo compositions or do simple (and not so simple) animations.
Here is a simple <canvas> element which has only two specific attributes width and height plus all the core HTML5
attributes like id, name and class, etc.
<canvas id = "mycanvas" width = "100"
height = "100"></canvas>
The Rendering Context
The <canvas> is initially blank, and to display something, a script first needs to access the rendering context and
draw on it.
var canvas = [Link]("mycanvas");
if ([Link])
{
varctx = [Link]('2d');
// drawing code here }
else
{ // canvas-unsupported code here }
Drawing Rectangles
[Link]. Method and Description
fillRect(x,y,width,height)
1
This method draws a filled rectangle.
strokeRect(x,y,width,height)
2
This method draws a rectangular outline.
clearRect(x,y,width,height)
3
This method clears the specified area and makes it fully transparent
<!DOCTYPE HTML>
<html>
<head>
<script type = "text/javascript">
functiondrawShape() {
// Get the canvas element using the DOM
var canvas = [Link]('mycanvas');
// Make sure we don't execute when canvas isn't supported
if ([Link]) {
// use getContext to use the canvas for drawing
varctx = [Link]('2d');
// Draw shapes
[Link](25,25,100,100);
[Link](45,45,60,60);
[Link](50,50,50,50);
} else {
alert('You need Safari or Firefox 1.5+ to see this demo.');
}
}
</script>
</head>
<body id = "test" onload = "drawShape();">
<canvas id = "mycanvas"></canvas>
</body></html>
[Link]. Examples & Description
1 Drawing RectanglesLearn how to draw rectangle using HTML5 <canvas> element
2 Drawing PathsLearn how to make shapes using paths in HTML5 <canvas> element
4 Drawing BezierLearn how to draw Bezier curve using HTML5 <canvas> element
5 Drawing QuadraticLearn how to draw quadratic curve using HTML5 <canvas> element
8 Styles and ColorsLearn how to apply styles and colors using HTML5 <canvas> element
9 Text and FontsLearn how to draw amazing text using different fonts and their size.
10 Pattern and ShadowLearn how to draw different patterns and drop shadows.
11 Canvas StatesLearn how to save and restore canvas states while doing complex drawings on a canvas.
Canvas Translation This method is used to move the canvas and its origin to a different point in the grid.
12
13 Canvas Rotation This method is used to rotate the canvas around the current origin.
14 Canvas Scaling This method is used to increase or decrease the units in a canvas grid.
15 Canvas Transform These methods allow modifications directly to the transformation matrix.
Canvas Composition This method is used to mask off certain areas or clear sections from the canvas.
16
17 Canvas Animation Learn how to create basic animation using HTML5 canvas and JavaScript.
SVG Element:
• SVG stands for Scalable Vector Graphics.
• SVG defines vector-based graphics in XML format.
• SVG defines the graphics in XML format
• Every element and every attribute in SVG files can be animated
• SVG is a W3C recommendation
• SVG integrates with other W3C standards such as the DOM and XSL
Advantages of using SVG over other image formats (like JPEG and GIF) are:
• SVG images can be created and edited with any text editor
• SVG images can be searched, indexed, scripted, and compressed
• SVG images are scalable
• SVG images can be printed with high quality at any resolution
• SVG images are zoomable
• SVG graphics do NOT lose any quality if they are zoomed or resized
• SVG is an open standard
• SVG files are pure XML
The main competitor to SVG is Flash.
The biggest advantage SVG has over Flash is the compliance with other standards (e.g. XSL and the DOM). Flash
relies on proprietary technology that is not open source.
SVG Shapes
SVG has some predefined shape elements that can be used by developers:
• Rectangle <rect>
• Circle <circle>
• Ellipse <ellipse>
• Line <line>
• Polyline <polyline>
• Polygon <polygon>
• Path <path>
<!DOCTYPE html>
<html>
<body>
<svg width="300" height="200">
<polygon points="100,10 40,198 190,78 10,78 160,198"
style="fill:lime;stroke:purple;stroke-width:5;fill-rule:evenodd;" />
Sorry, your browser does not support inline SVG.
</svg>
</body>
</html>
SVG Text
<svg height="30" width="200">
<text x="0" y="15" fill="red">I love SVG!</text>
Sorry, your browser does not support inline SVG.
</svg>
Rotate the text:
<svg height="60" width="200">
<text x="0" y="15" fill="red" transform="rotate(30 20,40)">I love SVG</text>
</svg>
transform=“rotate(90)”
transform=“rotate(-90)”
Transformation Functions
SVG provides four transformation functions:
translate()
rotate()
scale()
skew()
matrix()
Text as a Link
<svg height="30" width="200" xmlns:xlink="[Link]
<a xlink:href="[Link] target="_blank">
<text x="0" y="15" fill="red">I love SVG!</text>
</a>
Sorry, your browser does not support inline SVG.
</svg>
SVG Gradients
A gradient is a smooth transition from one color to another. In addition, several color transitions can be applied
to the same element.
There are two main types of gradients in SVG:
Linear, Radial
SVG Linear Gradient - <linearGradient>
The <linearGradient> element must be nested within a <defs> tag.
The <defs> tag is short for definitions and contains definition of special elements (such as gradients).
Linear gradients can be defined as horizontal, vertical or angular gradients:
Horizontal gradients are created when y1 and y2 are equal and x1 and x2 differ
Vertical gradients are created when x1 and x2 are equal and y1 and y2 differ
Angular gradients are created when x1 and x2 differ and y1 and y2 differ
Eg. Define an ellipse with a horizontal linear gradient from yellow to red:
<svg height="150" width="400">
<defs>
<linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="0%">
<stop offset="0%" style="stop-color:rgb(255,255,0);stop-opacity:1" />
<stop offset="100%" style="stop-color:rgb(255,0,0);stop-opacity:1" />
</linearGradient>
</defs>
<ellipse cx="200" cy="70" rx="85" ry="55" fill="url(#grad1)" />
</svg>
The id attribute of the <linearGradient> tag defines a unique name for the gradient
The x1, x2, y1,y2 attributes of the <linearGradient> tag define the start and end position of the gradient
The color range for a gradient can be composed of two or more colors. Each color is specified with a <stop> tag.
The offset attribute is used to define where the gradient color begin and end
The fill attribute links the ellipse element to the gradient
SVG Blur Effects
<defs> and <filter>
All internet SVG filters are defined within a <defs> element.
The <defs> element is short for definitions and contains
definition of special elements (such as filters).
The <filter> element is used to define an SVG filter.
The <filter> element has a required id attribute which identifies
the filter. The graphic then points to the filter to use.
The <feGaussianBlur> element is used to create blur effects:
<svg height="110" width="110">
<defs>
<filter id="f1" x="0" y="0">
<feGaussianBlur in="SourceGraphic" stdDeviation="15" />
</filter>
</defs>
<rect width="90" height="90" stroke="green" stroke-width="3"
fill="yellow" filter="url(#f1)" />
</svg>
The in="SourceGraphic" part defines that the effect is created for the entire element
The stdDeviation attribute defines the amount of the blur
Canvas SVG
Canvas draws 2D graphics, on the fly (with a SVG is a language for describing 2D graphics in XML.
JavaScript).
Format MIME-type
MP3 audio/mpeg
OGG audio/ogg
WAV audio/wav
autoplay autoplay Specifies that the audio will start playing as soon as it is ready
controls controls Specifies that audio controls should be displayed (such as a play/pause button etc)
loop loop Specifies that the audio will start over again, every time it is finished
preload auto Specifies if and how the author thinks the audio should be loaded when the page loads
metadata
none
The <track> element is used as a child of an <audio> or <video> element and adds a time-based data source to the
parent media element.
For example, the <track> element can be used to add timed subtitles to a video and closed captions to audio
content.
<video width="320" height="240" controls>
<source src="forrest_gump.mp4" type="video/mp4">
<source src="forrest_gump.ogg" type="video/ogg">
<track src="subtitles_en.vtt" kind="subtitles" srclang="en" label="English">
<track src="subtitles_no.vtt" kind="subtitles" srclang="no" label="Norwegian">
</video>
Attribute Value Description
default Default Specifies that the track is to be enabled if the user's preferences do not indicate
that another track would be more appropriate
srclang language_code Specifies the language of the track text data (required if kind="subtitles")
The controls attribute adds video controls, like play, pause, and volume.
It is a good idea to always include width and height attributes.
The <source> element allows you to specify alternative video files which the browser may choose from.
The browser will use the first recognized format. The text between the <video> and </video> tags will only be
displayed in browsers that do not support the <video> element.
To start a video automatically use the autoplay attribute
References:
[Link]
[Link]
[Link]