HTML: Semantics Flashcards
HTML5?
Latest evolution of the standard that defines HTML.
Googling ‘HTML Spec’ will show what?
Shows the HTML Standard
What does Doctype do?
Informs the browser of the type of markup it should expect.
Explain Inline vs Block Elements and give an example of each.
Inline Elements - fit in alongside other elements ie, anchor tag
Block level Elements - take up a whole block of space ie, paragraph and header tags.
What are 2 generic container elements?
<div></div>
- Block level element used to group elements together.
<span></span> - Inline element generic container.
The Thematic Break Element
<hr></hr>
- Horizontal Rule, represents a thematic break between paragraphs ie change of scene in a story or shift of topic within a section.
*No closing tag, no content, no attribute
The Line Break Element
<br></br> - produces a line break in text. Useful for poems
*No closing tag, no content, no attribute
Superscript Element
- Inline text elevated off baseline; exponents and citations.
Subscript Element
- Inline text displayed with a lowered baseline; for chemicals and fractions.
What are Entity Codes?
HTML Entities are used to display reserved characters and special characters.
- Start with & and end with ;
- Google Character Entity Reference Chart
What is Semantic Markup?
Defined as meaningful markup or markup that relates or pertains to the meaning of the content of that element. For example, a website that just uses div containers for entirety of page.
What are examples of some Semantic Elements?
Main - Main content of a page.
Nav - Navigation links
Section - Represents a standalone section which doesn’t have a more specific semantic element.
Article - Self contained composition like a widget, blog, etc.
Aside - related note section
Header - heading of page. Can have multiple
Footer - footer of page. Can have multiple