HTML Flashcards
The tag that encapsulates the entire page
html
Contains metadata for the page, nothing stored here is ever displayed on the page.
head
Contains all the elements displayed on a page
body
Defines a section of the document, uses the full width of the page
div
Defines a section of the document, only uses the space required to display the element
span
Boldens text
b
Italicizes text
i
Creates a paragraph with space above and below the element
p
Creates a hyperlink
a
This is where the link in an <a></a> tag goes
href=””
An unordered list, bulletpoints basically
ul
An ordered, numbered list
ol
The tag given to each element in a list
li
The various heading tags
h1, h2, …, h6
The image tag
img
What 2 attributes does an img tag need?
src=”” and alt=””
How do you make an a tag link to another part of the page?
href=”#id” the place you’re linking to must have an id attribute in the tag
How do you get text input from the user?
input type =”text”
How do you create placeholder text in an input tag?
placeholder=””
What tag allows the submission of data
form
what do you add to an input tag to make it required
required
How do you create a set of radio buttons
input type=”radio”
nest it inside a label tag with a for attribute that’s the same as the id attribute of the input tag. All related radio buttons should have the same name attribute
How do you create a set of checkboxes
input type=”checkbox”
nest it inside a label tag with a for attribute that’s the same as the id attribute of the input tag. All related checkboxes should have the same name attribute
How do you make radio buttons or checkboxes checked by default?
add checked to the input tag
How do you tell if a page is HTML5?
at the top it will say !DOCTYPE html