HTML & CSS Exercise Questions Flashcards
Where do you put non-visable content about the HTML Document?
In the head element
Where do you put visible content about the HTML document?
In the body element
Where do the <head> and <body> tags go in a valid HTML document?
The head is within the html tag and you can put a title tag inside. The body is before the closing tag of HTML
What is the purpose of a <!DOCTYPE> declaration?
o To declare which type of html you are using
Give five examples of HTML element types.
head, title, P, img, body
What is the purpose of HTML attributes?
To provide additional information about the context of the element and appear near the opening tag of the element
Give an example of an HTML entity (escape character).
© = Copyright symbol
How do block-level elements affect the document flow?
Block level elements would push down to a new line every time a new block element is introduced
How do inline elements affect the document flow?
If it is an inline element it won’t push your text over to the next line like a block element would
What are the default width and height of a block-level element?
The entire horizontal space of its parent element (container), and the vertical space equal to the height of its contents
What are the default width and height of an inline element?
The height of an inline element is the height of the content. Only as much width as necessary
What is the difference between an ordered list and an unordered list in HTML?
Ordered list will have an <ol></ol> tag and unordered list will be <ul></ul>
Is an HTML list a block element or an inline element?
Block element because it moves to a new line on the list
What HTML tag is used to link to another website?
Anchor tag
What is an absolute URL?
Contains the entire address such as the domain name and includes the location within your website in your folder system names within the URL
What is a relative URL?
Are used when linking pages within own website and do not use the full web address ; only the location following the domain
How do you indicate the relative link to a parent directory?
../index.html
How do you indicate the relative link to a child directory?
Childfoldername/nameofchilddocument.html
How do you indicate the relative link to a grand parent directory?
../../index.html to go backwards
How do you indicate the relative link to the same directory?
Just the name of the file
What is the purpose of an HTML form element?
Create a form that can be submitted
Give three examples of type attribute values for HTML <input></input> elements.
o Radio
o Checkbox
o Submit