Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a content element in HTML5?

Tags:

html

I was confused about the content element the guy is using. I couldn't find information on it and as far as I know there wasn't something like this in HTML5. Am I wrong?

iterating code, from this video: http://youtu.be/eOG90Q8EfRo?t=15m1s

<article>
  <header> </header>
  <footer> </footer>
  <content> Is this correct? </content>
</article>
like image 986
sewo Avatar asked Jun 18 '13 13:06

sewo


People also ask

Is there a content tag in HTML?

The <content> HTML element—an obsolete part of the Web Components suite of technologies—was used inside of Shadow DOM as an insertion point, and wasn't meant to be used in ordinary HTML. It has now been replaced by the <slot> element, which creates a point in the DOM at which a shadow DOM can be inserted.

Is content an element?

Content elements are individual design and user experience (UX) components that tie messaging and brand experiences together. As a standalone piece, a content element does not convey the brand message or vision. When content elements work seamlessly into the messaging, they help bring the content vision to life.

Which one is not a HTML5 element?

Some attributes from HTML4 are no longer allowed in HTML5 at all and they have been removed completely. img and iframe. caption, iframe, img, input, object, legend, table, hr, div, h1, h2, h3, h4, h5, h6, p, col, colgroup, tbody, td, tfoot, th, thead and tr. table, tr, td, th and body.


2 Answers

A <content> element was proposed but rejected for HTML 5.

Such is the peril of trying to teach draft specifications.

like image 196
Quentin Avatar answered Sep 19 '22 21:09

Quentin


There is a <content> element, although it is used differently than how the presenter is using in the video linked in this question.

The HTML <content> element is used inside of Shadow DOM as an insertion point. It is not intended to be used in ordinary HTML. It is used with Web Components.

The presenter in the video probably should have been using the <main> element.

The HTML <main> Element represents the main content of the <body> of a document or application. The main content area consists of content that is directly related to, or expands upon the central topic of a document or the central functionality of an application. This content should be unique to the document, excluding any content that is repeated across a set of documents such as sidebars, navigation links, copyright information, site logos, and search forms (unless, of course, the document's main function is as a search form).

like image 45
kzh Avatar answered Sep 21 '22 21:09

kzh