Multiple Choice Questions
Why should you use semantic elements in your Web page?
The 'mailto:' protocol in the href attribute can validate the email address provided.
What is the purpose of your download attribute's value in a hyperlink?
What is the output for the code below? <h1>This is a heading & it is the "biggest" one in this page>/h1<
What is the difference between HTML and HTTP?
Which of the following is not used to create a Web page?
If you have a mistake in your HTML code, the browser will:
One of the functions of the 'alt' attribute is to provide information about the image to assistive technologies and search engines.
Which of the following image paths follow the best practice for a relative URL?
HTML tags are case sensitive.
A ul element wouldn't be terribly useful unless it contained one or more of these elements:
What tag would you use to emphasize some text?
What is the purpose of the semantic element < mark >?
You can have multiple header and footer elements in your Web page.
<ol id="student-male" class="primary" start="10"></ol><ol start="10" class="primary" id="student-male"></ol> Both tags will give the same output. The order in which the attributes are specified in the opening tag does not matter.
If your editor saves in a variety of formats, which of the following should you be sure to use for your Web page?
< a href="https://w3.org" target="_blank" >W3C< /a > What does the code above do?
You need to use both height and width attributes to shrink your image by half.
Which is the required attributes in an image tag?
Which semantic element has content that should be expanded to view?
If you want to have the largest heading possible, which kind of tag you would use?
The term hypertext means:
Which attribute do you use when you want to provide more information about a complicated image?
<!-- If this line were in your code, would you see it on your Web page? -->
Which tag will you use to convey importance in your text?
What is the difference between Internet and Web?
If you want to indicate that a large passage of text is an exact quotation, what tag would you use?
Elements are the same as tags.
Which is the correct nesting of these elements?
Which of these HTML fragments would render differently from the others?
Which of the following is a non-semantic tag?
<span> should be used anytime you want to make inline changes
What does the 'alt' attribute do?
What does character encoding do?
You are designing a Web page to store your grandmother's recipes. Each recipe should be enclosed in a section element.
What is the first character after a "<" in a closing tag?
Which of the following statements about global attributes is true?
If you have an image you want to add as a background to your Web page, your 'alt' attribute's value should be:
All browsers support all attributes.
What does the 'M' in HTML5 stand for?
The anchor element is the same as the < link > tag.
Different documents can be linked together using which one of these elements?
The closing tag for image is .
Any complete HTML5 file must contain bits of CSS and Javascript.
Since HTML5 ignores white space, a tag can be spelled with spaces in it, i.e. "ht ml"
What will happen if you fail to follow a "best practice"?
A tooltip in the title attribute can only be used on images.
Suppose you have a small image that looks like a warning sign - ⚠. You want to place it near a particular paragraph on your Web page. Should you use an tag for the warning sign, or should you add it via CSS commands?
All headings should be used within the header element.
Can some elements contain other elements?
The main reason the Internet was created was to support the World Wide Web
<....> You need to leave immediately. Your office is bugged! <....> Which of the following tags should be used in this case?
The non-global attribute ‘size’ can only be applied to one tag.
What do you use to split multiple classnames in the 'class' attributes?
HTML tags and HTML elements the same thing. True or false?
The HTML structure of a document is a tree. True or false?
Setting the size for an image must always be done using the 'height' and 'width' attributes.
What doctype is used for HTML5 documents?
Is it valid to have a paragraph element inside the < head > tag?
How many elements should your document have?
What are the little bits of text that surround elements in an html file?
What’s the best way to ensure that your picture will display correctly?
If I told you that an open tag looked like this: <div id='mydiv' class='myclass'>, what would the closing tag look like?
The primary purpose of HTML is to assist formatting of text.
The extension of the file name is not needed for 'download' attribute's value.
The <p> tag is used to denote:
Semantic elements, like article and section, don't use attributes.
A 'ul' element isn't very useful unless it contains what kind of tags?
You can use either ' (single quote) or " (double quote) to denote a string.
The anchor element is only used to link from one page to another.
Which of the following is not among "Best practices"?
<p id="greeting" class="hello world">This is me greeting the world</p>Which of the following is the correct behavior with respect to the code above?
Let's consider a space, or a tab or a carriage return. What are each of them referred to?
Which of the following is a valid value following best practice for the id attribute?
< p id="intro">Hi! My name is Alex and I love to cook.< /p > Unlike most attributes, the id of an element should be:
What is the last tag in a well-behaved html file?
Attributes are used to add extra info to a tag, like a unique identifier.
Who does semantic elements not benefit?
Images can be added to your Web page in more than one way.
You do need a connection to the Internet to test your HTML code.