MCQs (HTML)
Multiple Choice Questions
2.Which of the following is the correct behavior with respect to the code above?
- Both the classname and paragraph text cannot contain "world"
- Two different classes "hello" and "world" will be applied to the paragraph
- The code is invalid because space is not allowed in class attribute's value
- One class "hello world" will be applied to the paragraph
3.Who does semantic elements not benefit?
- Assistive technology users
- The browser
- The search engine
- The server
4.Elements are the same as tags.
- True
- False
5.What is the purpose of the semantic element < mark >?
- so it can be refered to by other semantic elements
- underline text
- strikethrough text
- highlight text
6.Attributes are used to add extra info to a tag, like a unique identifier.
- True
- False
7.What’s the best way to ensure that your picture will display correctly?
- add the 'src' attribute
- add the 'display' attribute
- use an image file format commonly supported by browsers
- change your HTML editor
8.HTML tags are case sensitive.
- True
- False
9.What doctype is used for HTML5 documents?
- < !DOCTYPE html >
- < !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
- < ?xml version="1.0" standalone="yes" ? >
- < !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd" >
10.If your editor saves in a variety of formats, which of the following should you be sure to use for your Web page?
- .exe or Executable
- .rtf or Rich Text Format
- .txt or plain text
- .docx or MS Document File
11.< p id="intro">Hi! My name is Alex and I love to cook.< /p >
Unlike most attributes, the id of an element should be:
- split by spaces if you want to specify multiple values
- the same across a given type of element i.e. all paragraphs have the same id
- unique to that element and can only be used once
- written in all caps (“ID=“)
12.The closing tag for image is .
- True
- False
13.You are designing a Web page to store your grandmother's recipes. Each recipe should be enclosed in a section element.
- True
- False
14.What are the little bits of text that surround elements in an html file?
- lists
- tags
- attributes
- None of the given.
15.What does character encoding do?
- helps translate page from one language to another
- acts like a dictionary that helps translate code points into bytes that can be stored in memory.
- provides support for search engines to process your HTML documents correctly
- None of the given.
16.What is the difference between Internet and Web?
- Web is an application of Internet
- Internet and Web are the same thing
17.Let's consider a space, or a tab or a carriage return. What are each of them referred to?
- white space
- text
- heading
- paragraph
18.You can have multiple header and footer elements in your Web page.
- True
- False
19.Which is the correct nesting of these elements?
- "p" inside "body" inside "html"
- "html" inside "body" inside "p"
- "p" inside "body" inside "head"
- None of the given.
20.<!-- If this line were in your code, would you see it on your Web page? -->
- Yes
- No
21.<span> should be used anytime you want to make inline changes
- True
- False
22.Which of the following is a valid value following best practice for the id attribute?
- < p id=""> < /p >
- < p id="NaViGaTiOn" > < /p >
- < p id="score-display" > < /p >
- < p id="Frequently asked questions" > < /p >
23.What is the difference between Internet and Web?
- Internet and Web are the same thing
- Internet is a network of networks
24.Which of the following is not among "Best practices"?
- Intended to make your code cleaner and more organized
- Absolute rules that every html file must obey
- Suggested good habits based on experience
25.You do need a connection to the Internet to test your HTML code.
- True
- False
26.The anchor element is only used to link from one page to another.
- True
- False
27.Different documents can be linked together using which one of these elements?
- href
- src
- hyperlink
- anchor
28.If I told you that an open tag looked like this: <div id='mydiv' class='myclass'>, what would the closing tag look like?
- </mydiv>
- </id>
- </div>
- None of the given.
29.Can some elements contain other elements?
- Yes
- No
30.If you want to indicate that a large passage of text is an exact quotation, what tag would you use?
- blockquote
- quote
- quotation
- None of the given.
31.What is the purpose of your download attribute's value in a hyperlink?
- It is a boolean value authorizing download
- It is the name of file in the location specified in href
- Downloaded file name will be modified according to value specified
- Download attribute has no value
32.<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.
- True
- False
33.Which of these HTML fragments would render differently from the others?
- <P>This is my Paragraph</P>
- <P> This is my Paragraph</P>
- <P>This is my Paragraph</P>
- <P>This is my Paragraph</P>
34.HTML tags and HTML elements the same thing. True or false?
- True
- False
All browsers support all attributes.
- True
- False
35.What will happen if you fail to follow a "best practice"?
- The computer will complain
- The browser will loudly complain
- Experienced developers will complain
- The browser will quietly complain
36.Which of the following is not among "Best practices"?
- Primarily designed to make your code run faster
- Suggested good habits based on experience
- Intended to make your code cleaner and more organized
37.Which attribute do you use when you want to provide more information about a complicated image?
- alt
- info
- id
- title
38.The non-global attribute ‘size’ can only be applied to one tag.
- True
- False
39.What is the output for the code below?
<h1>This is a heading & it is the "biggest" one in this page>/h1<
- This is a heading & it is the "biggest" one in this page
- <h1>This is a heading & it is the "biggest" one in this page>/h1<
- <h1>This is a heading & it is the "biggest" one in this page>/h1<
- <h1>This is a heading & it is the "biggest" one in this page</h1>
40.Which semantic element has content that should be expanded to view?
- figcaption
- details
- expand
- summary
41.Why should you use semantic elements in your Web page?
- It provides meaning and structure to the Web page and improves automated processing of documents
- A user will eventually run out of 'id' values and semantic elements solve that problem
- It makes styling the Web page easier
- It will drastically improve the structure of your document visually
42.How many elements should your document have?
- 42
- As many as you need or want to make it clear and organized
- Less than 128
- As few as possible
43.Which is the required attributes in an image tag?
- title
- height
- alt
- None of the given.
44.The primary purpose of HTML is to assist formatting of text.
- True
- False
45.Semantic elements, like article and section, don't use attributes.
- True
- False
46.Which tag will you use to convey importance in your text?
- Emphasis < em >
- Strong < strong >
- Italics < i >
- Bold < b >
47.A 'ul' element isn't very useful unless it contains what kind of tags?
- il
- li
- i
- e
48.Which of the following is a non-semantic tag?
- < body >
- < img >
- < div >
- < p >
49.Setting the size for an image must always be done using the 'height' and 'width' attributes.
- True
- False
50.What does character encoding do?
- provides support for search engines to process your HTML documents correctly
- helps translate page from one language to another
- decodes bytes into code points
- None of the given.
51.Which is the required attributes in an image tag?
- src
- title
- height
- None of the given.
52.One of the functions of the 'alt' attribute is to provide information about the image to assistive technologies and search engines.
- True
- False
53.The main reason the Internet was created was to support the World Wide Web
- True
- False
54.What tag would you use to emphasize some text?
- em or strong
- emphasize
- text
- None of the given.
55.What is the last tag in a well-behaved html file?
- < /head >
- < /html >
- < /doctype >
- < /body >
56.If you have an image you want to add as a background to your Web page, your 'alt' attribute's value should be:
- no alt attribute is needed
- empty - ""
- a background image
- a decorative image
57.The HTML structure of a document is a tree. True or false?
- True
- False
58.Which of the following statements about global attributes is true?
- All global attributes are of type boolean
- Global attributes are common to all elements
- Only 'id' and 'class' are global attributes
- Global attributes only apply to elements that do not have any attributes of their own
59.A tooltip in the title attribute can only be used on images.
- True
- False
60.The 'mailto:' protocol in the href attribute can validate the email address provided.
- True
- False
61.Any complete HTML5 file must contain bits of CSS and Javascript.
- True
- False
62.Is it valid to have a paragraph element inside the < head > tag?
- Yes
- No
63.You need to use both height and width attributes to shrink your image by half.
- True
- False
64.The anchor element is the same as the < link > tag.
- True
- False
65.What does the 'M' in HTML5 stand for?
- more
- mark
- markup
- main
66.A ul element wouldn't be terribly useful unless it contained one or more of these elements:
- em
- i
- li
- heading
67.What is the first character after a "<" in a closing tag?
- &
- /
- !
- >
68.<....> You need to leave immediately. Your office is bugged! <....>
Which of the following tags should be used in this case?
- < strong >
- < i >
- < b >
- < em >
69,If you want to have the largest heading possible, which kind of tag you would use?
- head
- h1
- h6
- h
70.The <p> tag is used to denote:
- list
- paragraph
- heading
- None of the given.
71.The extension of the file name is not needed for 'download' attribute's value.
- True
- False
72.If you have a mistake in your HTML code, the browser will:
- Replace your Web page with an error code
- Try its best to fix it and continue
- Crash and need to be restarted
- Highlight that part of the Web page in red
73.Images can be added to your Web page in more than one way.
- True
- False
74.The term hypertext means:
- Writing in ALL CAPS
- Text with embedded links to other documents
- Very energetic words
- None of the given.
75.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?
- Image tag
- CSS
76.Which of the following image paths follow the best practice for a relative URL?
- package\assets\Images\example.PNG
- images/example.png
- Package/Assets/Images/Example.png
- images\example.png
77.What do you use to split multiple classnames in the 'class' attributes?
- You can only specify one classname in the 'class' attribute
- space
- comma
- colon
78.Which of the following is not used to create a Web page?
- A simple text editor
- An advanced HTML aware editor
- A Fortran compiler
- A gui based tool
79.does the 'alt' attribute do?
- used to distinguish image and text links by a screen reader
- describes the information the image conveys or its function
- display information about an ambiguous image as a tooltip
- links to a URL
80.Since HTML5 ignores white space, a tag can be spelled with spaces in it, i.e. "ht ml"
- True
- False
81.All headings should be used within the header element.
- True
- False
82.< a href="https://w3.org" target="_blank" >W3C< /a >
What does the code above do?
- Opens the page in a separate frame
- Opens the page in a new tab or window
- Doesn't do anything as the code above is invalid
- Opens the page in the same tab or window
83.You can use either ' (single quote) or " (double quote) to denote a string.
- True
- False
84.What is the difference between HTML and HTTP?
- HTTP describes what's on the page and HTML allows sites to communicate with each other
- HTML describes what's on a page and HTTP allows the page to be communicated to a user
- HTML and HTTP are the same thing
- None of the given.
0 Comments