HTML Final Exam
Name: ____________
F/Name: _____________
Section one: Multi choice question
1- Which HTML attribute is used to define inline styles?
a) class b) id c) style d) styles
2- What is the correct way to create an image in HTML?
a) <img src="image.jpg" alt="Description">
b) <image src="image.jpg" alt="Description">
c) <img href="image.jpg" alt="Description">
d) <img link="image.jpg" alt="Description">
3- What is the correct HTML tag for the largest heading?
a) <h6> b) <h1> c) <heading> d) <head>
4- What is the correct syntax to comment out a section of text in HTML?
a) <!-- Comment -->
b) /* Comment */
c) // Comment
d) # Comment
5- Which of the following input tag used form uploading file?
a: <input type=”text” > b: <input type=”file” >
c: <input type=”uploadfile”> d: <input type=”text”>
6- Which of the following is the correct syntax for creating a hyperlink in HTML?
a) <a href="http://www.example.com">Example</a>
b) <link url="http://www.example.com">Example</link>
c) <a>http://www.example.com</a>
d) <href="http://www.example.com">Example</href>
7- Which HTML tag is used to define an unordered list?
a) <ul> b) <ol> c) <li> d) <list>
8- Which of the following is used to define a table header in HTML?
a) <thead> b) <th> c) <tr> d) <td>
9- Which HTML element is used to define a list item?
a) <list> b) <li> c) <item> d) <ul>
10- What is the default display property of the <div> element?
a) Inline b) Block c) Inline-block d) None
Section two: Descriptive questions
1- What is the purpose of the <!DOCTYPE> declaration in an HTML document?
2- How do you create an ordered list in HTML?
3- What is the role of the alt attribute in the <img> tag?
4- How do you create a table in HTML?
5- What is the difference between <div> and <span> elements?
6- How do you specify the language of an HTML document?
7- Explain how to create a dropdown list in HTML.
8- What is the difference between the <b> and <strong> tags in HTML?
9- What is the purpose of the autocomplete attribute in an HTML form?
10- What is the purpose of the placeholder attribute in an HTML input field?