HyperText Markup Language is a markup language which is used to define the structure of the webpage. It tells the browser what to display and how to display, and the browser interprets and displays the content. Further CSS is used for styling the webpage and JavaScript for adding functionalities in the webpage.
Question 1: HTML is used for:
A) Defining structure of the webpage
B) Adding styling to the webpage
C) Adding functionality to the webpage
D) None of these
Answer: Defining structure of the webpage
Explanation: HTML is used for defining structure of the webpage
Question 2: HTML is:
A) Programming language
B) Markup Language
C) Styling Language
D) None of these
Answer: Markup Language
Explanation: Programming languages add functionality like JavaScript, HTML is used for defining structure of the webpage so it is a markup language.
Question 3: Which tag is used for writing paragraphs in HTML?
A) <p>
B) <h1>
C) <h6>
D) <br>
Answer: <p>
Explanation: <p> tag is used for writing paragraphs
Question 4: Which editor can we use to code HTML?
A) VS Code
B) Sublime
C) Atom
D) All of these
Answer: All of these
Explanation: Any notepad can be used for writing HTML code.
Question 5: Which tag would produce biggest heading in HTML
A) <h1>
B) <h2>
C) <h5>
D) <h6>
Answer: <h1>
Explanation: Correct order of biggest to smallest heading:
h1 > h2 > h3 > h4 > h5 > h6
Question 6: Which of the following are void elements?
A) <br>
B) <img>
C) <hr>
D) All of these
Answer: All of these
Explanation: All the elements which do not have any closing tag are called void elements.
Question 7: Which of the following is not a way to position element:
A) Static
B) Absolute
C) Fixed
D) Inverted
Answer: Inverted
Explanation: Static is the default value for the position attribute, an element would be displayed in the normal flow.
Question 8: Which of the following is not a way to display HTML elements:
A) Inline
B) Inline-block
C) Block
D) None
E) All of these
Answer:
Explanation: Block element always starts from the new line.
Question 9: What are the different ways of linking CSS in HTML document:
A) Internal
B) External
C) Inline
D) All of the above
Answer: All of the above
Explanation: Inline: styling is done inside the HTML element using style attributes.
Question 10: Which of the following audio formats are supported by HTML:
A) Mp3
B) Wav
C) Ogg
D) All of these
Answer: All of these
Explanation: HTML supports all of these audio formats which are mp3, wav and ogg.