HTML Basic Flashcards
!DOCTYPE html
Defines that we are using the
latest HTML
What is the head?
What elements can go in the head?
The head is an element for containing data about the document. Non-displayed Metadata and the title.
Elements:
meta, title, base, style, link, & script
“<title></title>”
Goes in the head
Defines the document title
“<body></body>”
DOM
Where we actually create the page
“<br></br>”
Inserts a single line break
“<form></form>”
Used to create HTML forms
For user input action=”” attribute
controls where the form is sent
Elements: input, textarea, button, select,
option, optgroup, fieldset, label, output
“<input></input>”
defines input control with the type=””
attribute
textarea
Defines a multi-line text input
Set with rows=”” cols=”” attributes
“<button></button>”
Defines a clickable button
You can use text and elements input
doesn’t allow
b, i, strong, br, img, etc.
“<select>”</select>
Defines a drop down list
name attribute is needed to
reference the form data
id attribute is needed to associate
with a label
label
Defines a label for ‘input’ element
fieldset legend
Used to group elements in a form
Creates a box around the elements
Legend tag defines a caption/title
for the fieldset
datalist
Creates an input bar with predefined
drop down options
“<a></a>”
“Anchor Tag”
Defines a hyperlink with the
href attribute
Defaults:
unvisited blue
visited purple
active red
“<link></link>”
Defines the relationship of
the pages by linking them
in the head
link rel=”stylesheet” href=”style.css”
meta
Defines Metadata in the Head
base
Defines a URL base for assets
in the head
For example:
base href”https://www.xyz.com/
img src=”images/logo.png”
Logo will be found at
https://www.xyz.com/images/logo.png
href=””
An attribute that specifies the URL
for the hyperlink to go
a, area, base, link tags
download=””
An attribute that specifies what
will be downloaded when clicking on
a hyperlink
Elements: a, area, link
rel=””
An attribute that specifies the relationship between the documents
Elements: link, form, area, a
media=””
An attribute that specifies what
media/device the hyperlink is optimized for
Elements: a, area, link, source, style
target=””
An attribute that specifies where a
form is sent or where a linked document
is opened
Elements: form, base, area, a
form=””
An attribute that specifies the form
the element belongs to
Elements:
button, fieldset, input, label, meter, object, output, select, textarea
src=””
specifies the URL of a media/script file
Elements:
script, audio/video, img/track, source, input, iframe
value=””
Specifies the value of an element
Elements:
button, option, input, meter, progress, param, li
disabled
A boolean attribute that will disable
an element and it’s children
Elements:
button, fieldset, input, select, option, optgroup, textarea
“
”designated scripting.