IES: JS-deck 8 Flashcards

1
Q

HTML innerHeight

A
  • HTML Name, Window Object, or Property
  • JS significant: avoid for variable/function names
  • returns the height of a window’s content area: read only
  • Syntax
    window.innerHeight
    OR
    innerHeight
  • Example
    let height = window.innerHeight;
    (get the window height)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

HTML innerWidth

A
  • HTML Name, Window Object, or Property
  • JS significant: avoid for variable/function names
  • returns the width of a window’s content area: read only
  • Syntax
    window.innerWidth
    OR
    innerWidth
  • Example
    let height = window.innerWidth;
    (get the window width)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

HTML layer

A
  • HTML Name, Window Object, or Property
  • JS significant: avoid for variable/function names
  • positions and animates (through scripting) elements
  • separate doc on top of the main one, all in one window
  • deprecated
  • Syntax
<layer id = "layer1" 
       top = "" 
       left = "" 
       width = "" 
       height = "" 
       bgcolor = "">
<p>layer 1</p>
</layer>
  • Example
<!DOCTYPE html>
<html>
<head>
   <title>HTML layer Tag</title>
</head>
<body>
   <layer id = "layer1" 
            top = "250" 
            left = "50" 
            width = "200" 
            height = "200" 
            bgcolor = "red">
            <p>layer 1</p>
   </layer>
   <layer id = "layer2" 
           ...
            <p>layer 2</p>
   </layer>
   <layer id = "layer3" 
          ...
            <p>layer 3</p>
   </layer>
</body>
</html>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

HTML layers

A
  • HTML Name, Window Object, or Property
  • JS significant: avoid for variable/function names
  • positions and animates (through scripting) elements
  • separate doc on top of the main one, all in one window
  • deprecated
  • Syntax
<layer id = "layer1" 
       top = "" 
       left = "" 
       width = "" 
       height = "" 
       bgcolor = "">
<p>layer 1</p>
</layer>
  • Example
<!DOCTYPE html>
<html>
<head>
   <title>HTML layer Tag</title>
</head>
<body>
   <layer id = "layer1" 
            top = "250" 
            left = "50" 
            width = "200" 
            height = "200" 
            bgcolor = "red">
            <p>layer 1</p>
   </layer>
   <layer id = "layer2" 
           ...
            <p>layer 2</p>
   </layer>
   <layer id = "layer3" 
          ...
            <p>layer 3</p>
   </layer>
</body>
</html>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

HTML link

A
  • HTML Name, Window Object, or Property
  • JS significant: avoid for variable/function names
  • allow users to click their way from page to page
  • Syntax
    <a href="url">link text</a>
  • Example
    <a href="https://www.w3schools.com/">Visit W3Schools.com!</a>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

HTML location

A
  • HTML Name, Window Object, or Property
  • JS significant: avoid for variable/function names
  • contains info about current URL
  • a property of the window object
  • Syntax
    window.location
    OR
    location
  • Examples
    let origin = window.location.origin;
    &
    let origin = location.origin;
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

HTML mimeTypes

A
  • HTML Name, Window Object, or Property
  • JS significant: avoid for variable/function names
  • MIME: Multi-purpose Internet Mail Extensions
  • A standard way of classifying file types on the internet
  • consists of two parts: a type and a subtype (text/html)
  • Syntax
    type "/" [tree "."] subtype ["+" suffix]
  • Example
    application/vnd.api+json
    (This is an API-specific MIME type, and it refers to JSON API :
    In this example, we have “application” as the type and “api” as the subtype. The “vnd.” is the vendor prefix while the “+json” is the suffix, indicating that it can be parsed as JSON.)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

HTML navigate

A
  • HTML Name, Window Object, or Property
  • JS significant: avoid for variable/function names
  • The <nav> tag defines a set of navigation links: The <nav> element is intended only for major blocks of navigation links.
  • Default CSS Settings
nav {
  display: block;
}
  • Example
<nav>
  <a href="/html/">HTML</a> |
  <a href="/css/">CSS</a> |
  <a href="/js/">JavaScript</a> |
  <a href="/python/">Python</a>
</nav>

(a set of navigation links)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

HTML navigator

A
  • HTML Name, Window Object, or Property
  • JS significant: avoid for variable/function names
  • contains browser info
  • is a window object property
  • Accessed with
    window.navigator
    OR
    navigator
  • Examples
    let url = window.navigator.language;
    &
    let url = navigator.language;
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

HTML frames

A
  • HTML Name, Window Object, or Property
  • JS significant: avoid for variable/function names
  • defines one particular window (frame) within a <frameset>
  • NOT SUPPORTED IN HTML5
  • Divides browser window into multiple sections: each can load a separate HTML doc independently.
  • Collection of frames in browser window known as frameset.
  • Window divided similar to table organization: rows/columns
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

HTML frameRate

A
  • HTML Name, Window Object, or Property
  • JS significant: avoid for variable/function names
  • the speed at which images, called frames, appear on a display
  • measured in frames per second (FPS): Specifies the number of frames to be displayed every second
* Syntax
frameRate( c )

(c = number of times a second an attempt will be made to refresh the display)
* Example

function setup() { 
    // Create canvas of given size 
    createCanvas(500, 200); 
    // Set the font size 
    textSize(20); 
    // Use frameRate() function 
    frameRate(3); 
} 
function draw() { 
    // Set the background color 
    background(0, 153, 0); 
    // Display the output 
    text("Frame Count with frameRate " +  
         int(getFrameRate()), 100, 100); 
} 
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

HTML hidden

A
  • HTML Name, Window Object, or Property
  • JS significant: avoid for variable/function names
  • a Global Attribute
  • A Boolean value
  • When present, specifies is not yet, or is no longer, relevant
  • Browsers don’t display when hidden attribute is specified
  • Can keep hidden until condition is met (checkbox, etc.)
  • JS can remove
  • Example
    <p hidden>This paragraph should be hidden.</p>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

HTML history

A
  • HTML Name, Window Object, or Property
  • JS significant: avoid for variable/function names
  • Property of the Window Object: contains the URLs visited
  • Access with:
    window.history or just history
  • Examples
    1. let length = window.history.length;
    2. let length = history.length;
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

HTML image

A
  • HTML Name, Window Object, or Property
  • JS significant: avoid for variable/function names
  • used to embed an image in a web page.
  • Not technically inserted into, images are linked to web pages: The tag creates a holding space for the referenced image.
  • Tag is empty, it contains attributes only: It has two required attributes.
    1. src - Specifies the path to the image
    2. alt - Specifies an alternate text for the image
  • Syntax
    <img src="url" alt="alternatetext">
  • Example
    <img src="img_chania.jpg" alt="Flowers in Chania">
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

HTML images

A
  • HTML Name, Window Object, or Property
  • JS significant: avoid for variable/function names
  • used to embed an image in a web page.
  • Not technically inserted into, images are linked to web pages: The tag creates a holding space for the referenced image.
  • Tag is empty, it contains attributes only: It has two required attributes.
    1. src - Specifies the path to the image
    2. alt - Specifies an alternate text for the image
  • Syntax
    <img src="url" alt="alternatetext">
  • Example
    <img src="img_chania.jpg" alt="Flowers in Chania">
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

HTML offscreenBuffering

A
  • HTML Name, Window Object, or Property
  • JS significant: avoid for variable/function names
  • Sets/retrieves whether objects drawn offscreen before visible
  • Syntax
    window.offscreenBuffering [ = vBuffering ]
  • vBuffering (Boolean) specifies/receives following values:
    1. auto (Default)- MSIE decides when offscreen buffering used.
    2. true (Boolean)- enables offscreen buffering.
    3. false (Boolean)- disables offscreen buffering.
  • (Property is read/write)
17
Q

HTML open

A
  • HTML Name, Window Object, or Property
  • JS significant: avoid for variable/function names
  • Boolean attribute: when present, details are visible (default)
  • Used only on <details>
  • Example
<details open>
  <summary>Copyright 1999-2014.</summary>
  <p> - by Refsnes Data. All Rights Reserved.</p>
  <p>All content and graphics on this web site are the property of the company Refsnes Data.</p>
</details>
18
Q

HTML opener

A
  • HTML Name, Window Object, or Property
  • JS significant: avoid for variable/function names
  • property refers to the window creating the window
  • Syntax
    *window*.opener
  • Example
const myWindow = window.open("", "", "width=300,height=300");
myWindow.opener.document.getElementById("demo").innerHTML = "HELLO!";
  • (Opens a window and writes some text in opener window)
19
Q

HTML option

A
  • HTML Name, Window Object, or Property
  • JS significant: avoid for variable/function names
  • Defines an option in a select list.
  • goes inside <select>, <optgroup>, or <datalist>
  • !Can be without attributes, but usually needs value attribute
  • “value” indicates what is sent to server on form submission.
  • (Long option list?, group related options in <optgroup>)
  • Example
<label for="cars">Choose a car:</label>
<select id="cars">
  <option value="volvo">Volvo</option>
  <option value="saab">Saab</option>
  <option value="opel">Opel</option>
  <option value="audi">Audi</option>
</select>
20
Q

HTML outerHeight

A
  • HTML Name, Window Object, or Property
  • JS significant: avoid for variable/function names
  • property returns outer height of browser window, including all interface elements (like toolbars/scrollbars)
  • read only
  • Syntax
    window.outerHeight
    or
    outerHeight
  • Return Value
    Browser window height, all interface elements, in pixels