Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

html5
html
communitycreator
figure

What is the <figure> element in HTML?

AKASH BAJWA

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Answers Code

The <figure> element in HTMLHypertext Markup Language is referred to as a self-contained, single content block. We can keep code snippets, illustrations, diagrams, pictures, etc., together in a single tag. It helps to easily add or remove content without any errors.

Syntax

Content, tags, or headings should be enclosed between opening and closing tags.

<figure> ....... </figure>

Attributes

This tag supports both global and event attributes. CSS can be used to make the content responsive in the figure element.

<figure> Tag Supported Browsers

Code

In the code snippet, the <figure> tag is being used from line 12 to line 15 which contain the <img> and <figcaption> elements. The final output contains an Educative logo and its caption at the bottom.

  • HTML

RELATED TAGS

html5
html
communitycreator
figure

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Answers Code
Keep Exploring