22759-4-4RQ AID: 1825 | 26/03/2018
Purpose of “height” and “width” attributes in “<img>” tag:
The purpose of “height” and “width” attributes in “<img>” tag is to allow the browser for appropriate space for an image. If the attributes are given in the tag then the space for the image is reserved when the browser is loaded.
For example:
The following code set the image with height and width. The browser set the size of the image when the page is loaded. The height of the image is “30” pixels and the width of the image is “15” pixels.
<img src= “flower.gif” height= “30” width= “15”>
Hence, the correct answer is option “B”.
Want to see the full answer?
Check out a sample textbook solutionChapter 4 Solutions
Web Development and Design Foundations with HTML5 (9th Edition) (What's New in Computer Science)
- What is the difference between jinja HTML templates from HTML files? (Please select your answer in the given choices) Choice 1 of 5: A jinja template cannot be rendered by browsers Choice 2 of 5: Jinja templates only have HTML elements such as <p>, <div>, etc... Choice 3 of 5: Jinja HTML templates cannot be used with Flask Choice 4 of 5: HTML files have programming instructions such as if-statements and for-loops Choice 5 of 5: None of the abovearrow_forwardThis is my footer code for an HTML 5 page (part of my assignment), but the footer doesn't show up. It just displays the text. Not sure what the issue is. body > footer address { background-color: rgb(222,128,60); color: white; color: rgba(255, 255, 255, 0.7); font: normal small-caps bold 0.9em/3em Quicksand, Verdana, Geneva, sans-serif; text-align: center;}arrow_forward) Use the given code snippet to answer the following question: <style> Html { Font-size: 10px; } Body { Font-size: 2em; Line-height: 1.5em; Color:#1d1d1d; } H1 { Font-size: 3rem Line-height:2em Color:black; } </style> What is the render line-height in pixels for the <h1> element? 120 px 60px 15px 20pxarrow_forward
- Use the give code to answer the following questions: <style> Body { Font-size: 10px Line-height: 1.5rem; } .parent { Font-size: 2rem; Line-height: 1.5cm; Width: 22cm } .child { Display: block; Float: left; Width: 10cm; Font-size: 10px; Line-height: 1.5rem Background -color: yellow; What is the width of the .child element? 150 px 200px 300px 440pxarrow_forwardHow do I add an img with html and css and how do I bring the menu logo on the left on the "menu" textCODE: ---------------------- CSS nav { width: 100%; margin: 0 auto; background: rgb(255, 255, 255); padding: 15px 0; box-shadow: 0px 5px 0px #000000; } nav ul { list-style: none; text-align: center; } nav ul li { display: inline-block; } nav ul li a { display: block; padding: 15px; text-decoration: none; color: rgb(0, 0, 0); font-weight: 800; text-transform: uppercase; margin: 0 10px; } nav ul li a, nav ul li a:after, nav ul li a:before { transition: all .5s; } nav ul li a:hover { color: rgb(255, 0, 0); } /* stroke */ nav.stroke ul li a, nav.fill ul li a { position: relative; } nav.stroke ul li a:after, nav.fill ul li a:after { position: absolute; bottom: 0; left: 0; right: 0; margin: auto; width: 0%; content: '.'; color: transparent; background: rgb(255, 0, 0);…arrow_forwardthis is what I have so far it's not quite right it looks off and I need help to fix it on the image is what I have and the other is the question with an image of what it should look like <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Part 4 - Positions</title> <style> /* element selector */ .left-grassp { position:absolute; left:120px; top:-70px; width: 1100px; height: 109vh; background-color:#414046; } .right-grasspp { position: absolute; left:220px; top:1px; width: 4em; height: 100vh; background-color:#414046; } /* class selector */ .right-sidep { position: absolute;…arrow_forward
- I need them to react similarly to what's going on in this gif I also put the problem in here as well that I'm having a hard time with <!DOCTYPE html><html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>homework 14</title> <style> /*formatting.css */ .sticky-note-title { /* DON'T EDIT ME */ padding: 1rem; font-size: 2rem;}.sticky-note-body { /* DON'T EDIT ME */ transform: rotate(0); padding: 1rem; font-size: 1.5rem;}.sticky-board { /* DON'T EDIT ME */ margin-top: 2em; display: flex; padding: 3em; flex-wrap: wrap; gap: 1em; justify-content: center;}.sticky-note { flex-shrink: 0; width: 20em; height: 20em; /* Add styles here */ }#first { transform: rotate(75deg); transition: transform 500ms; }#second { transform: rotate(75deg); transition: transform 500ms; }…arrow_forward<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Part 1b - Floats</title> <style> /* Finish this rule */ img:nth-of-type(1) { } /* Finish this rule */ img:nth-of-type(2) { } /* don't modify this rule */ p { font-size: 1.25em; text-align: center; } </style></head><body> <img src="https://via.placeholder.com/150"> <img src="https://via.placeholder.com/150"> <p> Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut…arrow_forwardthe html file is like this ---------------------------- <!DOCTYPE html> <html lang="en"> <head> <style>*{ background-color: gray;}a{ text-decoration: none; color: yellow; font-size: 20px;}a:hover{ transition: 1.1px;}input{ background-color: #fff;} .div1 { border:2pxoutsetred; background-color:lightblue; text-align:center; }.boxes{ float: left; width: 49%; border: 2px solid black; background-color: gray; color: #fff;} </style> <script> function maxLengthCheck(object) { if (object.value.length > object.maxLength) object.value = object.value.slice(0, object.maxLength) } function isNumeric (evt) { var theEvent = evt || window.event; var key = theEvent.keyCode || theEvent.which; key = String.fromCharCode (key); var regex = /[0-9]|\./; if ( !regex.test(key) ) { theEvent.returnValue = false; if(theEvent.preventDefault) theEvent.preventDefault(); } } function orderfunction(){ alert("Thank you for ordering from my…arrow_forward
- What is the difference between jinja HTML templates from HTML files? Choice 1 of 5: A jinja templates cannot be rendered by browsers Choice 2 of 5: Jinja templates only have HTML elements such as <p>, <div>, etc... Choice 3 of 5: Jinja HTML templates cannot be used with Flask Choice 4 of 5: HTML files have programming instructions such as if-statements and for-loops Choice 5 of 5: None of the abovearrow_forwardwhat I have so far but it is not working I tried to add an image file to my page i have also included somthing my teacher sent but i can not make sence of it body {font-family: Georgia, serif;font-size: 100%;line-height: 175%;margin: 0 15% 0;background-color:rgb(210,220,157);background-image: url("bullseye.png"); /* Rounded Shape image */background-size: contain;}header {margin-top: 0;padding: 3em 1em 2em 1em;text-align: center;border-radius:4px;background-color:hsl(0, 14%, 95%);opacity:0.5;background-image: url("purpledot.png"); /*purple image*/background-repeat: repeat-x;}a {text-decoration: none;color:rgb(153,51,153);}a:visited{color: hsl(300, 13%, 51%);}a:hover{background-color: #fff;}a:focus{background-color: #fff;}a:active{color:#ff00ff;}h1 {font: bold 1.5em Georgia, serif;text-shadow: 0.1em 0.1em 0.2em gray;color: rgb(153,51,153);}h2 {font-size: 1em;text-transform: uppercase;letter-spacing: 0.5em;text-align: center;color:rgb(204,102,0);}dt {font-weight: bold;}strong {font-style:…arrow_forwardI need help with making the changes needed in the image I have provided the code this is what I have so far Below please help<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>homework 14</title></head><body> <div> <h2>Sticky Note Board</h2> <div class="sticky-board"> <div style="display: relative;"> <div class="sticky-note" id="first"> <div class="sticky-note-title"> Transforms </div> <div class="sticky-note-body">CSS transforms change the shape and position of the affected content without disrupting the normal document flow.</div> </div> </div> <div class="sticky-note" id="second"> <div…arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education