What is <figure> tag?
Experience Level: Junior
Tags: HTML
Answer
The <figure>
tag is for self-contained content, frequently with a caption <figcaption>
and is typically referenced as a single unit. Usually a <figure>
is an image, illustration, diagram, code snippet, etc., that is referenced in the main flow of a document, but that can be moved to another part of the document or to an appendix without affecting the main flow.
E.g. if you wont to disply on your web page code example you can firs the <> ; , writte like en code. Without that the code won't be desplayed.
Related HTML job interview questions
What is !DOCTYPE?
HTML JuniorWhich version of HML do you use?
HTML JuniorHow does HTML/CSS work with DOM?
HTML JuniorWhat is DOM?
HTML JuniorHow do you create table with 2 rows and 3 cells?
HTML Junior