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>
Best Answer
A <content>
element was proposed but rejected for HTML 5.
Such is the peril of trying to teach draft specifications.
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 insertionpoint. It is not intended to be used in ordinary HTML. It is used with WebComponents.
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).
You can use <main>
. It is used in HTML the separate the main content of your page.
Like this:
<!DOCTYPE html><html><head>...head content</head><body><header>...header content</header><nav>...nav menu</nav><main><section id="news"><article id="who-let-the-dog-out">...article content</article><article id="LottoSurprice">...article content</article></section><section id="blog">...section content</section><aside id="advertisement">...aside content</aside></main> <!-- end of page content --><footer>...footer content</footer></body></html>
— <main>
@ MDN