0% found this document useful (0 votes)
2 views4 pages

HTML Short Questions With Answers

The document contains a list of important HTML short questions and their answers, covering fundamental concepts such as tags, attributes, and basic structure of HTML documents. It includes practical examples of HTML code for creating elements like hyperlinks, images, lists, tables, and forms. The content serves as a quick reference for understanding HTML basics and its usage.

Uploaded by

nabakumarpaul619
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views4 pages

HTML Short Questions With Answers

The document contains a list of important HTML short questions and their answers, covering fundamental concepts such as tags, attributes, and basic structure of HTML documents. It includes practical examples of HTML code for creating elements like hyperlinks, images, lists, tables, and forms. The content serves as a quick reference for understanding HTML basics and its usage.

Uploaded by

nabakumarpaul619
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Important HTML Short Questions with Answers

1. What does HTML stand for?

HTML stands for HyperText Markup Language.

2. Who is the inventor of HTML?

Tim Berners-Lee invented HTML.

3. What is a tag in HTML?

A tag is a code used to define elements in HTML, usually enclosed in angle brackets like <p>.

4. What is an attribute in HTML?

An attribute provides additional information about an element, like href in <a href='...'>.

5. Write the basic structure of an HTML document.

<!DOCTYPE html>

<html>

<head>

<title>Title</title>

</head>

<body>

Content

</body>

</html>

6. Which tag is used to create a hyperlink?

<a> tag is used.

7. Which tag is used to display an image?

<img> tag is used.


Important HTML Short Questions with Answers

8. What is the use of the <title> tag?

It sets the title of the webpage in the browser tab.

9. What is the difference between <b> and <strong>?

<b> makes text bold visually, <strong> indicates strong importance semantically.

10. What is the difference between <i> and <em>?

<i> makes text italic, <em> gives emphasis to the text.

11. What is the use of <br> tag?

It inserts a line break.

12. Name the tag used to create a line break.

<br> tag.

13. What is the full form of URL?

Uniform Resource Locator.

14. Write the HTML code to display "Hello World".

<p>Hello World</p>

15. Which tag is used to create an ordered list?

<ol> tag.

16. Which tag is used to create an unordered list?

<ul> tag.

17. Write the tag to add a row in a table.


Important HTML Short Questions with Answers

<tr> tag.

18. Write the tag to insert a table cell.

<td> tag.

19. What is the use of <head> tag?

It contains meta-information about the document.

20. What is the use of <body> tag?

It contains the content of the HTML document.

21. What is the use of the <hr> tag?

It inserts a horizontal line.

22. How can you make text bold in HTML?

Using <b> or <strong>.

23. How can you add a background color in HTML?

Using the style attribute: <body style='background-color:yellow'>

24. What is the use of the <meta> tag?

It provides metadata like description, keywords, etc.

25. Which tag is used to insert a video?

<video> tag.

26. How do you insert a comment in HTML?

<!-- This is a comment -->


Important HTML Short Questions with Answers

27. What is the use of the <form> tag?

It is used to create an HTML form for user input.

28. What does the <input> tag do?

It is used to create input fields.

29. What is the purpose of the <div> tag?

It is used to group HTML elements and apply CSS styles.

30. What is the difference between block-level and inline elements?

Block-level elements take full width (e.g. <div>), inline do not (e.g. <span>).

31. Write HTML code to create a simple table with 2 rows and 2 columns.

<table><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>

32. Write HTML code to display an image from the internet.

<img src='https://example.com/image.jpg' alt='Image'>

33. Write HTML code to create a hyperlink to www.google.com.

<a href='https://www.google.com'>Google</a>

34. What is the output of this code?

<h1>Hello</h1><p>Welcome</p>

It displays a heading 'Hello' and a paragraph 'Welcome'.

35. Write HTML code to create a form with one text box and a submit button.

<form><input type='text'><input type='submit'></form>

You might also like