HTML Symbols
Many mathematical, technical, and currency symbols, are not present on a normal keyboard. To add such symbols to an HTML page, you can use the entity name or the entity number (a decimal or a hexadecimal reference) for the symbol.- $ Currency Symbols: https://www.w3schools.com/charsets/ref_utf_currency.asp
- ∮ Mathematical Symbols: https://www.w3schools.com/charsets/ref_utf_math.asp
- Θ Greek Letters: https://www.w3schools.com/charsets/ref_utf_greek.asp
- 🦁 Emojis: https://www.w3schools.com/charsets/ref_emoji.asp
- ☂ Other Entities: https://www.w3schools.com/charsets/ref_utf_symbols.asp
Example
Display the euro sign, €, with an entity name, a decimal, and a hexadecimal value:<p> I will display € </p> <p> I will display €</p> <p> I will display €</p>Will display as:
I will display €
I will display €
I will display €
MATH Formula in HTML
- ★
To display the math formula, we need to include the following JavaScript Library to the head section:
<script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=default'></script> - ★ MathJax is a JavaScript display engine for mathematics that works in all browsers.
- ★ MathJax Reference: https://docs.mathjax.org/en/latest/basic/mathematics.html
\(...\)
for in-line mathematics:
\( \frac{-b ± \sqrt{b^2-4bc}}{2a} \)
\( \sum\limits_{i=0}^na^i = \frac{a^{n+1}-1}{a-1} (a \neq 1) \)
$$...$$
for displayed mathematics:
$$ \frac{-b ± \sqrt{b^2-4bc}}{2a} $$
$$ \sum\limits_{i=0}^na^i = \frac{a^{n+1}-1}{a-1} (a \neq 1) $$
HTML Multimedia
What is Multimedia?
Multimedia comes in many different formats. It can be almost anything you can hear or see, like images, music, sound, videos, records, films, animations, and more. Web pages often contain multimedia elements of different types and formats.HTML Video
- ★ The HTML <video> </video> element is used to show a video on a web page.
- ★ Only MP4 , WebM , and Ogg videos are supported by the HTML standard.
<video width="320" height="240" controls> <source src="movie.mp4" type="video/mp4"> <source src="movie.ogg" type="video/ogg"> Your browser does not support the video tag. </video>
Video Source
- ★ The controls attribute adds video controls, like play, pause, and volume.
- ★ It is a good idea to always include width and height attributes. If height and width are not set, the page might flicker while the video loads.
- ★ 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.
HTML Audio
- ★ The HTML <audio> </audio> element is used to play a audio on a web page.
- ★ Only MP3 , WAV , and Ogg audio are supported by the HTML standard.
<audio width="320" height="240" controls> <source src="horse.ogg" type="audio/mp3"> <source src="horse.mp3" type="audio/ogg"> Your browser does not support the audio tag. </audio>
Audio Source
Playing a YouTube Video in HTML
The easiest way to play videos in HTML is to use YouTube.- ★ An inline frame (iframe) is an HTML element that loads another HTML page within the document.
- ★ Define an <iframe> </iframe> in your web page.
- ★ Let the src attribute point to the video URL.
- ★ Use the width and height attributes to specify the dimension of the player
- ★Important Points: Embed URL: The URL format for embedding a YouTube video inside an <iframe> </iframe> is: https://www.youtube.com/embed/VIDEO_ID So, replace VIDEO_ID with the actual video ID (in your case, ekr2nIex040).
<iframe width="420" height="300" src="https://www.youtube.com/embed/ekr2nIex040"> </iframe>
Youtube Video Source