Unit 1 Animation
Unit 1 Animation
2mark:
1. Differentiate HTML and XHTML.
Syntax(diagram):
<tagname>
/ \
Opening Closing
tag tag
Eg:
<p>This is a paragraph.</p>
<p> is the opening tag for a paragraph element.
</p> is the closing tag for the paragraph element.
"This is a paragraph." is the content of the paragraph.
3.What is the use of audio tag? Write its important attributes with their
purpose
The <audio> tag is used to embed sound content in a document, such as
music or other audio streams. The <audio> tag contains one or
more <source> tags with different audio sources. The browser will choose the
first source it supports.
Attribute Description
autoplay Specifies that the audio will start playing as soon as it is ready
loop Specifies that the audio will start over again, every time it is finishe
4.What is the use of video tag? Write its important attributes with their
purpose.
The <video> tag contains one or more <source> tags with different video
sources. The browser will choose the first source it supports.
autoplay Specifies that the video will start playing as soon as it is ready
Anything between will be treated as a comment and will not be rendered by the browser.
2. Multi-line Comment: If you have a comment that spans multiple lines, you can use the
following syntax:
<!--
This is a
multi-line comment
-->
6.How to write HTML5 conditional comments.
Conditional comments are no longer supported in HTML5, but if you're working
witholder versions of HTML and need to use conditional comments, here's an
example of how they were written:
a) <!--[if IE]>
<p>This is Internet Explorer.</p>
<![endif]-->
b) <!--[if lt IE 9]>
<p>This is Internet Explorer 8 or earlier.</p>
<![endif]-->
7. What is the use of target attribute of <a> element? List the possiblevalues.
The <a> tag defines a hyperlink, which is used to link from one page to
another.The most important attribute of the <a> element is the href attribute,
which indicates the link's destination.
download Specifies that the target will be downloaded when a user clicks on the hyperlink
rel Specifies the relationship between the current document and the linked
document
Refer question 3
9. What does br tag do? Whats the use of its clear attribute?
The <br> tag inserts a single line break.The <br> tag is useful for writing
addresses or poems.The <br> tag is an empty tag which means that it has no
end tag.
The clear attribute is used to control the behaviour of floated elements and specifies on which
side of the floating elements other content should not be allowed. It can take three possible
values:
10. What is the purpose of div tag? What’s the use of its nowrap attribute.
the nowrap attribute is used to specify that the content of a specific table cell should
not wrap to the next line and should remain on a single line. It prevents text or
content from breaking into multiple lines within a table cell.
The <dt> tag defines a term/name in a description list.The <dt> tag is used
in conjunction with <dl> (defines a description list) and <dd> (describes
each term/name).
The <dl> tag defines a description list.The <dl> tag is used in conjunction
with <dt> (defines terms/names) and <dd> (describes each term/name)
Eg:
<dl>
<dt>HTML</dt>
</dl>
Eg:
<form>
<fieldset>
<label for="name">Name:</label>
<label for="email">Email:</label>
</fieldset>
<button type="submit">Submit</button>
</form>
eg:
<header>
<h1>A heading here</h1>
<p>Posted by John Doe</p>
<p>Some additional information here</p>
</header>
The <label> tag is used to specify a label for an <input> element of a form. It adds a
label to a form control such as text, email, password, textarea etc. It toggles the
control when a user clicks on a text within the <label> element.
The for attribute of the tag is used to specify which form element the label is associated
with. It takes the value of the id attribute of the form element
Eg:
<label for="username">Username</label>
The <span> tag is much like the <div> element, but <div> is a block-level
element and <span> is an inline element.
cellspacing: This attribute is used to define the space or gap between adjacent cells
in a table. It determines the spacing between cells both horizontally and vertically.
The value of cellspacing is specified in pixels. For instance, using cellspacing="10"
will create a 10-pixel gap between adjacent cells in the table.
19. What is the purpose colspan and rowspan attributes of <td> tag?
1. colspan: This attribute is used to specify the number of columns that a table cell
should span. It allows a single cell to occupy multiple columns, merging or stretching
across them horizontally. For example, using colspan="2" on a element will cause it
to span two adjacent columns in the table, effectively merging those cells into a
single larger cell.
2. rowspan: This attribute is used to specify the number of rows that a table cell
should span. It allows a single cell to occupy multiple rows, merging or stretching
across them vertically. For instance, using rowspan="3" on a element will cause it to
span three adjacent rows in the table, merging those cells into a single taller cell
20. What is the purpose of <th> tag? List any four attributes.
The <th> tag defines a header cell in an HTML table.An HTML table has two
kinds of cells:
Atrrributes:
Colspan,headers,rowspan,scope,abbr
22. What is the use of <ul> tag? What is the purpose of its type
attribute?
the <ul> tag defines an unordered (bulleted) list.Use the <ul> tag together
with the <li> tag to create unordered lists.
disc: This is the default value. It displays a solid round bullet. Eg: type="disc"
To add the JavaScript code into the HTML pages, we can use the tag of the HTML that wrap
around JavaScript code inside the HTML program//internal
1. Eg: <html>
2. <head>
3. <title> page title</title>
4. <script>
5. document.write("Welcome to Javatpoint");
6. </script>
7. </head>
8. <body>
9. <p>Inthis example we saw how to add JavaScript in the head section </p>
10. </body>
11. </html>
2. Generally, this method is used when we have to call a function in the HTML event attributes.
There are many cases (or events) in which we have to add JavaScript code directly //inline
1. <html>
2. <head>
3. <title> page title</title>
4. </head>
5. <body>
6. <p>
7. <a href="#" onClick="alert('Welcome !');">Click Me</a>
8. </p>
9. <p> in this example we saw how to use inline JavaScript or directly in an HTML tag.
</p>
10. </body>
11. </html>
We can also create a separate file to hold the code of JavaScript with the (.js) extension and
later incorporate/include it into our HTML document using the src attribute of
the <script> tag//external
1. <html>
2. <head>
3. <meta charset="utf-8">
4. <title>Including a External JavaScript File</title>
5. </head>
6. <body>
7. <form>
8. <input type="button" value="Result" onclick="display()"/>
9. </form>
10. <script src="hello.js">
11. </script>
12. </body>
13. </html>
Hello.js
1. function display() {
2. alert("Hello World!");
3. }
The <noscript> tag is used to define an alternate content to be displayed to users that have
disabled scripting from the browser or have a browser that doesn't support script. The
`<noscript> element can be used in both <head> and <body>. When used inside <head>,
the <noscript> element could only contain <link>, <style>, and <meta> elements.
The text inside the <noscript> element will be displayed if the user's browser is not
script supporting
Eg: <noscript>
</noscript>
A variable represents or holds a value. The actual value of a variable can be changed
at any time.
Declaring Variables
To declare text as a variable, you use the var or let keyword, which tells the browser
var variablename;
For example, to name your variable number the declaration looks like this:
var number;
An anonymous function in JavaScript is a function that does not have a name. It is also
called a lambda function or a self-executing function. Anonymous functions are often
used as callbacks, which are functions that are passed as arguments to other functions.
Eg:
console.log("Hello, world!");
};
27. What are the uses of === and !== operators of JavaScript.
The === operator tests for equality and type, while the !== operator tests for
inequality and type.
The === operator returns true if the two values are equal and of the same type. The
!== operator returns true if the two values are not equal or of different types
28. List any four special operators of JavaScript with their purpose.
The for in loop allows you to loop over all the names of the properties of an object and execute
statements for each property using a variable to hold the name of the property.
The for each in loop is very similar to the for in loop, but rather than looping through the name
of each property it allows you to loop through the value of each of the properties.
An event is something that happens when the viewer of the page performs some sort of action,
such as clicking a mouse button, clicking a button on the page, changing the contents of a
form element, or moving the mouse over a link on the page. Events can also occur simply by
the page loading or other similar actions.
An event handler is a predefined JavaScript property of an object (in most cases an element
in the document) that is used to handle an event on a Web page.
eg:
document.getElementById("myButton").attachEvent("onclick", function() {
});
Object initializers in JavaScript are a way to create objects without using a constructor
function. They are a comma-delimited list of property names and associated values, enclosed
in curly braces ({}).
Eg:
const myObject = {
name: "Bard",
age: 30,};
4m:
1. List and explain some of the most commonly used (X)HTML elements.
<html> and </html> tags: These tags define the beginning and end of an
HTML document.
2. <head> and </head> tags: These tags define the head of an HTML document,
which contains metadata about the document, such as the title, the author,
and the keywords.
3. <title> and </title> tags: These tags define the title of an HTML document.
4. <body> and </body> tags: These tags define the body of an HTML document,
which contains the visible content of the page.
5. <h1> to <h6> tags: These tags define headings of different levels, with <h1>
being the most important and <h6> being the least important.
6. <p> tag: This tag defines a paragraph of text.
7. <b> and </b> tags: These tags define bold text.
8. <i> and </i> tags: These tags define italic text.
9. <a> tag: This tag defines a link to another web page or document.
10. <img> tag: This tag defines an image on a web page.
11. <ul> and </ul> tags: These tags define an unordered list.
12. <ol> and </ol> tags: These tags define an ordered list.
HTML (Hypertext Markup Language) and XHTML (Extensible Hypertext Markup Language) are
markup languages used for creating web pages. Both HTML and XHTML have Document Type
Definitions (DTD) that define the structure, elements, and syntax rules for valid documents.
Let's explain each specification and provide an example:
1. HTML DTD:
HTML DTD specifies the rules and structure for HTML documents. There are different
versions of HTML, and each version has its own DTD. For example, in HTML5, the HTML DTD
declaration is not required, as HTML5 follows a different syntax.
Eg:
<html>
<head>
<title>My HTML Page</title>
</head>
<body>
<h1>Hello, World!</h1>
<p>This is an example HTML page.</p>
</body>
</html>
In this example, the `<!DOCTYPE html>` declaration informs the browser that the document
is written in HTML5. The rest of the document follows the rules and structure defined by the
HTML5 specification.
2. XHTML DTD:
XHTML is a stricter and more well-formed version of HTML. It follows the rules of
XML, which means it requires elements to be properly nested and closed. XHTML
documents must conform to a specific DTD, indicating the XHTML version being
used.XHTML stands for EXtensible HyperText Markup Language
XHTML is a stricter, more XML-based version of HTML
XHTML is HTML defined as an XML application
XHTML is supported by all major browsers
eg:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
<h1>Hello, World!</h1>
</body>
</html>
In this example, the `<!DOCTYPE>` declaration specifies the DTD for XHTML 1.0 Strict. The
`xmlns` attribute in the `<html>` tag indicates that the document follows the XHTML
namespace. The rest of the document adheres to the XHTML 1.0 Strict rules, including the
proper closing of tags and strict syntax.
<title> element: This element defines the title of the document. It is displayed
in the title bar of the browser.
<meta> element: This element is used to define metadata about the
document, such as the author, the keywords, and the description.
<link> element: This element is used to link to external resources, such as
style sheets and favicons.
<script> element: This element is used to embed JavaScript code in the
document.
<noscript> element: This element is used to provide alternative content for
browsers that do not support JavaScript.
<base> element: This element defines the base URL for the document. This is
used to resolve relative links in the document.
<style> element: This element is used to define style information for the
document.
The <head> element is a container for all of these elements. It is important to note
that the <title> element is the only required element in the head. The other elements
are optional, but they can be useful for providing additional information about the
document.
Eg:
<head>
<meta charset="utf-8">
<script src="script.js"></script>
<noscript>
</noscript>
</head>
HTML5 introduced several new form fields that provide enhanced functionality and input
options for user interaction. These new form fields offer improved validation, input types, and
options for gathering user data. Here are some of the notable new HTML5 form fields:
1. `<input type="color">`: This input field allows users to select a color using a color picker
interface. The selected color is represented as a hexadecimal value.
2. `<input type="date">`: This field provides a date input control, typically presented as a
calendar picker, allowing users to select a specific date.
3. `<input type="datetime-local">`: Similar to the `date` input, this field allows users to select
a date and time together.
4. `<input type="email">`: This field is specifically designed for email input, validating that the
entered value follows the correct email format.
5. `<input type="number">`: This input field restricts input to numeric values. It may include
options such as minimum and maximum values, step size, and validation for numerical input.
6. `<input type="range">`: This field represents a slider control, enabling users to select a
value from a predefined range by dragging a slider handle.
7. `<input type="search">`: This input field is specifically designed for search queries. It often
provides additional styling and behavior, such as displaying a search icon or providing search
suggestions.
8. `<input type="tel">`: This field is used for telephone number input, often triggering mobile
devices' numeric keyboards for easier input.
9. `<input type="url">`: This field validates that the entered value follows a valid URL format,
ensuring that users provide a correct website address.
10. `<input type="file">`: This field allows users to select and upload files from their device. It
enables file selection through a file picker dialog.
2. Document Type Name: It specifies the type of document being used, such
as HTML or XHTML. For HTML5, the `DOCTYPE` declaration is simply
`<!DOCTYPE html>`.
3. DTD Identifier: The DTD identifier is an optional attribute that provides the
URL or reference to the Document Type Definition. It describes the rules and
structure of the markup language being used. In HTML5, the DTD is not
required, and the declaration does not include a reference to an external
DTD.
```html
<!DOCTYPE html>
```
The <a> tag defines a hyperlink, which is used to link from one page to
another.
The most important attribute of the <a> element is the href attribute, which
indicates the link's destination.
href URL Specifies the URL of the page the link goes
to
10. Explain the use of <article> element of HTML5 with any five
unique attributes.
Forum post
Blog post
News story
id : The id attribute is used to provide a unique identifier for the <article>
element. It can be used to reference the specific article within the
document or to target the element with CSS or JavaScript.
Example: <article id="article1">...</article>
class: The class attribute allows you to assign one or more CSS classes
to the <article> element. It is useful for styling and applying specific
styles to multiple articles with the same class.
Example: <article class="blog-post">...</article>
title: The title attribute provides additional information or a descriptive
title for the <article> element. It can be displayed as a tooltip when the
user hovers over the element.
Example: <article title="Introduction to HTML5">...</article>
lang : The lang attribute specifies the language of the content within the
<article> element. It helps screen readers and search engines
understand the language and assist in proper language-specific
rendering.
Example: <article lang="en">...</article>
datetime: The datetime attribute specifies the date and time of the
publication or the most recent modification of the <article> content. It
follows the ISO 8601 format, allowing machines to process and
interpret the date/time information.
Example: <article datetime="2023-06-23T10:15:00Z">...</article>
11. Write a short note on <aside> with any of its 5 unique attributes.
The <aside> tag defines some content aside from the content it is placed in.
1. class : The class attribute allows you to assign one or more CSS classes to the
<aside> element. It is useful for styling and applying specific styles to multiple
<aside> elements with the same class.
Example: <aside class="sidebar">...</aside>
2. id : The id attribute is used to provide a unique identifier for the <aside>
element. It can be used to reference the specific <aside> within the document
or to target the element with CSS or JavaScript.
Example: <aside id="related-links">...</aside>
3. role : The role attribute specifies the role or purpose of the <aside> element in
the document. It helps assistive technologies and screen readers understand
the function of the element.
Example: <aside role="complementary">...</aside>
4. aria-label : The aria-label attribute provides a text label to describe the
<aside> element for accessibility purposes. It is used when the element's
purpose is not adequately conveyed by its content or other attributes.
Example: <aside aria-label="Author Information">...</aside>
5. hidden : The hidden attribute is used to indicate that the <aside> element should
be initially hidden or not displayed. It is often used in conjunction with
JavaScript to control the visibility of the element dynamically.
Example: <aside hidden>...</aside>
12. Explain any 4/6 unique element specific attributes of <body> tag
The <body> element contains all the contents of an HTML document, such as
headings, paragraphs, images, hyperlinks, tables, lists, etc.
1. onload : The onload attribute specifies a JavaScript code that should be executed
when the webpage or document finishes loading in the browser. It is
commonly used to trigger certain actions or functions after the page has been
fully loaded.
Example: <body onload="myFunction()">...</body>
2. onunload : The onunload attribute specifies a JavaScript code that should be
executed when the user navigates away from the webpage or closes the
browser window. It is used to perform actions or cleanup tasks before the
page is unloaded.
Example: <body onunload="cleanup()">...</body>
3. onresize : The onresize attribute specifies a JavaScript code that should be
executed when the browser window is resized. It is often used to handle
dynamic layout adjustments or responsive behavior based on the window size.
Example: <body onresize="adjustLayout()">...</body>
4. scroll : The scroll attribute specifies the scroll behavior of the webpage. It can
take values such as yes , no, or auto to control whether scrollbars are displayed
or how they behave when content exceeds the visible area.
Example: <body scroll="no">...</body>
alink : The alink attribute specifies the color of active links in the body
element.
vlink : The vlink attribute specifies the color of visited links in the body
element.
bgcolor : The bgcolor attribute specifies the background color of the body
element.
The tag is an outdated and deprecated HTML tag that was used to specify font styles, colors,
and sizes for text
face : The face attribute can specify a single font family, or a comma-
separated list of font families. The browser will try to find the first font family in
the list that is installed on the user's computer.
size : The size attribute can specify the size of the text in pixels, or in relative
terms. For example, a size of 16 is equivalent to 16 pixels, and a size of +1 is
equivalent to one size larger than the default size.
color : The color attribute can specify the color of the text in hexadecimal
format. For example, a color of #ff0000 is equivalent to red.
style : The style attribute can be used to specify the style of the text, such
as bold, italic, or underline.
The <form> tag is used to create an HTML form for user input.
accept- character_set Specifies the character encodings that are to be used for the
charset form submission
action URL Specifies where to send the form-data when a form is submitted
method get Specifies the HTTP method to use when sending form-data
post
novalidate novalidate Specifies that the form should not be validated when submitted
target _blank Specifies where to display the response that is received after
_self submitting the form
_parent
_top
16. Write a note <hr> tag with all of its element-specific attributes.
The <hr> tag defines a thematic break in an HTML page (e.g. a shift of topic).
The <hr> element is most often displayed as a horizontal rule that is used to
separate content (or define a change) in an HTML page.
align : The align attribute specifies the alignment of the horizontal rule. The
possible values are left, center, right, and justify.
noshade : The noshade attribute specifies that the horizontal rule should not
have a shading effect.
size : The size attribute specifies the height of the horizontal rule in pixels.
1. width : The width attribute specifies the width of the horizontal rule in pixels or
as a percentage of the page width
2. . color : The color attribute specifies the color of the horizontal rule. It can be
set to a named color (e.g., "red") or a hexadecimal color value.
17. Write the four element specific attributes of <html> element with their
purpose.
Specifies the version of This is used to specify the version of HTML used in the
version HTML used in the document, so that the browser can correctly interpret the
document. document.
Specifies the
xmlns
This is used to specify the namespace of the document, so
namespace of the
that the browser can correctly interpret the document.
document.
The <iframe> tag specifies an inline frame.An inline frame is used to embed
another document within the current HTML document.
allowfullscreen true Set to true if the <iframe> can activate fullscreen mode by calling the
false requestFullscreen() method
height pixels Specifies the height of an <iframe>. Default height is 150 pixels
src URL Specifies the address of the document to embed in the <iframe>
srcdoc HTML_code Specifies the HTML content of the page to show in the <iframe>
width pixels Specifies the width of an <iframe>. Default width is 300 pixels
Images are not technically inserted into a web page; images are linked to
web pages. The <img> tag creates a holding space for the referenced image.
The <input> tag specifies an input field where the user can enter
data.The <input> element is the most important form element.
The <input> element can be displayed in several ways, depending on the type
attribute.
width pixels Specifies the width of an <input> element (only for type="image")
maxlength number Specifies the maximum number of characters allowed in an <input> element
minlength number Specifies the minimum number of characters required in an <input> element
The <li> tag is used inside ordered lists(<ol>), unordered lists (<ul>), and in
menu lists (<menu>).The `<li>` tag is an HTML element used to create a list
item within an ordered (`<ol>`) or unordered (`<ul>`) list. It stands for "list
item." The `<li>` tag must always be nested inside an `<ol>` or `<ul>` element.
The <link> tag defines the relationship between the current document and an
external resource.
The <link> tag is most often used to link to external style sheets or to add
a favicon to your website.
sizes HeightxWidth Specifies the size of the linked resource. Only for rel="icon"
any
hreflang language_code Specifies the language of the text in the linked document
media media_query Specifies on what device the linked document will be displayed
23. Explain the use of <marquee> tag with 4 of its element specific attributes.
The Marquee HTML tag is a non-standard HTML element which is used to scroll a
image or text horizontally or vertically.
In simple words, you can say that it scrolls the image or text up, down, left or right
automatically
direction defines direction for scrolling content. It may be left, right, up and down.
24. What is the use of <ol> ordered list? Explain with attributes.
The <ol> tag defines an ordered list. An ordered list can be numerical or
alphabetical.
reversed reversed Specifies that the list order should be reversed (9,8,7...)
25. Explain what is the use of <script> tag? Explain its 6 element specific
attribute.
The <script> tag is used to embed a client-side script (JavaScript).
Common uses for JavaScript are image manipulation, form validation, and
dynamic changes of content
async It is a boolean value which specifies that the script is executed asynchronously.
defer It is a boolean value which is used to indicate that script is executed after
document has been parsed.
required required Specifies that the user is required to select a value before submitting the form
The <style> tag is used to define style information (CSS) for a document.
Inside the <style> element you specify how HTML elements should render in a
.1. type: The type attribute specifies the type of stylesheet language being
used within the <style> block. The most commonly used value is "text/css",
which indicates that the styles are written in CSS.
Example: <style type="text/css">...</style>
2. media: The media attribute is used to specify the target media or device
for which the styles defined within the <style> tag are intended. It allows
you to define different styles for different devices, such as screen, print, or
handheld.
3. title: The title attribute is used to provide a title or description for the
<style>block. It helps to provide additional information about the purpose or
context of the styles defined within the <style> tag.
28. Explain <table> tag with any five element specific attributes.
An HTML table consists of one <table> element and one or more <tr>, <th>,
and <td> elements.
The <tr> element defines a table row, the <th> element defines a table
header, and the <td> element defines a table cell.
border: The border attribute specifies the width of the border around the table
and its cells. It defines the visual appearance of the table border.
Example: <table border="1">...</table>
bgcolor: The bgcolor attribute sets the background color for the entire table. It
allows you to customize the background color of the table.
Example: <table bgcolor="#f2f2f2">...</table>
width: The width attribute sets the width of the table. It can be specified in
pixels (px), percentage (%), or other valid CSS length units.
Example: <table width="500">...</table>
cellspacing: The cellspacing attribute defines the space between adjacent cells
in the table. It helps in controlling the spacing and visual separation between
cells.
Example: <table cellspacing="5">...</table>
cellpadding: The cellpadding attribute sets the space between the cell content
and the cell border. It adds padding inside the cells to create spacing around
the content.
Example: <table cellpadding="10">...</table>
summary: The summary attribute provides a brief description or summary of
the table's content. It is useful for accessibility purposes and can be read by
screen readers to provide additional context.
Example: <table summary="Sales data for the year">...</table>
29. Describe <time> element with its datetime attribute.
The element in HTML is used to represent a specific date and/or time on a webpage.
It helps provide semantic meaning to the date or time information and allows
browsers, search engines, and assistive technologies to understand and handle it
appropriately. The datetime attribute is a crucial attribute of the element that specifies
the date and time value associated with the content inside the element.
In the example above, the element is used to display the publication date of an article. The
datetime attribute is set to "2023-06-15T09:30:00", representing the specific date and time
the article was published. The content within the element, in this case, is the human-readable
format of the date, which is "June 15, 2023
30. Describe <video>element with its attributes.
The <video> tag contains one or more <source> tags with different video
sources. The browser will choose the first source it supports.
controls It defines the video controls which is displayed with play/pause buttons.
loop It specifies that the video file will start over again, every time when it is completed.
preload It specifies the author view to upload video file when the page loads.
1. All popular web browsers support JavaScript as they provide built-in execution
environments.
2. JavaScript follows the syntax and structure of the C programming language.
Thus, it is a structured programming language.
3. JavaScript is a weakly typed language, where certain types are implicitly cast
(depending on the operation).
4. JavaScript is an object-oriented programming language that uses prototypes
rather than using classes for inheritance.
5. It is a light-weighted and interpreted language.
6. It is a case-sensitive language.
7. JavaScript is supportable in several operating systems including, Windows,
macOS, etc.
8. It provides good control to the users over the web browsers.
JavaScript provides different data types to hold different types of values. There are
two types of data types in JavaScript.
there are five types of primitive data types in JavaScript. They are as follows:
// Strings:
let color = "Yellow";
let lastName = "Johnson";
// Booleans
let x = true;
let y = false;
let preson=null;
// Object:
const person = {firstName:"John", lastName:"Doe"};
// Array object:
const cars = ["Saab", "Volvo", "BMW"];
// Date object:
const date = new Date("2022-03-25");