HTML Tags Flashcards
Headings
Labels content importance
< h1 > to < h6 >
To organize big blocks of text
Paragraph
< p >
For short text (ex. 1 to 2 words )
Span
< span >
You want to keep white space between your tags
Preserves White space
< pre >
You want to put stress emphasis on a piece of content
Stress Emphasis
< em >
You want to make a piece of content have strong importance
< strong >
Strong importance
< em > vs < strong >
Em will also italicize text
Strong will bold text
You want make to a list with numbers/order
Ordered list
< ol >
___ < li > item 1 < / li >
___ < li > item 2 < / li >< / ol >
You want to make a list but don’t care about order
Unordered list
< ul >
___ < li > item 1 < / li >
___ < li > item 2 < / li >< / ul >
What are the main, different containing elements?
Div, section, article, aside, header, footer, nav (navigation)
Why should you avoid divs if you don’t have to?
They don’t have semantic value. Many other more meaningful alternatives.
What are Deprecated Elements?
Elements we cant use anymore because they’re outdated.
You want to link an image
< img src = “image location” alt = “name of image” >
< img src = “image location” alt = “name of image” >
What is the significance of the alt?
If the image link breaks, the alt is a backup that will label what image should’ve been there.
You want to hyperlink a text
< a > href = “ url “ > content < / a >
Tag that encompasses EVERYTHING on an HTML document.
Root tag
< html >
You want to set the language of your site to English. How?
Put attribute in root tag:
< html lang = “ en “ >
You want to make section that helps users move around your webpage (ex. Links to different pages)
Navigation
< nav >
You want to make boxes for people to write their information
Form
< form >
You made a form for people. How to include a box for email? Phone?
< form >
__ < input type = “ tel “ >
__ < input type = “ email “ >< / form >
You made an input for emails. How do you label and connect that label to your input?
connect w/ an ID.
< label for = “ id name “ > email: < / label >< input id = “ id name “ type = “email “ >
What are the different ways to tag quotes and citations ( three)
< cite >
< q >< blockquote >
< cite > vs < q > vs < blockquote >
Cite = reference creative work, author or resource Q = short inline quotes Blockquote = longer external quotes
Your are referencing an author’s name, URL, title of work. What tag?
< cite >
You want to use a dialogue quote from a famous person. What tag?
< q >
You want to reference a big block of text from outside source.
< blockquote >
Cite can be an element AND an attribute. What’s the difference?
Attribute cite = same as an href
Element cite = wraps name/ source of quote