HTML tags | template

It is used as a container to hold some HTML content hidden from the user when the page loads, but may be rendered later using JavaScript.

Think of a template as a content fragment that is being stored for subsequent use in the document. While the pars…


This content originally appeared on DEV Community and was authored by Carlos Espada

It is used as a container to hold some HTML content hidden from the user when the page loads, but may be rendered later using JavaScript.

Think of a template as a content fragment that is being stored for subsequent use in the document. While the parser does process the contents of the <template> element while loading the page, it does so only to ensure that those contents are valid; the element's contents are not rendered, however.

You can use it if you have some HTML code you want to use over and over again, but not until you ask for it. To do this without the <template> tag, you have to create the HTML code with JavaScript to prevent the browser from rendering the code.

  • Type: -
  • Self-closing: No
  • Semantic value: No

Definition | Example | Support


This content originally appeared on DEV Community and was authored by Carlos Espada


Print Share Comment Cite Upload Translate Updates
APA

Carlos Espada | Sciencx (2021-12-01T07:26:13+00:00) HTML tags | template. Retrieved from https://www.scien.cx/2021/12/01/html-tags-template/

MLA
" » HTML tags | template." Carlos Espada | Sciencx - Wednesday December 1, 2021, https://www.scien.cx/2021/12/01/html-tags-template/
HARVARD
Carlos Espada | Sciencx Wednesday December 1, 2021 » HTML tags | template., viewed ,<https://www.scien.cx/2021/12/01/html-tags-template/>
VANCOUVER
Carlos Espada | Sciencx - » HTML tags | template. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/12/01/html-tags-template/
CHICAGO
" » HTML tags | template." Carlos Espada | Sciencx - Accessed . https://www.scien.cx/2021/12/01/html-tags-template/
IEEE
" » HTML tags | template." Carlos Espada | Sciencx [Online]. Available: https://www.scien.cx/2021/12/01/html-tags-template/. [Accessed: ]
rf:citation
» HTML tags | template | Carlos Espada | Sciencx | https://www.scien.cx/2021/12/01/html-tags-template/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.