HTML Tags Short Answer Questions
5 Questions
1 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

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.

<p>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, <p>This is a line.<br>This is a new line.</p></p> Signup and view all the answers

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

<p>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,</p> Signup and view all the answers

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".

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Description

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.

More Like This

HTML Basics Quiz
6 questions

HTML Basics Quiz

SelectiveRubellite avatar
SelectiveRubellite
Clean Backend Coding and HTML Basics
39 questions

Clean Backend Coding and HTML Basics

CostEffectiveMulberryTree avatar
CostEffectiveMulberryTree
HTML Coding Exam
10 questions

HTML Coding Exam

StainlessTurquoise854 avatar
StainlessTurquoise854
Use Quizgecko on...
Browser
Browser