HTML Tags Short Answer Questions

AdaptableDravite avatar
AdaptableDravite
·
·
Download

Start Quiz

Study Flashcards

5 Questions

Explain the purpose of the ALIGN tag in HTML and provide examples of its usage.

The ALIGN tag is used to position the alignment of various components like text, paragraph, images, and tables in a web page. The various types of alignments are LEFT, RIGHT, CENTER, and JUSTIFY.

How can comments be added in a web page using HTML? Provide an example.

Comments can be added in a web page by placing the text which we want as the comment in between the comment tags . For example, .

Define the purpose of the BODY tag in HTML and explain any three attributes of this tag.

The BODY tag contains all the text and images that make up the page. It is a container tag. Three attributes of the BODY tag are: a) BGCOLOR- It specifies the background color of a web page. b) TEXT- It specifies the color of the text to be displayed on the web page. c) BACKGROUND- It specifies the path of the image file to be displayed as the background of a web page.

State the use of the BR tag in HTML and provide an example of its application.

The BR tag is used to give line spacing between the lines of text in HTML. It shifts the text following it to the next line. For example,

This is a line.
This is a new line.

Why do we use the background attribute in the body tag in HTML? Provide an example.

The background attribute in the body tag specifies the path of the image file to be displayed as the background of a web page. For example,

Study Notes

HTML Tags and Attributes

ALIGN Tag

  • The ALIGN tag is used to specify the alignment of an image, object, or text in HTML.
  • It can be used to align content to the left, right, or center of the page.
  • Example: <img src="image.jpg" alt="image.jpg"> aligns an image to the right side of the page.

Comments in HTML

  • Comments in HTML are used to add notes to the code that are not visible to users.
  • Comments start with ``.
  • Example: ``.

BODY Tag

  • The BODY tag is used to define the content of an HTML document.
  • Attributes of the BODY tag include:
    • bgcolor: sets the background color of the page.
    • text: sets the text color of the page.
    • link: sets the color of links on the page.
  • Example: `` sets the background color to blue, text color to white, and link color to red.

BR Tag

  • The BR tag is used to insert a line break in HTML.
  • It is used to separate paragraphs or create space between elements.
  • Example: <p>This is a paragraph.<br>This is a new line.</p> inserts a line break between the two lines of text.

Background Attribute

  • The background attribute is used in the BODY tag to set the background image or color of a web page.
  • It can be used to set a background image, repeat, and position.
  • Example: `` sets the background image of the page to "image.jpg".

Test your knowledge of basic HTML tags with these short answer questions. Evaluate your understanding of attributes such as background, the purpose of BR tag, and the usage of ALIGN tag.

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

Get started for free

More Quizzes Like This

HTML Basics Quiz
6 questions

HTML Basics Quiz

SelectiveRubellite avatar
SelectiveRubellite
HTML Basics Quiz
15 questions

HTML Basics Quiz

ProblemFreeQuail avatar
ProblemFreeQuail
Introduction to HTML Quiz
6 questions

Introduction to HTML Quiz

MarvellousJupiter avatar
MarvellousJupiter
Use Quizgecko on...
Browser
Browser