HTML Flashcards
Where do you put non-visible content about the HTML document?
In the <head></head> head element.
Where do you put visible content about the HTML document?
In the <body></body> body element.
Where do the <head> and <body> tags go in a valid HTML document?
Within the <html></html> html element as sibling elements.
What is the purpose of a <!DOCTYPE> declaration?
To inform the browser which version of HTML is being used. IT also is used to help the browser render css, box model and the page correctly. If xhtml is used, the doctype will start with DOCTYPE XML
Give five examples of HTML element types.
head body img p h1 - h6 title
What is the purpose of HTML attributes?
They provide additional information about the contents of the element appearing on the opening tag with a name separated with the value.
Give an example of an HTML entity (escape character).
© , ® , < , > , & , " , ™ , × , ÷ , ‘ , ’ , “ ,
How do block-level elements affect the document flow?
It creates a new line before and after affecting the document flow of line breaks but can be changed using CSS.
How do inline elements affect the document flow?
Inline elements DO NOT force a new line to begin.
What are the default width and height of a block-level element?
The elements take the entire horizontal space of its parent element (container) and the vertical space equal to the height of its contents. Auto 100%
What are the default width and height of an inline element?
They occupy the space bounded by the tags surrounding it and takes up as much width as necessary.Auto Auto.
What is the difference between an ordered list and an unordered list in HTML?
Ordered lists are numbered while unordered lists are bulleted.
Is an HTML list a block element or an inline element?
HTML lists are a block element.
What HTML tag is used to link to another website?
The anchor a tag with an href set to a link.
What is an absolute URL?
This is a uniform resource locator or a link/address to another website on a different domain name.