Html

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

The following code results in no visible output to the browser. Why? <ol> </ol> The <ol> tag must be replaced with a <ul> tag. List items must be added to the list. <ol> is not a valid HTML element. The <ol> tag signifies "old" information, meaning the contents will never display.

List items must be added to the list.

The following code is supposed to create a link to another web page, but fails to do so. Why? <a>Codecademy</a> The </a> closing tag should be removed. The word "Codecademy" should be replaced with the URL to the Codecademy website. The <a> element is missing the href attribute set to the URL of the Codecaddemy website. The <a> element should be replaced with a <link> element.

The <a> element is missing the href attribute set to the URL of the Codecaddemy website.

What are 5 common attributes of the <table> element?

width, cellpadding, cellspacing, border, bgcolor

What type value allows users to select (and unselect) one or more options in answer to a question?

"checkbox"

What type value allows users to pick just one of a number of option?

"radio"

What does the following CSS code add? td, tr { border: 1px solid black; } th { border: 1px solid blue; } 1 pixel black border to the table body. 1 pixel blue border to rows and cells. 1 pixel black border to headers. 1 pixel blue border to the table footer. 1 pixel black border to rows and cells 1 pixel blue border to headers.

1 pixel black border to rows and cells 1 pixel blue border to headers.

What declaration defines that a document is an HTML5 document?

<!DOCTYPE html>

What element has quite a specific use: to contain contact details for the author of the page? Browsers often display the content of this element in italics.

<address>

<section> <h2>cars</h2> -> <p>A car is so much more than a number, and yet enthusiasts and non-enthusiasts alike simply cannot resist the urge to brag or judge another's wheels based on specifications alone. </p> -> </section> <article> </article> <span> </span> <h2> </h2>

<article> </article>

Which semantic tags complete the code? <section> <p>A robot is a machine designed to complete tasks faster, quicker, and more accurately than a human. </p> </section> -> <p>"We're going to become caretakers for the robots. That's what the next generation of work is going to be."- Gray Scott </p> -> <span> </span> <figure> </figure> <aside> </aside>

<aside> </aside>

Why is the code below incorrect? <audio src="AudioFile.mp3"/> src is only for video and embed, while source is used for audio files. The controls attribute was not included in the code. <audio> is not a self closing tag and requires an opening and closing tag. The code does not specify the type using type-.

<audio> is not a self closing tag and requires an opening and closing tag.

What element is used for longer quotes that take up an entire paragraph? Browsers tend to indent the contents of this element.

<blockquote>

Which of the following tags would contain the HTML for a web page's visible content? <cont> <body> <html> <about>

<body>

What is the parent element and child element? <body> <p>This paragraph is a child of the body</p> </body>

<body>, <p>

What element results in a line break in the text?

<br>

Which of the following elements will directly affect the vertical spacing in an HTML layout? <break> <br> <break /> <br>

<br>

What element allows users more control over how their buttons appear, and to allow other elements to appear inside the element?

<button>

What element is used when you are referencing a piece of work such as a book, film or research paper? This element can be used to indicate where the citation is from.

<cite>

What element can show text that has been deleted from the document? The content o this element usually has a line going through it.

<del>

What element is used to indicate the defining instance of a new term? Some browsers show the content of this element in italics. Safari and Chrome do not change its appearence.

<dfn>

What element allows you to group a set of elements together in one block-level box?

<div>

What element is a container that divides the page into sections? Allows us to group HTML elements to apply the same styles for all HTML elements inside.

<div>

Which element is the parent of <p>My Paragraph</p>? <body> <p>Paragraph 1</p> <div> <a href="http://www.codecademy.com">Codecademy</a> <p>My Paragraph</p> </div> </body> <div> <a> <p> <body>

<div>

What element consists of a series of terms and definitions?

<dl>, definition list

What styling text will generally render as italic emphasis?

<em>, <i>

What HTML code will we browsers display as italics? <p>Hello</p> <strong>Hello</strong> <em>Hello</em> <div>Hello</div>

<em>Hello</em>

What element groups related from controls together?

<fieldset>

What element allows web page authors to add a caption to an image inside the <figure> element?

<figcaption>

What element nests one or more <img> element? Browsers may indent images nested in this element.

<figure>

Create a form with username and password login with only 30 characters allowed.

<form action="url"> <p>Username: <input type="text" name="username" maxlength="30" /> </p> <p>Password: <input type="text" name="username" maxlength="30" /> </p> </form>

What element creates a form in HTML?

<form>

Which of the following is valid HTML for the heading tag with the smallest size and lowest rank in the hierarchy? <h9> <h6> <h1> <h3>

<h6>

The following HTML code should only exist within which of the following tags? <title>Codecademy</title> <body> <head> <h1> <!DOCTYPE html>

<head>

What element contains meta information about the HTML page?

<head>

Which of the following elements contains a web page's metadata? <body> <html> <head> <about>

<head>

Which code snippet is the correct way to rewrite this in Semantic HTML? <div id="header"> <h1>Codecademy</h1> </div> <h1>Codecademy</h1> <header><h1>Codecademy</h1></header> <head><h1>Codecademy</h1></head> <header><h1>Codecademy</h1></header>

<header><h1>Codecademy</h1></header>

What element creates a break between themes - such as a change of topic in a book or a new scene in a play? You can add a horizontal rule between sections using this tag.

<hr>

All HTML code must be nested within which of the following tags? <title> <head> <html> <body>

<html>

What is the root element of an HTML page?

<html>

What element creates a window that you can see another page in?

<iframe>

What element allows users to upload a file (for example an image, video, mp3, or a PDF)?

<input>

What element is used to create several different form controls?

<input>

What element allows forms accessible to vision-impaired users?

<label>

What element contains a caption which helps identify the purpose of <fieldset> element?

<legend>

What element lives inside the <head> element and contains information about that web page?

<meta>

What element is used to specify the options that the user can select from?

<option>

Match the blanks with the proper syntax to create an HTML paragraph element from this text. ____ I'm ready to rock and roll! ____ <p/> <\p> </p> <#p> <p>

<p>, </p>

Which of the following is the correct syntax for the paragraph HTML element? <p/>I am a paragraph<p> <p>I am a paragraph</p> <p>I am a paragraph<\p> <p>I am a paragraph</p>

<p>I am a paragraph</p>

What element is used for shorter quotes that sit within a paragraph? Browsers are supposed to put quotes around this element, however Internet Explorer does not - therefore many people avoid using this element.

<q>

What element indicates something that is no longer accurate or relevant (but that should not be deleted). Visually the content of this element will usually be displayed with a line through the center.

<s>

What element is used to create a drop down list box? It contains two or more <option> elements.

<select>

What element acts like an inline equivalent of the <div> element? It is used to either contain a section of text where there is no other suitable element to differentiate it from its surrounding text or contain a number of inline elements.

<span>

What element contains short pieces of text of other HTML. They are used to separate small pieces of content that are on the same line as other content.

<span>

What styling tag will generally render as bold emphasis?

<strong>, <b>

What element is used to contain characters that should be subscript? It is commonly used with foot notes or chemical formulas such as H_2_0.

<sub>

What element is used to contain characters that should be superscript such as the suffixes of dates or mathematical concepts like raising a number to a power such as 2^5?

<sup>

What element is used to create a table? Contents are written out row by row.

<table>

Which tag should surround an entire table of data? <thead></thead> <tr></tr> <td></td> <table></table>

<table></table>

What element nests the content of a <table> element?

<tbody>

Which of the following tags is used to separate the body of the table from its headers and footers? <tr></tr> <tbody></tbody> <thead></thead> <th></th>

<tbody></tbody>

What element stores the data in the <table> element?

<td>

Which tag creates new data to an HTML table? <tr></tr> <table></table> <thead></thead> <td></td>

<td></td>

What element is used to create a multi-line text input? Unlike other input elements this is not an empty element.

<textarea>

What element stores the footer of a <table> element?

<tfoot>

Which of the following tags is used to separate the footer of the table from its body? <footer></footer> <th></th> <tfoot></tfoot> <tbody></tbody>

<tfoot></tfoot>

Which tag adds a new row header to an HTML table? <tr></tr> <th scope="col"></th> <th scope="row"></th> <th></th>

<th scope="row"></th>

What element is used to represent the heading for either a column or a row?

<th>

Which of the following tags is used to enclose the row of a table containing its headers? <tbody></tbody> <tr></tr> <th></th> <thead></thead>

<thead></thead>

What element specifies a title for the HTML page (which is shown in the browser's title bar or in t the page's tab)?

<title>

What element indicates the start of each row?

<tr>

Which tag creates new rows in an HTML table? <tr></tr> <table></table> <thead></thead> <td></td>

<tr></tr>

What element is used to create a list of items in no particular order? It lists individual items with a bullet point.

<ul>, unordered list

What tag is used for videos in HTML?

<video>

What's the difference between <embed> and <video>? <video> is a semantic element while <embed> is not. <video> can only be used for video, while <embed> can be used for any type of media. <embed> is used in the header of the document while <video> can be used anywhere. <embed> does not support video while <video> does.

<video> can only be used for video, while <embed> can be used for any type of media.

What is rendered on the web page as a result of the code provided? <form action="/processing.html" method="GET"> <label for="mystery">What gets rendered?</label> <input type="range" id="mystery" name="mystery" min="0" max="100" step="10"> </form> A form that is completely empty except for the submit button. A form containing a text field which accepts any number from 0 to 100. A text field that contains the words "mystery" which can be changed to either "0" or "100". A form containing a slider that has a maximum value of 100, a minimum of 0 and moves in steps of 10.

A form containing a slider that has a maximum value of 100, a minimum of 0 and moves in steps of 10.

How can we render a dropdown list in a <form>? Create a <div> and add multiple <input> elements with set values. Add an <input> element and set the type attribute to "dropdown" and nesting <option>s inside. Add a <select> element with <option> elements nested inside. Create a <dropdown> element and set multiple values in the opening <dropdown> tag.

Add a <select> element with <option> elements nested inside.

The following code creates a link to another page. Which of the following will cause the page to open in a new browser window? <a href="https://www.codecademy.com/">Codecademy</a> Single quotation marks should be used instead of double quotation marks. The URL should include "new_window" at the end of it. Wrap the <a> tag with a <window> tag. Add the target attribute, with its value set to _blank.

Add the target attribute, with its value set to _blank.

What is the correct definition of an HTML element? An HTML tag and the content that it contains or marks up. HTML code that does not require opening or closing tags. The second, or closing, HTML tag. Closing tags have a forward slash (/) inside of them. The first, or opening, HTML tag.

An HTML tag and the content that it contains or marks up.

What is a benefit of using the <label> element? The <label> element validates the value of the <input> element. Clicking on the <label> element clears the value of the <input> element. Clicking on the <label> element will focus on the text field of the associated <input> element. The <label> element will autofill the field of the associated <input> element.

Clicking on the <label> element will focus on the text field of the associated <input> element.

Based on the code provided, why will the information from the first <input> element NOT be sent to /processing.html when the form is submitted? <form action="/processing.html" method="GET"> <input type="text" id="username"> <input type="submit" value="submit"> </form> The first <input> element does not render properly. The <form> element is missing a submit button. The first <input> element is missing a <label>. The first <input> element is missing the name attribute which omits the <input>'s information.

The first <input> element is missing the name attribute which omits the <input>'s information.

The following code is supposed to display an image, but fails to do so. Why? <img https://www.example.com/laptop.jpg /> The <img> tag can only display .png or .svg image formats. The image URL should be all uppercase. The <img> tag should be replaced with an <image> tag. The src atribute is missing and must be set equal to the image URL, enclosed in double quotation marks.

The src atribute is missing and must be set equal to the image URL, enclosed in double quotation marks.

Why is the code below incorrect? <figcaption> <img src="sunset.jpg"> <figure>Beautiful sunset</figure></figcaption> The <figure> tag must be replaced with <caption> <img> requires a closing tag Only <embed> can work with <figure> and <figcaption> The use of <figure> and <figcaption> needs to be reversed

The use of <figure> and <figcaption> needs to be reversed

Why is the code below incorrect? <video src="myVid.mp4" controls > The width and height of the video must be specified. A valid self-closing tag ends with /> The video element is not a self-closing tag. It should have an opening and a closing tag. The myVid.mp4 video source (src=) is not valid.

The video element is not a self-closing tag. It should have an opening and a closing tag.

Why should the document type declaration be included in all HTML documents? To specify the HTML standard being used in the content Without it, any HTML code is invalid. Without it, the web page will not be allowed on the Internet To specify what content will display in the browser

To specify the HTML standard being used in the content

True or False: You can assign default text to a <textarea> element by adding text between the opening and closing <textarea> tags.

True

What is an appropriate scenario for using an <input> element with the type set to "radio"? When you want users to type in a combination of numbers and characters. When you want to hone in on a specific frequency known to the server. When you want to present users with multiple options and have them choose ANY amount they want. When you want to present users with multiple options and have them choose ONLY ONE.

When you want to present users with multiple options and have them choose ONLY ONE.

How are radio buttons different from checkboxes? Radio buttons cannot be inserted into a form, but checkboxes can. You can select multiple checkboxes but only one radio button. Checkboxes can have labels but radio buttons cannot. There is no difference, both are used interchangeably.

You can select multiple checkboxes but only one radio button.

What name attribute value defines the author of the web page?

author

What kind of element is <h1>, <p>, <ul>, and <li>?

block elements

What are elements that will always appear to start on a new line in the browser window?

block level elements

What attribute can be used to indicate which value (if any) should be selected when the page loads?

checked

What name attribute value contains a description of the page in the <meta> element?

description

What name attribute value can be used to indicate when the page should expire (and no longer be cached)? Note that the date must be specified in the content attribute.

expires

What attribute in the <label> element states which form control the label belongs to?

for

What are the 'hint': 6 headings in HTML? List them from largest to smallest.

h1, h2, h3, h4, h5, h6

What does HTML stand for?

hyper text markup language

What attribute identifies the <form> element?

id

What is one commonly used attribute that is used to specify different content and is really helpful when you use an element more than once?

id

When will the text "Video not supported" be displayed? <video src="myVideo.mp4" width="320" height="240" controls> Video not supported</video>

if browser is unable to load the video

What are elements that will always appear to continue on the same line as there neighboring elements?

inline elements

What kind of element is <a>, <b>, <em>, and <img>?

inline elements

What does the controls attribute do in <video>?

instructs the browser to include basic video controls: pause, play and skip

What name attribute value contains a list of comma-separated words that a user might search on to find the page?

keywords

What href value creates a link to the user's email program and addresses an email to a specified email address in side the <a> element?

mailto:

What attribute limits the number of characters a user may enter into the text field? Its value is the number of characters they may enter.

maxlength

What attribute allows forms to get or post?

method

What attribute in <select> allows users to select multiple options from the list?

multiple

What attribute identifies the <input> element?

name

What attribute in <input> ids the <input>?

name

What are the two parts of attributes?

name, value

What attribute places text in a text box that will be shown until the user clicks in that area in the <input> element?

placeholder

What name attribute value prevents the browser fro caching the page? (That is, storing it locally to save time downloading it on subsequent visits.)

pragma

What attribute should you add to a <input> element if you want to ensure that users provide a response? pattern required min maxlength

required

What name attribute value indicates whether search engines should add this page?

robots

What attribute in the <iframe> element specifies that scroll bars are not desired?

seamless

What attribute in <select> can be used to indicate the option that should be selected when the page loads? The value of this attribute should be selected.

selected

What attribute in <select> can turn a drop down select box into a box that shows more than one option by adding this attribute?

size

What attribute in the <iframe> element specifies the URL of the page to show in it?

src

What attribute and attribute value must follow the type="image" attribute to find the image in the <input> element?

src="url"

What attribute sets the type of input?

type

What attribute and attribute value asks the user for a date in the <input> element?

type="date"

What attribute and attribute value asks the user for an email address in the <input> element?

type="email"

What attribute and attribute value creates a box that looks like a text input follower by a browse button in the <input> element?

type="file"

What attribute and attribute value shows a hidden form control in the <input> element?

type="hidden"

What attribute and attribute value allows users to use an image for the submit button in <input>?

type="image"

What attribute and attribute value creates a single line text box for search queries in the <input> element?

type="search"

What attribute and attribute value is used to send a form to the server in the <input> element?

type="submit"

What attribute and attribute value asks the user for a URL in the <input> element?

type="url"

What attribute in <input> is used to control the text that appears on a button?

value

What attribute in the <option> element indicates the value that is sent to the server along with the name of the control if this option is selected?

value

What attribute indicates the value that is sent to the server for an <input> with type "radio"?

value

Which of the following is the current HTML standard? HTML5 CSS HTML1 XHTML

HTML5

The contents of the <title> tag will appear where in a modern browser? The first line of the web page It does not appear anywhere. Its purpose is to inform search engines. The browser's tab The last line of the webpage

The browser's tab

Is <video> a self closing tag? true or false

false

What is the syntax for a href that links to a specific part of the same page?

#id (id = idname)

How do you comment in HTML?

<!-- comment -->

Which of the following tags instructs the browser to expect a well-formed HTML document? <body> <div> <head> <!DOCTYPE html>

<!DOCTYPE html>

Which of the following would create a link to a local HTML file called aboutme.html? <a href="./aboutme.html" /> <a href="https://www.aboutme.com/">About Me</a> <a href="https://www.aboutme.com/" /> <a href="./aboutme.html">About Me</a>

<a href="./aboutme.html">About Me</a>

What tags are used to link to internal pages, external pages or content on the same page?

<a>

What element is used for an abbreviation or an acronym? A title attribute on the opening tag is used to specify the full term.

<abbr>

What element contains the content of a HTML file?

<body>

What is the proper HTML syntax for <img> tag?

<img src="image-location.jpg" />

What element allows you to add an image to a web page?

<img>

What element can be used to show content that has been inserted into a document? The content of this element is usually underlined.

<ins>

What element stores the headings of a <table> element?

<thead>

How would the output of the code below change if <ul> and </ul> were changed to <ol> and </ol>, respectively? <ul> <li>Lorem</li> <li>Ipsum</li> <li>Horribilis</li> </ul> No changes to the output would occur. The code would no longer output any visible content in the browser. Numbers in the output would change to bullet points. Bullet points in the output would change to numbers.

Bullet points in the output would change to numbers.

What is the purpose of indentation and whitespace? To change the display of eements in the browser. To make sure the browser correctly interprets nested elements in an HTML file. To comment out code you don't need. To make code in an HTML file more readable.

To make code in an HTML file more readable.

What attribute is required in the <form> element? Its value is the URL for the page on the server that will receive the information on the form when it is submitted.

action

What attribute was commonly used to indicate how the other parts of a page should flow around an image?

align

What attribute adds text to the <img> tag?

alt

If we want to expand an element's tag, what do we use? Hint: They are content added to the opening tag of an element and can be used in several different ways.

attribute/s

What is the term for an element contained inside another element?

child element

What attribute allows <table> entries to span columns?

colspan

What is the child element nested inside of?

parent element

What attribute allows <table> entries to span rows?

rowspan

What attribute is necessary for the <img> element?

src

What are the four common attributes of the <video> tag?

src, width, height, controls

What attribute provides additional information about the image? Most browsers will display the content of this attribute in a tooltip when the user hovers over the image.

title

Is <img> a self-closing tag? true or false

true

What goes in the src attribute?

url, uniform resource locator

What is the sytnax for a href that links to a specific part of another page?

url/#id

What element is used to create a list of items that are numbered?

<ol>, ordered list

What child element is needed to add items to lists?

<li>

What element contains a block of plain text?

<p>

What does the following code do? <tr> <td colspan="2">Out of Town</td> <td>Back in Town</td> </tr> It creates a cell that will span two rows. It creates a cell that will span two columns and a cell that will span a single column. Adds a 1 pixel black border around the cells of the table. It will make all cells in that row span two columns.

It creates a cell that will span two columns and a cell that will span a single column.

Why is the <div> tag not semantic? It requires a closing tag. It can be used multiple times throughout the code. It provides context as to what context is inside of the tag. It provides no context as to what the content is inside of the tag.

It provides no context as to what the content is inside of the tag.

What is a benefit of implementing client-side validation? It saves us time from having to send information to the server and wait for the server to respond. Client-side validation creates a fake server to check user-provided data. It allows you to select what browsers can load your site. It speeds up the browser for a better user experience.

It saves us time from having to send information to the server and wait for the server to respond.

Why does the code provided not create a working <datalist> element? <form action="/quiz.html" method="POST"> <label for="choice">What's wrong with this code?</label> <input id="choice" type="text" name="find-the-answer"> <datalist id="menu-options"> <option value="one"></option> <option value="two"></option> <option value="three"></option> </datalist> </form> The ordering of the <input>'s attributes is not correct. The <input>'s type attribute should be set to "datalist". There are not enough options in the <datalist> element to filter through. The <input> doesn't have a list attribute to associate itself with the <datalist>.

The <input> doesn't have a list attribute to associate itself with the <datalist>.


संबंधित स्टडी सेट्स

Research Methods Spring - Midterm Practice Questions

View Set

Lesson 2 Introduction to Programming for Games

View Set

Insurance Planning and Risk Management - Viatical Settlements

View Set