New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
6th Edition
ISBN: 9781305503922
Author: Patrick M. Carey
Publisher: Cengage Learning
Question
Book Icon
Chapter 9, Problem 12CP1
Program Plan Intro

To write the JavaScript code for page element with ID plainsphere and use the function insertAdjacentHTML() to insert value of variable imgStr directly after elements opening tag.

Blurred answer
Students have asked these similar questions
For the <span> element, set the left border to be 3 pixels, double, and red.   span {     }
HTML True or False One can use padding inside a paragraph but not a div to enlarge the total size of the block element. (True or false)? Assume you do not use a border statement for an internally placed  block element inside a div element. You can displace the element from the top of an                                                                     enclosing div element by either using margin-top in its selector command, but NOT alternatively by employing a padding command inside its enclosing div element css selector. (True or false)? Paragraphs  and header elements can have multiple span tabs , multiple images and multiple text but all are  not  held in an  embedded vertical block structure. (True or false)?      One URL location within a single  <a> html element can be accessed by a combination  of multiple alternating text elements and images as long as the Link in not terminated by </a> until all the images and text elements have been created. (True or…
<style>// selecting required elementconst element = document.querySelector(".pagination ul");let totalPages = 10;let page = 2; //calling function with passing parameters and adding inside element which is ul tagelement.innerHTML = createPagination(totalPages, page);function createPagination(totalPages, page){  let liTag = '';  let active;  let beforePage = page - 1;  let afterPage = page + 1;  if(page > 1){ //show the next button if the page value is greater than 1    liTag += `<li class="btn prev" onclick="createPagination(totalPages, ${page - 1})"><span><i class="fas fa-angle-left"></i> Prev</span></li>`;  }   // how many pages or li show before the current li  if (page == totalPages) {    beforePage = beforePage - 2;  } else if (page == totalPages - 1) {    beforePage = beforePage - 1;  }  // how many pages or li show after the current li  if (page == 1) {    afterPage = afterPage + 2;  } else if (page == 2) {    afterPage  = afterPage +…
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Cengage Learning
Text book image
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage