2 Text Flashcards
Difference between structural markup and semantic markup
Structural- describes headings and paragraphs,etc. Things that effects the structure of the page
Semantic- Provides extra info. Where emphasis should be placed on words, quotations (and attributions), meaning of acronyms etc. Can be affected by CSS styles but otherwise don’t change things.
What are the tags for: bold italic superscipt subscript
How do these tags differ from others?
do they have semantic meaning?
<b>
<i> italic
<sup> superscipt
<sub> subscript
These are meant to actually change the way the text looks with HTML and not necessarily represent semantic info (or structural info)
Things like em or strong are for more semantic value for css control and are recommended nowadays
how do browers treat multiple spaces or new lines within <p> tags?
new lines- ignores
multiple spaces- ignores
Tag for new line
<br>
or <br />
Tag for horizontal line with a new line
<hr>
or <hr />
Tag to indicate that text has importance (semantic)
<strong>
Tag to indicate emphasis to change the meaning of a sentence (semantic)
<em> italics by default most of the time, capitalized here for example: I THINK ivy was the first I think IVY was the first I think ivy was the FIRST
(semantic)
Tag for Quote.
Tag for whole paragraph of quotes
Defines the title of a creative work (e.g. a book, a poem, a song, a movie, a painting, a sculpture, etc.).
Note: A person’s name is not the title of a work.
How do you have the author source at the bottom of the quote?
<q>
Adds quotation marks by default.
<blockquote> (can be nested in p tags or contain p tags within)
Does not add quotation marks by default
cite
Use a figure, the blockquote is in place of the image, figcaption for the author source
(semantic)
Tag a word as an abbrevation.
Have the full thing display when hovered over
<abbr>
<abbr title=”full word”>
(semantic)
Reference a book, film, research paper etc.
(not for people names)
<cite>
(semantic)
Set a defining instance for a term.
Show definition when hovered
<dfn>
title attribute
(semantic)
Set author details like email address, URL, physical address, phone number, social media handle, etc.
<address>
(semantic)
Show that a word has been deleted as a correction
Show that a word has been added
Show that a word is no longer accurate or relevant (but not to be deleted)
(often crosses out and underlines as default)
<del>
<ins>
<s> (called strike through)
(semantic)
Highlight text
<mark>
Elements that start on a new line
Elements that do not
Block
Inline