click below
click below
Normal Size Small Size show me how
HTML Semantics
HTML Semantics and non-semantic Elements
| Question | Answer |
|---|---|
| A semantic element clearly describes its meaning to both the browser and the developer. Example: | Examples of non-semantic elements: <div> and <span> - Tells nothing about its content. Examples of semantic elements: <form>, <table>, and <article> - Clearly defines its content. |
| Many web sites contain ________code like: <div id="nav"> <div class="header"> <div id="footer"> to indicate navigation, header, and footer. | HTML |
| In HTML there are some semantic elements that can be used to define different parts of a web page: | <article> <aside> <details> <figcaption> <figure> <footer> <header> |
| In HTML there are some semantic elements that can be used to define different parts of a web page: | <main> <mark> <nav> <section> <summary> <time> |
| The <section> element defines a section in a document. According to W3C's HTML documentation: | element; "A section is a thematic grouping of content, typically with a heading." |
| Examples of where a <section> element can be used: | Chapters Introduction News items Contact information |
| specifies independent, self-contained content. An _________ should make sense on its own, and it should be possible to distribute it independently from the rest of the web site. | The <article> element; article |
| Examples of where the <article> element can be used: | Forum posts Blog posts User comments Product cards Newspaper articles |
| The ________ element specifies independent, self-contained content. The _________ element defines section in a document. | <article> ; <section> |
| Can we use the definitions to decide how to nest those elements? | No |
| you will find HTML pages with <section> elements containing <article> elements: | and <article> elements containing <section> elements. |
| defines a footer for a document or section. | The <footer> element |
| A <footer> element typically contains: | authorship information copyright information contact information sitemap back to top links related documents |
| You can have ___________ <footer> elements in one document. | several |
| Example A footer section in a document: | <footer> <p>Author: Hege Refsnes</p> <p><a href="mailto:hege@example.com">hege@example.com</a></p> </footer> |
| defines a set of navigation links. | The <nav> element |
| Example A set of navigation links: | <nav> <a href="/html/">HTML</a> | <a href="/css/">CSS</a> | <a href="/js/">JavaScript</a> | <a href="/jquery/">jQuery</a> </nav> |
| all links of a document should be inside a <nav> element: | The <nav> element is intended only for major blocks of navigation links. |
| ________, such as screen readers for disabled users, can use this element to determine whether to omit the initial rendering of this content. | Browsers |
| defines some content aside from the content it is placed in (like a sidebar). | The <aside> element |
| should be indirectly related to the surrounding content. | The <aside> content |
| specifies self-contained content, like illustrations, diagrams, photos, code listings, etc. | The <figure> tag |
| defines a caption for a <figure> element | The <figcaption> tag |
| The <figcaption> element can be placed as the _____ or as the _____ child of a <figure> element. | first; last |
| The <img> element defines the actual image/illustration. Example | <figure> <img src="pic_trulli.jpg" alt="Trulli"> <figcaption>Fig1. - Trulli, Puglia, Italy.</figcaption> </figure> |
| allows data to be shared and reused across applications, enterprises, and communities. | A semantic Web |
| Defines additional details that the user can view or hide | <details> |