[PDF] Basic HTML 1 - University of Delaware





Previous PDF Next PDF



How to publish html files containing images in OJS 3

If you are linking to an image in your html file simply enter the name of your image file: <img src = ”filename.jpg”>. • After uploading the html file and 



Lecture 5 Images in HTML 1. Images Images are still the most

Images in HTML. 1. Images. Images are still the most common and universal media. Raster image is a type of map image composed of tiny dots called pixels ...



How To Post An Image On The TGHN Website Using The HTML Editor

Website Using The HTML Editor. 1. After uploading the image into the media library copy the media file URL (see below image). 2. Insert/replace the media 



HTML Images

This tutorial will take you through simple steps to use images in your web pages. Insert Image. You can insert any image in your web page by using <img> tag.



HTML et Javascript

19?/05?/2014 Ce code est par conséquent du langage source2 et à l'image du code HTML





Images map es

html#nom_du_map"> pour une map située dans un autre fichier. En fait on ajoute simplement à la balise classique de l'image



Liste indicative de formats ouverts et fermés

TIF (Tagged Image File Format) · JPG (Joint Photographic Expert Group) CPT (Corel Photo-Paint) ... HTML (HyperText Markup Language).



LANGAGE HTML : STRUCTURE GENERALE FORMATAGE DU

Page n°1/6. ISN – Informatique et Sciences du Numérique. LANGAGE HTML : STRUCTURE GENERALE FORMATAGE DU. TEXTE ET INSERTION D'IMAGE. 1 – MISE EN SITUATION.



CLASS 8 COMPUTER SCIENCE CHAPTER 3 LISTS AND IMAGES

LISTS AND IMAGES IN HTML 5. (** Students are instructed to write the answers of the exercise given here in their respective computer booklets and also do 



BEGINNER’S HTML CHEAT SHEET - WebsiteSetup

The HTML element embeds an image into the document The HTML element is used as a child of the media elements and It lets you specify timed text tracks (or time-based data) for example to automatically handle subtitles The tracks are formatted in WebVTT format ( vtt files) — Web Video Text Tracks or



HTML Images - W3Schools

2 Copying text from a word-processing document and pasting it into an HTML template 3 Marking block elements and validating your work 4 Marking inline elements and validating your work 5 Using Netscape Composer 6 Using Word's "Save as HTML" feature 7 Uploading your files to the Web server Prerequisites



Basic HTML 1 - University of Delaware

Exercise 2: Creating an HTML file 1 To start Notepad A Click the “Start” button B Highlight “All Programs ” C Highlight “Accessories ” D Click “Notepad ” E From the “Edit” menu in NotePad select “Word Wrap ” (If “Word Wrap” is already checked you need do nothing ) Continued on next page Information Technologies 5 Basic HTML 1



HTML CHEAT SHEET

An HTML element (or tag) is an individual component of an HTML document Here below is a full list of HTML elements listed by category HTML TAG Speci?es an html document The HTML element (or HTML root element) represents the root of an HTML document All other elements must be descendants of this element Since the



Searches related to image to html filetype:pdf

HTMLCSSBootstrapJavascriptandjQuery 1 4Attributes InFig 1 2wesawanexampleofattribute(i e style)whichchangedthecolorofalltheelementsto‘blue’inside

How to create an image in HTML?

    Use the HTML element to define an image. Use the HTML src attribute to define the URL of the image. Use the HTML alt attribute to define an alternate text for an image, if it cannot be displayed. Use the HTML width and height attributes to define the size of the image. Use the CSS width and height properties to define the size ...

How to change the size of an image in HTML?

    Use the HTML alt attribute to define an alternate text for an image, if it cannot be displayed. Use the HTML width and height attributes to define the size of the image. Use the CSS width and height properties to define the size of the image (alternatively) Use the CSS float property to let the image float.

How do I point to an image on another server?

    To point to an image on another server, you must specify an absolute (full) URL in the src attribute: Notes on external images: External images might be under copyright. If you do not get permission to use it, you may be in violation of copyright laws. In addition, you cannot control external images; they can suddenly be removed or changed.

Basic HTML 1

Information

Technologies

October 2003

Copyright © 2003 University of Delaware. Permission to copy without fee all or part of this material is

granted provided that the copies are not made or distributed for direct commercial advantage or profit

and that the material duplicated is attributed to Information Technologies, University of Delaware. To

copy otherwise or to republish requires specific permission and a fee.

Basic HTML 1

Overview

This class introduces you to HTML (HyperText Markup Language), an easy-to- learn language for creating and formatting documents for the World Wide Web. Web documents can include text, images, animation, sounds, and more.

Prerequisites

To take this class, you must have experience using a browser (e.g., Int ernet Explorer, Netscape) to view documents on the Web. You must also know ho w to create and save text files using a text editor or a word processing pack age and have an active UNIX account. Note: This tutorial is designed to be used at the Pearson Hall Training Cent er (Room 116 Pearson Hall) on PCs running Windows XP. The exercises may n ot work identically elsewhere.

UNIX computer accounts

All University of Delaware faculty, staff, and students can obtain an ac count on the central UNIX server. This account is a privilege granted to you by t he University. You must act responsibly when you use it, or you can lose th is privilege. If you are uncertain about the proper use of computing resour ces, read a copy of the Policy for Responsible Computing on the University's web site

Conventions used in this document

The following conventions are used throughout the exercises in this docu ment:

Document Conventions

Item Convention Example

Keyboard keys UPPERCASE LETTERS ENTER

Text you can replace italicized letters filename

Text you type mixed-case letters gif

(typewriter font) All exercises are labeled as "Exercise" and are set off from the i nstructional text by horizontal rules.

Information Technologies 1

Basic HTML 1

Resources for learning more about WWW and HTML

There are many good online resources with information about preparing documents for the Web, including HTML tutorials, style guides, editors, and other tools. You can find many of them listed at http://www.udel.edu/ide acenter/.

Class objectives

In this class, you will prepare a document for the Web. When you complet e the class, you should: be familiar with the basic structure of HTML.� be able to recognize and identify HTML tags.� be able to create an HTML document that includes the following elements: • basic document-level tags • headings • paragraph and line breaks • lists • styles (bold, italics, etc.) • horizontal rules • images • hyperlinks

�be able to publish your document on a Web server using the SSH Secure Shell File Transfer program.

October 2003 2

Basic HTML 1

Introduction

HyperText Markup Language (HTML) is the language used to create documents for the World Wide Web. A markup language consists of characters or symb ols that you insert in a text file to indicate how the text should look when it is displayed or printed. A Web browser allows others to view your work; bro wsers retrieve Web information and format Web documents. Designing documents for the Web requires a shift in the way you think ab out presenting your material. When you prepare a document for the Web, you concentrate on the content and structure of your information rather than on how the information will look on the page (fonts, etc.). In fact, what you put on the Web may look very different on different computers. On the Web, it is the individual browser and often also the user that co ntrol what font will be used to display headings or text, whether something will be bold or italics, and so forth. So when you write text for the Web, don't worr y about what font you are using. Instead, think about the content of your document an d about the most effective way of structuring your message.

Planning your Web site

Planning your Web site ahead of time will help you stay organized and pr esent your ideas to your audience in the best possible way. It is helpful to s ketch your site on paper so that you have a visual image of how it will look. Each site begins with a home page that can lead to other pages, depending upon how much information you want to convey. Some helpful considerations in planning your site are 1. �What is your purpose for doing a Web page? What type of information do you want to provide for people? How can you best organize that informati on so that people will be able to find it easily? 2. �Who is your audience? How should you present your information for the audience you want to reach? Are they interested in quick facts? In getti ng instructions for registering for classes? In being entertained? Once you've identified your audience, you can decide what type of a W eb page will appeal to them. Is plain text appropriate or will your audienc e expect graphics, sound, and animation? Knowing your purpose and audience ahead of time will guide your decision s about structuring your Web site.

Information Technologies 3

Basic HTML 1

Setting up your Web directory

For people to see a Web site, its files must be placed on a Web server.

At the

University of Delaware, a UNIX Web server named "udel.edu" holds individuals' Web files. The "www.udel.edu" UNIX Web server hold s official University Web files. To allow the "udel.edu" server to find your

Web files, you

must place them in a directory on your account on Copland called "pub lic_html." If you have never created a public_html directory, follow the directions below to do so.

Exercise 1: Setting up a public_html directory

1. �In the Applications folder, double-click the "Secure Shell Client" icon. In the dialog box that appears, type your username and click "Connect." I f you see a question about saving your "host key" to the local database, ans wer "No." In the next dailog box, type your password and click "OK." 2. �Create your public_html directory and give it the permissions necessary to display web pages. At the UNIX (%) prompt, type source /www/htdocs/learn/usered/html-setup 3. �Press the ENTER key. In addition to your public_html directory, you now have two shortcut com mands (type the command at the UNIX % prompt): * webpublish--If you create a subdirectory of your public_html directory, you must make the files it contains available for readers. To do so, log into Copland, change to the new directory using the "cd" command, then type "webpublish" at the UNIX prompt. * webdiskusage--You can find out how much space your files occupy in your home directory by typing this command, then pressing the ENTER key. For information about quotas, read the IT Help Center disk quota information 4. �Click the Minimize (underscore) button at the top right of the window to minimze it.

HTML tags

Before you write an HTML document, decide how you will structure it. Wha t will the major heading be? How many subordinate headings will you have; how much text will you include; will you use lists, and so on. You'll pre sent your structure to your audience through special codes called HTML tags.

October 2003 4

Basic HTML 1

HTML documents consist of text, images, and HTML tags for labeling each element. Tags come in pairs (i.e., a beginning tag and an ending tag) and are enclosed by angle brackets (the "less than" and "greater than" signs). The format for an HTML tag is text Note that the ending tag name is preceded by a slash (/). It is import ant to include the ending tag with its slash character. Otherwise, the rest of your doc ument will have the properties of the tag you forgot to finish.

Preparing an HTML document

In this class, you will prepare an HTML document for viewing on the Web. The procedure for preparing any Web document is 1. �Type your text in a text editor: use Notepad in Windows, TextEdit on the Macintosh, or pico in UNIX. If you use a program like Microsoft Word, yo u must save your file as a text file before you can use it on the Web. (A tex t file contains only text; it does not contain any formatting codes [for l ayout, headings, etc.].) 2. �Save the file as a text file. 3. �View the Web page you've created in your Web browser. In the following exercise, you will begin your HTML file. The same HTML tags are used for every browser.

Exercise 2: Creating an HTML file

1. �To start Notepad, A. �Click the "Start" button. B. �Highlight "All Programs." C. �Highlight "Accessories." D. �Click "Notepad." E. �From the "Edit" menu in NotePad, select "Word Wrap." (If "Word

Wrap" is already checked, you need do nothing.)

Continued on next page

Information Technologies 5

Basic HTML 1

Exercise, continued

2. �Type the following text. Press the ENTER key at the end of each line: <h3>Preparing a Document for the World Wide Web</h3>

Preparing a Document for the World Wide Web

3. �From the "File" menu, select "Save." When the "Save As" dialog box appears, click the down arrow next to the "Save In:" box. Click (

C:), then

double click "Scratch." Give your file the name index.html 4. �Open the browser. In the Applications folder, double-click the "Netsc ape" icon. 5. �From the File Menu, select "Open File." 6. �Select the drive or folder where your HTML file is located. 7. �Select the name of the file you want to open: index.html 8. �Click "Open." Your HTML file will appear in the browser window. 9. �Return to your text editor (Notepad) by clicking its name in the Taskb ar at the bottom of the screen. Note: As you continue to create the document, check its appearance often. To do this: 1. �Save the changes that you've made. 2. �From the appropriate menu or toolbar in your browser, select "Reload current page" to view the changes. There is no need to close either the editor or the browser as you work.

October 2003 6

Basic HTML 1

The file you have just created contains the essential elements of every HTML file: �Every HTML file name has two parts, separated by a period. The first par t is any name you want to give the file. The second part must be "html." �Every HTML file begins and ends with the and tags. The section of your document contains its title (and may contain other preliminary information). Information in the section is me ant for the browser and is not generally displayed on the screen (except fo r the which appears in the browser window at the very top of the scree n). Text and images that you want to see displayed on the screen go into the <body> section of your document. <h3>Naming your home page</h3> Most Web sites contain multiple files that are linked to a "home page " (your main or introductory page). The most efficient way to handle a home pag e is to give it the name index.html The advantage to naming your home page "index.html" is that most b rowsers will display the "index.html" file if no specific HTML filename is given. Thus, people searching for your personal Web page on the "udel.edu" Web server only have to know your username to be able to find your files, and people on the University's central Web server only have to know the name of the dir ectory in which your files reside. They do not have to remember an HTML filename t o get to your information. <h3>Headings</h3> The organization of your document depends upon your effective use of hea dings to produce manageable sections. There are six heading levels in HTML, numbered 1 through 6, from most important to least important: <h1>Heading level 1</h1> most important <h2>Heading level 2</h2> <h3>Heading level 3</h3> <h4>Heading level 4</h4> <h5>Heading level 5</h5> <h6>Heading level 6</h6> least important Headings are usually larger and bolder than regular HTML text. However, do not assume that the way each heading appears on your computer screen will be the <h3>Information Technologies 7</h3> <h3>Basic HTML 1</h3> way it looks on every computer. Each browser can define how the headings look, and the user can often change settings too. For this reason, use heading s to show how your information is organized logically. This means that you would u se a level 3 heading after a level 2 heading and not before. The first heading of a document - which often repeats the text used for the title - should use an <h1> tag. Most documents use only one <h1> tag. H eadings are automatically followed by a blank line. <h3>Paragraphs</h3> To indicate paragraphs in HTML, use the <p> and </p> tags. 1. �The paragraph tag (<p>) indicates breaks between paragraphs by inserti ng a blank line between them on the browser page. 2. �Blank lines in your text file are ignored. Only a <p> tag produces a bla nk line on the browser page. 3. �Tabs and multiple spaces are collapsed into one space. 4. �Word wrapping can occur anywhere in your text document and doesn't affect the appearance of your browser page. In other words, you could ty pe whole paragraphs or your entire HTML document on one line and still have the page nicely formatted in the browser. (This isn't recommended be cause it makes editing the text difficult.) 5. �To include short lines in your Web document with no extra spaces between lines (for example, lines in a mailing address or a poem), use the lin e break <br /> tag. To see how the paragraph and line break tags work in HTML, complete the following exercise: <h3>Exercise 3: Adding paragraphs</h3> 1. �In your "index.html" file, between the </h1> and the </body> lines , type the following as it appears here, including the blank line. To make your tex t file easy to edit, press the ENTER key at the end of each line. <p> <h3>Creating HTML pages takes planning,</h3> but the results are worthwhile. Imagine the excitement of having your Web page seen by people all over the world. </p> <h3>Continued on next page</h3> <h3>October 2003 8</h3> <h3>Basic HTML 1</h3> <h3>Exercise, continued</h3> <p> <h3>Keep your Web pages to a few screens each.</h3> You can link information together, so don't worry about including everything at once. </p> <p> <h3>Remember that readers do not always find</h3>quotesdbs_dbs21.pdfusesText_27</div> <style> .ahover:hover{ background:#efefef; } </style> <div style="padding:5px; font-size:22px;"> <a href="https://pdfprof.com/PDFV2/Documents1/87395/39" style="font-size:27px;padding:0.5%;border:1px solid #aaa;width:99%;display:block;" class="ahover">[PDF] imagenet attributes</a><br/><br/> <a href="https://pdfprof.com/PDFV2/Documents1/87397/39" style="font-size:27px;padding:0.5%;border:1px solid #aaa;width:99%;display:block;" class="ahover">[PDF] images on australia's 50 cent coin crossword clue</a><br/><br/> <a href="https://pdfprof.com/PDFV2/Documents1/87398/39" style="font-size:27px;padding:0.5%;border:1px solid #aaa;width:99%;display:block;" class="ahover">[PDF] images on australian 50 cent coin crossword</a><br/><br/> <a href="https://pdfprof.com/PDFV2/Documents1/87399/39" style="font-size:27px;padding:0.5%;border:1px solid #aaa;width:99%;display:block;" class="ahover">[PDF] imago appreciation dialogue</a><br/><br/> <a href="https://pdfprof.com/PDFV2/Documents1/87400/39" style="font-size:27px;padding:0.5%;border:1px solid #aaa;width:99%;display:block;" class="ahover">[PDF] imago dialogue 101</a><br/><br/> <a href="https://pdfprof.com/PDFV2/Documents1/87401/39" style="font-size:27px;padding:0.5%;border:1px solid #aaa;width:99%;display:block;" class="ahover">[PDF] imago dialogue flow chart</a><br/><br/> <a href="https://pdfprof.com/PDFV2/Documents1/87402/39" style="font-size:27px;padding:0.5%;border:1px solid #aaa;width:99%;display:block;" class="ahover">[PDF] imago relationship therapy exercises pdf</a><br/><br/> <a href="https://pdfprof.com/PDFV2/Documents1/87403/39" style="font-size:27px;padding:0.5%;border:1px solid #aaa;width:99%;display:block;" class="ahover">[PDF] imago therapy oprah</a><br/><br/> <a href="https://pdfprof.com/PDFV2/Documents1/87404/39" style="font-size:27px;padding:0.5%;border:1px solid #aaa;width:99%;display:block;" class="ahover">[PDF] imago therapy worksheets pdf</a><br/><br/> <a href="https://pdfprof.com/PDFV2/Documents1/87405/39" style="font-size:27px;padding:0.5%;border:1px solid #aaa;width:99%;display:block;" class="ahover">[PDF] imca dp checklist</a><br/><br/> <a href="https://pdfprof.com/PDFV2/Documents1/87407/39" style="font-size:27px;padding:0.5%;border:1px solid #aaa;width:99%;display:block;" class="ahover">[PDF] imdb data analysis</a><br/><br/> <a href="https://pdfprof.com/PDFV2/Documents1/87408/39" style="font-size:27px;padding:0.5%;border:1px solid #aaa;width:99%;display:block;" class="ahover">[PDF] imdb dataset analysis python</a><br/><br/> <a href="https://pdfprof.com/PDFV2/Documents1/87411/39" style="font-size:27px;padding:0.5%;border:1px solid #aaa;width:99%;display:block;" class="ahover">[PDF] imf 2019</a><br/><br/> <a href="https://pdfprof.com/PDFV2/Documents1/87412/39" style="font-size:27px;padding:0.5%;border:1px solid #aaa;width:99%;display:block;" class="ahover">[PDF] imf arabic glossary</a><br/><br/> <a href="https://pdfprof.com/PDFV2/Documents1/87413/39" style="font-size:27px;padding:0.5%;border:1px solid #aaa;width:99%;display:block;" class="ahover">[PDF] imf country classification 2019</a><br/><br/> </div> </div> </div> <div class="left"> <br/> <div style="width:100%;padding:2px;"> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1570187411384203" crossorigin="anonymous"></script> <!-- Responsive1 --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-1570187411384203" data-ad-slot="2836242943" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> <br/> <br/> <br/> <br/> <div style="background:#efefef;"><br/></div> </div> <div> <style> .exit-intent-popup { position: fixed; top: 0; left: 0; bottom: 0; right: 0; z-index: 1; background: rgba(33, 33, 33, 0.8); transform: translateY(60%) scale(0); transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1); } .exit-intent-popup.visible { transform: translateY(0) scale(1); } .newsletter { position: absolute; top: 20%; left: 20%; transform: translate(-20%, -20%); } /* Popup-specific styles */ .newsletter { background: #FFF; padding: 10px; border-radius: 3px; } .close { position: absolute; top: 10px; right: 10px; cursor: pointer; width: 20px; height: 20px; font-size:18px; } </style> <link rel="stylesheet" href="popup.css" /> <div class="exit-intent-popup"> <div class="newsletter"> <span>Nous vous remercions chaleureusement pour votre soutien et votre générosité.</span><br/> <br/> <img src="https://pdfprof.com/PDFV2/6oB.gif" style="max-width:100%;"/> <div style="width:100%;"> <a href="https://www.facebook.com/sharer/sharer.php?u=https://pdfprof.com/PDFV2/Documents1/87394/39/14" rel="nofollow" target="_blank" style="margin-right: 5px; background: #03A9F4; color: white; padding: 1%; font-size:15px; width:46%; ">Share on Facebook</a> <a href="https://api.whatsapp.com/send?text=imf+country+classification+2019+Download+From++-+https%3A%2F%2Fpdfprof.com%2FPDFV2%2FDocuments1%2F87394%2F39%2F14" rel="nofollow" target="_blank" style="background: #4CAF50; color: white; padding: 1%; width:48%; font-size:15px;">Share on Whatsapp</a> </div> <br/> <span class="close">x</span> </div> </div> <script> /* const CookieService = { setCookie(name, value, days) { let expires = ''; if (days) { const date = new Date(); date.setTime(date.getTime() + (days * 12 * 60 * 60 * 1000)); expires = '; expires=' + date.toUTCString(); } document.cookie = name + '=' + (value || '') + expires + ';'; }, getCookie(name) { const cookies = document.cookie.split(';'); for (const cookie of cookies) { if (cookie.indexOf(name + '=') > -1) { return cookie.split('=')[1]; } } return null; } }; const exit = e => { const shouldExit = [...e.target.classList].includes('exit-intent-popup') || // user clicks on mask e.target.className === 'close' || // user clicks on the close icon e.keyCode === 27; // user hits escape if (shouldExit) { document.querySelector('.exit-intent-popup').classList.remove('visible'); } }; const mouseEvent = e => { const shouldShowExitIntent = !e.toElement && !e.relatedTarget && e.clientY < 10; if (shouldShowExitIntent) { document.removeEventListener('mouseout', mouseEvent); document.querySelector('.exit-intent-popup').classList.add('visible'); CookieService.setCookie('exitIntentShown', true, 30); } }; if (!CookieService.getCookie('exitIntentShown')) { setTimeout(() => { document.addEventListener('mouseout', mouseEvent); document.addEventListener('keydown', exit); document.querySelector('.exit-intent-popup').addEventListener('click', exit); }, 0); } */ </script> <!-- Trigger/Open The Modal --> <!-- The Modal --> <div> <div id="myModal" class="modal"> <!-- Modal content --> <div class="modal-content"> <span class="closeA">×</span> <style> .downlink{ border:1px solid #aaa;color:white;padding:8px;width:98%;color:white;background:green;display:block; } .downlink:hover{ background:blue; cursor:pointer; } </style> <table style="width:80%;"> <tr style="width:100%;"> <td style="width:50%;"><a href="https://pdfprof.com/PDFV2/ShowLink_1.php?vidt=87394&vt=39&links=https%3A%2F%2Fwww1.udel.edu%2Fit%2Fhelp%2Fweb-development%2FHTML103.pdf" class="downlink" target="_blank">PDF Download</a> </td> <td style="width:45%;"><a href="https://pdfprof.com/PDFV2/Documents1/87394/39/15" class="bblinkss"> Next PDF </a> </td></tr> </table> <iframe id="ppifa" frameBorder="0" width="100%" src="https://pdfprof.com/PDFV2/getFrameTestV3.php?links=https://www1.udel.edu/it/help/web-development/HTML103.pdf&idt=87394&t=39&view=14&url=https://pdfprof.com/PDFV2/Documents1/87394/39/14" style="width:100%;height:90vh;" ></iframe> <script> /* var iframe = document.getElementById("ppifa"); var srcv=iframe.src; var loadingStatus = false; function abc(){ iframe.onload = function () { loadingStatus = true; console.log('ok is loaded iframe'); } if(loadingStatus==false) { iframe.src=srcv; } } abc(); */ </script> </div> </div> </div> <style> body {font-family: Arial, Helvetica, sans-serif;} /* The Modal (background) */ .modal { display: none; /* Hidden by default */ position: fixed; /* Stay in place */ z-index: 1; /* Sit on top */ padding-top: 10px; /* Location of the box */ left: 0; top: 0; width: 100%; /* Full width */ height: 100%; /* Full height */ overflow: auto; /* Enable scroll if needed */ background-color: rgb(0,0,0); /* Fallback color */ background-color: rgba(0,0,0,0.4); /* Black w/ opacity */ } /* Modal Content */ .modal-content { background-color: #fefefe; margin: auto; padding: 5px; border: 1px solid #888; width: 90%; } /* The Close Button */ .closeA { color: #aaaaaa; float: right; font-size: 28px; font-weight: bold; background:red; padding:5px; } .closeA:hover, .closeA:focus { color: #000; text-decoration: none; cursor: pointer; } </style> <script> // Get the modal var modal = document.getElementById("myModal"); // Get the button that opens the modal var btn = document.getElementById("myBtn"); // Get the <span> element that closes the modal var span = document.getElementsByClassName("closeA")[0]; // When the user clicks the button, open the modal btn.onclick = function() { modal.style.display = "block"; } // When the user clicks on <span> (x), close the modal span.onclick = function() { modal.style.display = "none"; } // When the user clicks anywhere outside of the modal, close it window.onclick = function(event) { if (event.target == modal) { modal.style.display = "none"; } } </script> </body> </html>