HTML Flashcards
What is HTML used for?
Content and structure of web pages
HyperText Markup Language
markup aka tags and elements
Who develops web standards?
World Wide Web Consortium (w3c)
HTML History
3 stages
HTML, xHTML, HTML5
1990, 2000, 2009
Heading tags
h1 thru to h6
from most important to least important content
ex. h1 for article name, h2 for section names, h3 for sub-section names, etc.
Basic outline of an html file
doctype tag
html tag
head tag
body tag
footer tag
each of these have a start tag < >, and end tag </> except doctype
meta tag
used for describing metadata of the page
charsets like UTF-8, keywords, viewport settings
ex. < meta name=”viewport” content=”device-width, inital-width = 1.0”> sets the html page to fit the device screen’s width
empty tags
br, img, hr, input, col, meta and link
there are a total of 15, these are some of them
aka self-closing tags
anchor tag
< a> allows for hyperlinking
in the format < a href=”link_to_url”
elements vs attributes
an element is the tag itself, an attribute is something you can add to the tag
ex. < a href=”link_to_url”>, a is the element,
href is the attribute
script tag
adds scripting languages to your html page
ex. < script src=”javascript_file.js”> < /script>
head elements
meta, title, link, script
title tag
the title of the document
what you see in a tab name when browsing the internet
link tag
links the html page to another resource
ex. < link rel=”stylesheet” href=”css_file.css” type=”text/css >
body elements
h1-h6, p, div, section, article
other elements such as aside, li, ul, ol, br, hr, and a (there are more)
headings, paragraph/division container, broader element, independent content
figure tag
display content (ex. img) that is important to the main content but its position is unimportant
< figcaption> is nested within
html tags review
▪ < head>
* < title> < meta /> < link /> < script>
▪ <body>
* < header> < footer> < section> < aside> < figure> < figcaption>
* < p> < div> < h1>…< h6> < ul> < ol> < li> < a>
* < table> < tablecaption> < th> < tr> < td>
* < br> < hr> < img>
* more: < blockquote> < q> < pre> < code> < dl> < dt> < strong>
< em> < nav> < font>
table tags
< table>, < tr>, < th>, < td>
overall table, table row, table heading, and individual cell
may also include caption, colhead, thead, tfoot, and tbody tags
block vs in-line elements
block starts on a new line, in-line does not
block ex. div, p, section; in-line ex. a, img, br
an in-line element cannot contain a block element
list elements
ol or ul tags for ordered and unordered; list items are li tags
lists can be nested, list prefixes can be changed from the default 123