1. Add code to the HTML file to reference the script.js file
using best practices. Other than this, do not modify either
the HTML or CSS file.
2. In the script.js file set strict mode for JavaScript.
3. Create a new h3 element with your name in it and insert it
before the first paragraph.
4. In the footer, add a cite element with the text "Information and
photos from Wikipedia" where "Wikipedia" is a link to the page
"https://en.wikipedia.org/wiki/Bumblebee".
5. console.log the number of paragraphs with some descriptive text
(open the browser console to see the output).
6. Add the class "special" to the second h2 element.
7. Select all the figcaptions and make the font italic. (This will
require a loop or a .forEach() method.)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
HTML
<!DOCTYPE html>
<html lang="en">
<!-- DO NOT MODIFY THIS FILE OTHER THAN REFERENCING THE SCRIPT
FILE -->
<head>
<meta charset="UTF-8">
<title>Assignment 5</title>
<link href="style.css" rel="stylesheet" />
<script src="script_Amisha.js"
defer></script>
</head>
<body>
<header>
<h1>Bumblebee</h1>
</header>
<main>
<h2>General description</h2>
<figure><img src="bee1.jpg" />
<figcaption>A common bumblebee extending
its tongue towards a Heuchera inflorescence.
</figcaption>
</figure>
<p>Bumblebees vary in appearance, but are
generally plump and densely furry. They are larger, broader
and
stouter-bodied than honeybees, and their
abdomen tip is more rounded. Many species have broad bands of
colour, the
patterns helping to distinguish different
species. Whereas honeybees have short tongues and therefore
mainly
pollinate open flowers, some bumblebee species
have long tongues and collect nectar from flowers that are
closed
into a tube. Bumblebees have fewer stripes (or
none), and usually have part of the body covered in black
fur,
while honeybees have many stripes including
several grey stripes on the abdomen. Sizes are very variable
even
within species; the largest British species,
B. terrestris, has queens up to 22 mm long, males up to 16
mm long, and workers between 11 and 17 mm
long. The largest bumblebee species in the world
is
B. dahlbomii of Chile, up to about 40 mm long,
and described as "flying mice" and "a monstrous fluffy
ginger beast".</p>
<h2>Distribution and habitat</h2>
<figure><img src="bee2.jpg" />
<figcaption>Cuckoo bumblebees have
similar warning coloration to
nest-making
bumblebees.</figcaption>
</figure>
<p>Bumblebees are typically found in
temperate climates, and are often found at higher latitudes and
altitudes than
other bees, although a few lowland tropical
species exist. A few species (B. polaris and B. alpinus)
range
into
very cold climates where other bees might not
be found; B. polaris occurs in northern Ellesmere Island in the
high
Arctic, along with another bumblebee B.
hyperboreus, which parasitises its nest. This is the
northernmost
occurrence
of any eusocial insect. One reason for their
presence in cold places is that bumblebees can regulate their
body
temperature, via solar radiation, internal
mechanisms of "shivering" and radiative cooling from the
abdomen
(called
heterothermy). Other bees have similar
physiology, but the mechanisms seem best developed and have been
most
studied
in bumblebees. They adapt to higher elevations
by extending their wing stroke amplitude. Bumblebees have a
largely cosmopolitan distribution but are
absent from Australia (apart from Tasmania where they have
been
introduced) and are found in Africa only north
of the Sahara. More than a hundred years ago they were also
introduced to New Zealand, where they play an
important role as efficient pollinators.</p>
</main>
<footer>
</footer>
</body>
</html>
1. Add code to the HTML file to reference the script.js file using best practices. Other than this, do not modify either
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am