Ch. 9

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

&

& -The ampersand character, &, must always be written as & because the browser will otherwise think the & begins an entity.

Which tag is a generic block tag without any implied meaning? <block> <div> <section>

<div> -The <div> tag is used to create portions of the document typically for presentational or functional purposes.

What tag includes a picture in a web page? <image> <img> <pict>

<img> -The <img> tag displays many different image formats, including JPEG, GIF, and PNG.

Which tag creates a text box widget? <input> <text> <textarea>

<input> -The <input> tag creates a text box widget.

Enter the necessary HTML to create the different parts of a table. Start a table with the caption "store information".

<table><caption>store information</caption> -A table with a caption is started with the <table> opening tag followed by the caption. A caption is created with the <caption> opening tag, the caption text, and the </caption> closing tag.

Enter the necessary HTML to create the different parts of a table. Create a table cell with datum of "open".

<td>open</td> -A table cell is created with the <td> opening tag, the cell's content, and the </td> closing tag.

Which tag creates a text area widget? <input> <text> <textarea>

<textarea> -The <textarea> tag creates a text area widget.

Enter the necessary HTML to create the different parts of a table. Create a table cell with header of "hours".

<th>hours</th> -A table header is created with the <th> opening tag, the header cell's content, and the </th> closing tag.

Enter the necessary HTML to create the different parts of a table. Create an empty table row with no content

<tr></tr> -A table row is created with the <tr> opening tag, the row's content, and the </tr> closing tag. An empty row will only have opening and closing tags.

style sheet

A language describing the visual presentation of structured documents. -A browser applies the style rules to each web page element when rendering the page.

allow browser to turn off images display

A user may want to reduce data cost or load a page faster. -Image loading can be disabled in a web browser. Ex: A mobile phone user may disable loading images to avoid exceeding their plan's data limit. Typically, the browser will display the alt text in place of the image.

value

Allows the input to start with a default value. -Some inputs may be optional or previously entered by the user, so the value attribute allows the browser to send data from the form without direct user interaction.

name

Allows the server to identify which data came from which widget. -The browser sends the data and name to the server, so the server can associate the data received with a specific form input

text/javascript

Default type for the <script> tag. -JavaScript is used so frequently for interaction on HTML pages that the browser assumes the content in a <script> tag is JavaScript unless otherwise instructed.

text/css

Default type for the <style> tag. -CSS is used so frequently for presentation on HTML pages that the browser assumes the content in a <style> tag is CSS unless otherwise instructed.

file

Hyperlink used to refer to a document on the same computer as the web browser. -Indicates that the browser should look for a file on the user's computer and not a server .

mailto

Hyperlink used to send email. -Indicates that the browser should use an email program to send a message

http

Hyperlink used to send requests and responses over the Internet without encryption. -HTTP is an unencrypted protocol for sending requests and responses. A third party can intercept and view data sent using HTTP.

https

Hyperlink used to send requests and responses that are readable only by the client and server. -HTTPS is a secure protocol that encrypts requests and responses. A growing trend is to use HTTPS instead of HTTP.

ftp

Hyperlink used to transfer data files. -The FTP protocol is used to transfer a file from the web server to the web browser.

type

Indicates which kind of widget is displayed by the browser. -Some examples of the type attribute include "radio" for radio buttons, "checkbox" for checkboxes, and "text" for textual input.

placeholder

Provides a hint to the user about the information being requested. -Ex: A widget asking for the user's email address may set the placeholder to "Your email address".

support assistive technology

Software, such as page readers, help users with vision or cognitive impairments. -Page reader software reads the alt attribute text out loud for an image.

<script>

Tag that surrounds interactive content in an HTML document. -The JavaScript on a page is added using the <script> tag

<style>

Tag that surrounds presentational content in an HTML document. -The CSS on a page is added using the <style> tag to control visual layout.

pass HTML validation

The alt attribute is required. -Validators will generate an error if the alt attribute is missing, except under special circumstances. Generating valid HTML documents is important because all web browsers agree on how the documents should be processed. Invalid documents are processed differently by each web browser.

handle broken image URLs

The image cannot be loaded from the specified location. -Web browsers may fail to load images because the URL specified by the src attribute is invalid or the image file format is not supported. Correct Pass HTML validation

cascading

The process of combining multiple style rules and resolving conflicts between those rules. -The applied style rules cascade down from general to more specific, where the more specific rules override generic rules.

id

Uniquely identifies the specific input tag to the browser. -Often the id and name attributes are the same. However, the id attribute may be different from the name attribute. Ex: The same web page may have two forms that send data using the same name. Correct value

What types of tags can be inside a block tag? Only inline tags Only block tags Both inline and block tags.

both

The Euro symbol, €, can be written as &euro True False

false -A semicolon is missing at the end of the entity specification.

Two tags within the same HTML document may have the same id. True False

false -Each id attribute must be unique within an HTML document, thus ensuring a URL with the fragment identifier refers to exactly one part of the document.

Browser fallbacks are only used to make new features work on old browsers. True False

false -Fallbacks are used to test features for proposed standards that would otherwise not work on any current browsers.

It is better to avoid new HTML5 elements and attributes because of incomplete support for some new HTML5 features. True False

false -Many HTML5 features are widely supported. Features that are not well-supported at present will become supported by new browsers.

Hyperlinks may only contain text. True False

false -Placing an image in the hyperlink creates a graphical hyperlink.

The web browser will always create a new window for hyperlinks whose target attribute is _blank. True False

false -The browser can open the link in a new tab or window. Many modern browsers will open the link in a new tab instead of opening a new window.

The range and number widgets are interchangeable choices for entering numbers. True False

false -The range input allows fast selection of numbers and other values, but is imprecise. The number input allows for very precise input of values, but can be slower.

Which attribute inside the <label> tag is used to associate the label with a widget? id for name

for -The for attribute contains the id attribute of the input element to be labeled.

Determine if the following HTML is valid or invalid. <p>Roses are <!--purple--> red. Violets are <!--turquoise. <!--green.--> black.-->blue.</p>

invalid -A comment cannot be nested in another comment.

p { background-color = blue; } Valid Invalid

invalid -A rule declaration uses the colon to separate the property from the value.

<img src="sparky.png" alt="A picture of my dog, Sparky"></img> Valid Invalid

invalid -The <img> tag does not enclose content, so a closing <img> tag is not needed.

<img src="smiley.gif"> Valid Invalid

invalid -The <img> tag is missing the required alt attribute.

Determine if the following HTML is valid or invalid. <p>Mary had a <!--soft, little</p>--> lamb. Its fleece was white as snow. Valid Invalid

invalid -The <p> tag is not properly closed.

<a href="example.com/index.html">See example</a> Valid Invalid

invalid -The href attribute URL should include a scheme, such as https, when the URL includes a hostname.

Which attribute must be set to create a text box widget? type no attribute name id

no attribute -The default value for the type attribute is text, so no attribute must be set to create a text box widget.

What types of tags can be inside an inline tag? Only inline tags Only block tags Both inline and block tags

only inline -An inline tag can only contain other inline tags and text.

Which image tag attribute specifies the image's URL? url src alt

src -The src attribute may specify a complete URL like http://example.com/dog.jpg or just an image name like dog.jpg if the image resides on the same web server as the HTML file.

What is the width of a block tag? The minimum width necessary to hold the block's contents. The full width of the web page. The full width of the block's parent container.

the full width of the block's parent container -The width of a block container is determined by the width of the parent container.

Which is NOT a required attribute for images? src alt title

title -The title attribute is not required. Many web browsers use the title attribute to provide "tooltips" when hovering over an image.

The default value for the target attribute is _self. True False

true -By default when a hyperlink is clicked, the web browser will open the hyperlink in the same tab or window.

An umbrella symbol, ☂, which is assigned the decimal number 9730, can be written as &#9730; True False

true -Many entities do not have assigned names and must be specified using the assigned number.

A polyfill is code that creates a browser fallback for a feature if the web browser does not support that feature. True False

true -Polyfills are usually implemented using a JavaScript library to make new features work on older browsers.

The mathematical forall symbol, ∀, can be written as &forall; True False

true -The format for a named entity is &, the entity name, and a semicolon. HTML has more than 1000 named entities.

The fragment identifier for the <p id="location"> opening tag is location. True False

true -The fragment identifier is the same as an element's id attribute.

Having users enter dates, colors, email, and numbers using the specialized widgets is preferable when an appropriate widget is available. True False

true -The specialized widgets help ensure that input is valid and speed up the data entry process.

Determine if the following HTML is valid or invalid. <p>This sentence does <!--not--> contain a comment</p> Valid Invalid

valid -A comment is opened with <!-- sequence and closed with -->. The opening <p> tag is closed properly.

<a href="#History">History</a> Valid Invalid

valid -An href with only the fragment identifier #History links to the History section of the current page.

<img src=birthday.jpg alt=Birthday> Valid Invalid

valid -HTML5 does not require using double quotes around attribute values. However, the W3C recommends using quotes.

<img alt="Fun weekend" src="weekend.jpg"> Valid Invalid

valid -Tag attributes can appear in any order.

<a href="https://example.com/index.html#History"> History</a> Valid Invalid

valid -The #History fragment identifier specifies the History section of the index.html page.

h1 { color: black; } Valid Invalid

valid -The CSS has a selector (h1), an opening brace, a rule declaration, and a closing brace.

Determine if the following HTML is valid or invalid. <p>Bananas grow <!--in bushes.</p>--> on a tree.</p> Valid Invalid

valid -The browser ignores the first closing <p> tag, because the tag is in a comment.

<a href="https://example.org/index.html"> <img src="https://example.org/picture.jpg"></a> Valid Invalid

valid -The content displayed for a hyperlink may be any valid HTML or text, including images.

<a href="file:///Users/example/index.html">Another example</a> Valid Invalid

valid -The file scheme, which opens a file from local storage such as a hard drive, uses a triple slash /// to specify the URL.

<a href="course.html#Notes">Notes</a> Valid Invalid

valid -The fragment identifier #Notes links to the Notes section of course.html, which is located in the same path.

span { font-weight: bold; font-size: 2em; } Valid Invalid

valid -While a single line may contain multiple rules, good practice is to place each declaration on a separate line.

div { font-family: serif } Valid Invalid

valid -While the last rule declaration of a block does not require a trailing semicolon, good practice is to add a semicolon to each rule.


Set pelajaran terkait

Advanced Accounting: Consolidated Financial Statements Chp 4

View Set

Health Assessment Exam One NCLEX questions

View Set

Property and casualty Missed practice exam questions

View Set

RN Pediatric Nursing Online Practice 2023 B

View Set