HTML Flashcards
Where to put non-visible content?
in the <head> element
Where to put visible content?
in the <body> element
Where do the <head> and <body> tags go?
in the <html> element
What is the purpose of a <!DOCTYPE> declaration?
it tells the browser what type of html we are using
Give five html element types
<body> <h1> <p> <img></img> <title>
</title></p></h1></body>
What is the purpose of HTML attributes?
it gives more information about the contents of an element
Give an example of an HTML entity(escape characters)
© × & ®
How do block-level elements affect the document flow?
It separates into blocks creating a container.
How do inline elements affect the document flow?
It doesn’t. It changes the element in a line so it doesn’t change the flow.
What is the default height and width of a block-level element?
Size of the entire width of the page.
What is the default height and width of a inline element?
It is the size of the content.
Difference between ordered and unordered lists.
Ordered <ol> lists are either numbered or lettered while unordered <ul> are listed in bullet points.
Is an HTML list a block or inline element?
It is a block element.
What HTML tag is used to link another website?
anchor tag <a></a>
Example of an absolute URL
https://www.google.com
Example of a relative URL
../example/example.html
Relative link to a parent directory
../example
Relative link to a child directory
example.html
Relative link to a grandparent directory
../../example
Relative link to the same directory
example.html
Purpose of the HTML <form> element
Used to create forms that would submit information to the server
Five examples of form control elements
<input></input> <button> <select> <textarea> <label></label></textarea></select></button>
Give examples of type attribute
“text” “radio” “email” “checkbox” “password”
Is an HTML <input></input> element a block or inline element?
Inline. <form> is a block
What are the six primary HTML elements used for creating tables?
<table> <thead> <tbody> <th> <tr> <td>
</td></tr></th></tbody></thead></table>
What is the purpose of the <thead> and <tbody> element?
the <thead> element is used for the titles or headers of that table. while the <tbody> element is used for the normal contents/data
Give two examples of data that would lend itself well to being displayed in a table.
kills and deaths in a video game
a used car model year and mileage