Shared Flashcard Set

Details

HTML Q-A Set 1
W3 Schools HTML Tutorial
100
Computer Science
Professional
12/05/2020

Additional Computer Science Flashcards

 


 

Cards

Term

An HTML _____ is everything from the start tag to the end tag.

Definition

element

Term
All HTML documents must start with a document type declaration: _____.
Definition
<!DOCTYPE html>
Term
The HTML document itself begins with _____ and ends with _____ tags.
Definition
<html>, </html>
Term
The visible part of the HTML document is between _____ and _____ tags.
Definition
<body>, </body>
Term
The _____ declaration represents the document type, and helps browsers to display web pages correctly.
Definition
<!DOCTYPE>
Term
All HTML elements can have _____ that provide additional information about the element.
Definition
attributes
Term
Attributes are always specified in the _____.
Definition
start/opening tag
Term
You should always include the _____ attribute inside the <html> tag, to declare the language of the Web page.
Definition
lang
Term
W3C recommends HTML attributes be written in _____ and their associated values be enclosed in _____.
Definition
lowercase, quotes
Term

The text inside a _____ element is displayed in a fixed-width font (usually Courier), and it preserves both spaces and line breaks.

Definition
<pre>
Term

Setting the style of an HTML element, can be done with the _____ attribute.

Definition
"style"
Term
HTML supports _____ standard color names.
Definition
140
Term
HTML colors can be specified in what six(6) methods:
Definition
a.color name
b.RGB
c.HEX
d.HSL
e.RGBA
f.HSLA
Term
An _____ color value is an extension of RGB with an Alpha channel (opacity).
Definition
RGBA
Term
In HTML, a color can be specified using a hexadecimal value in the form: _____
Definition
#rrggbb
Term
HSL stands for _____, _____, and _____.
Definition
hue, saturation, and lightness
Term
CSS can be added to HTML documents in what 3 ways:
Definition
a. Inline
b. Internal
c. External
Term
CSS code added by using the style attribute inside HTML elements is _____ CSS.
Definition
inline
Term
CSS code added by using a <style> element in the <head> section is _____ CSS.
Definition
internal
Term
CSS code added by using a <link> element to link to an external CSS file is _____ CSS.
Definition
external
Term
You would use _____ [CSS] if you wanted to apply a unique style to a single HTML element.
Definition
inline CSS
Term
You would use _____ [CSS] if you wanted to define a style for a single HTML page.
Definition
internal CSS
Term
You would use _____ [CSS] if you wanted to define the style for many HTML pages.
Definition
an external style sheet
Term
The HTML <a> tag defines a hyperlink. It has the following syntax:
Definition
<a href="url">link text</a>
Term
The most important attribute of the <a> element is the _____ attribute, which indicates the link's destination.
Definition
href
Term
The _____ attribute specifies where to open a document when its link is clicked on.
Definition
target
Term
A target attribute with the value _____ will open the document in the same window/tab as it was clicked.
Definition
"_self"
Term
A target attribute with the value _____ will open the document in a new window or tab.
Definition
"_blank"
Term
A target attribute with the value _____ will open the document in the parent frame.
Definition
"_parent"
Term
A target attribute with the value _____ will open the document in the full body of the window.
Definition
"_top"
Term
Use _____ inside the href attribute to create a link that opens the user's email program.
Definition
"mailto:"
Term
To use an HTML button as a link, you have to add some _____ code.
Definition
JavaScript
Term
The four states of HTML hyperlinks are:
Definition
a. link
b. visited
c. hover
d. active
Term
What are the two steps for creating a hyperlink bookmark that jumps to another location within the same page?
Definition
a. Use the id attribute to create a bookmark with the form: <h2 id="C4">Chapter 4</h2>
b. Use the form: <a href="#C4">Jump to Chapter 4</a>  to create the clickable link.
Term
What is the form for jumping to a bookmark (id) on another HTML page?
Definition
<a href="web_page.html#id">Jump to Some Bookmark</a>
Term
The HTML _____ tag is used to embed an image in a web page.
Definition
<img>
Term
The <img> tag has two required attributes:
Definition
a. src - Specifies the path to the image
b. alt - Specifies an alternate text for the image
Term
You can use the _____ attribute to specify the width and height of an image.
Definition
style
Term
If a browser cannot find an image, it will display the value of the _____ attribute.
Definition
alt
Term
With _____ you can create clickable areas on an image.
Definition
HTML image maps
Term
Does <area> get nested inside <map>, or <map> nested inside <area>?
Definition
<area> is nested inside <map>
Term
Write the code (4 lines) for setting up a basic image map called "myImageMap":
Definition
(1) <img src="someImage.jpg" alt="Some Image" usemap="#myImageMap">
(2) <map name="myImageMap">
(3) <area shape="rect" coords="34,44,270,350" alt="image area" href="some_page.htm">  
(4) </map>
Term
The relationship between an image and an image map is created by using the _____ attribute, and giving it the name of the _____ preceded by a hash tag.
Definition
usemap; image map
Term
List the four clickable shapes you can create an image map with:
Definition
a. rect - defines a rectangular region
b. circle - defines a circular region
c. poly - defines a polygonal region
d. default - defines the entire region
Term
List the four attributes you provide to an <area> tag to create an image map:
Definition
a. shape - the shape of the clickable area.
b. coords - the x and y coordinates that set the digital boundaries of the clickable area.
c. alt - alternate text
d. href - the HTML page fetched when the image area is clicked.
Term
To add a background image on an HTML element, use the HTML _____ attribute and the CSS _____ property.
Definition
style; background-image
Term
The HTML _____ element allows you to display different pictures for different devices or screen sizes.
Definition
<picture>
Term
Always specify an _____ element as the last child element of the <picture> element.
Definition
<img>
Term
Why should you always specify an <img> element as the last child element of the <picture> element?
Definition
The <img> element is used by browsers that do not support the <picture> element, or if none of the <source> tags matches.
Term
What is the hierarchy of elements in an HTML table from largest to smallest?
Definition
a. <table>
b. <tr> (table row)
c. <td> (table cell)
Term
To add a border to a table, use the CSS _____ property.
Definition
border
Term
To make a cell span more than one column, use the _____ attribute.
Definition
colspan
Term
To make a cell span more than one row, use the _____ attribute.
Definition
rowspan
Term
To add a caption to a table, use the _____ tag.
Definition
<caption>
Term
An HTML table <caption> tag must be inserted immediately after the _____ tag.
Definition
<table>
Term
An unordered list starts with the _____ tag. Each list item starts with the _____ tag.
Definition
<ul>; <li>
Term
An ordered list starts with the _____ tag. Each list item starts with the _____ tag.
Definition
<ol>; <li>
Term
The _____ tag defines the description list, the _____ tag defines the term (name), and the _____ tag describes each term.
Definition
<dl>; <dt>; <dd>
Term
The CSS _____ property is used to define the style of unordered list item markers.
Definition
list-style-type
Term
Use the CSS property _____ to display a list horizontally.
Definition
float:left
Term
The _____ attribute of the <ol> tag, defines the type of the list item marker.
Definition
type
Term
What are the five type attributes for the <li> markers?
Definition
type="1" -> The list items will be numbered with numbers (default)
type="A" -> The list items will be numbered with uppercase letters
type="a" -> The list items will be numbered with lowercase letters
type="I" -> The list items will be numbered with uppercase roman numbers
type="i" -> The list items will be numbered with lowercase roman numbers
Term
By default, an ordered list will start counting from 1. If you want to start counting from a specified number, you can use the _____ attribute.
Definition
start
Term
Every HTML element is one of two display types: _____ or _____.
Definition
block or inline
Term
A _____ element is an HTML element that begins a new line on a web page and extends the full width of the available horizontal space of its parent element.
Definition
block-level
Term
_____ elements are those who only take up as much width as is needed to display the contents of the element.
Definition
Inline
Term
The _____ attribute is often used to point to a class name in a style sheet.
Definition
class
Term
The HTML _____ attribute is used to specify a unique id for an HTML element.
Definition
id
Term
Unlike the 'class' attribute, you cannot have more than one element with the same _____ in an HTML document.
Definition
id
Term
An HTML _____ is used to display a web page within a web page.
Definition
<iframe>
Term
Use the _____ and _____ attributes to specify the size of an <iframe>.
Definition
height and width
Term
The _____ attribute of the link must refer to the _____ attribute of the iframe for the iframe to be used as the target frame for a link.
Definition
target; name
Term
The HTML _____ tag is used to define a client-side script (JavaScript).
Definition
<script>
Term
The <script> element either contains script statements, or it points to an external script file through the _____ attribute.
Definition
src
Term
To select an HTML element, JavaScript most often uses the _____ method.
Definition
document.getElementById()
Term
The HTML _____ tag defines an alternate content to be displayed to users that have disabled scripts in their browser or have a browser that doesn't support scripts
Definition
<noscript>
Term
A _____ describes the location of a file in a web site's folder structure.
Definition
file path
Term
An _____ is the full URL to a file. A _____ points to a file relative to the current page.
Definition
absolute file path; relative file path
Term
It is best practice to use (relative/absolute) file paths if possible.
Definition
relative
Term
The HTML <head> element is a container for which HTML elements?
Definition
<title>, <style>, <meta>, <link>, <script>, and <base>
Term
The <title> tag is (required/not required) in HTML documents.
Definition
required
Term
Why is the contents of a page title is so important for search engine optimization (SEO)?
Definition
The page title is used by search engine algorithms to decide the order when listing pages in search results.
Term
The _____ element (in the page header) is used to define style information for a single HTML page.
Definition
<style>
Term
The _____ element defines the relationship between the current document and an external resource.
Definition
<link>
Term
The _____ tag is most often used to link to external style sheets.
Definition
<link>
Term
The _____ element is typically used to specify the character set, page description, keywords, author of the document, and viewport settings.
Definition
<meta>
Term
The _____ is the user's visible area of a web page. It varies with the device - it will be smaller on a mobile phone than on a computer screen.
Definition
viewport
Term
What code should always be included in the <meta> element in all your web pages?
Definition
<meta name="viewport" content="width=device-width, initial-scale=1.0">
Term
The _____ element is used to define client-side JavaScripts.
Definition
<script>
Term
The _____ element specifies the base URL and/or target for all relative URLs in a page.
Definition
<base>
Term
Name four different CSS techniques to create multi-column layouts?
Definition
a. CSS framework
b. CSS float property
c. CSS flexbox
d. CSS grid
Term
Using CSS _____ layout technique ensures that elements behave predictably when the page layout must accommodate different screen sizes and different display devices.
Definition
flexbox
Term
Like tables, CSS _____ layout technique enables an author to align elements into columns and rows.
Definition
grid
Term
A _____ web design will automatically adjust for different screen sizes and viewports.
Definition
responsive
Term
To create a responsive website, add what code to the <meta> tag of all your web pages?
Definition
<meta name="viewport" content="width=device-width, initial-scale=1.0">
Term
If the CSS width property is set to _____, the image will be responsive and scale up and down.
Definition
"100%"
Term
If the CSS _____ property is set to 100%, the image will scale down if it has to, but never scale up to be larger than its original size.
Definition
max-width
Term
The HTML _____ element allows you to define different images for different browser window sizes.
Definition
<picture>
Term
Responsive text size can be set with a _____ unit, which means the _____.
Definition
"vw"; "viewport width"
Term
The HTML _____ element is used to define keyboard input.
Definition
<kbd>
Supporting users have an ad free experience!