HTML (HyperText Markup Language) Flashcards
Where do you put non-visible content about HTML document?
Head element - this is where metadata is stored
Where do you put visible content about the HTML document?
Body element
Where do the head and body tags go in a valid HTML document?
- Head after the opening HTML tag
- Body after the closing head tag
What is the purpose of the DOCTYPE declaration?
Tells a browser which version of HTML the page is using. It can also help the browser to render a page correctly.
Give 5 example of HTML tags.
html, head, title, body, h1, a, p, br, div, ul, ol, li, dl, img
What is the purpose of HTML attributes?
Provides additional content for elements. (ie href will allow a link to appear in “a” tags and images to appear in img tags)
Give an example of HTML entity (escape characters)
Less than sign, Greater than sign, Ampersand, Quotations, Cent Sign, Pound Sign, Yen Sign, Euro Sign, Copyright, Registered trademark, Trademark, Left single quote, Right single quote, Left double quotes, Right double quotes, Multiplication sign, Division sign
How do block-level elements affect the document flow?
Start a new line and will take full width of the parent element
How do inline elements affect the document flow
Will continue on the same line and will only take as much space as it needs. Cannot be resized.
What are the default width and height of a block-level element?
Width: 100%
Height: auto
What are the default width and height of an inline element?
Width: auto
Height: auto
What is the difference between an ordered list and an unordered list in HTML?
Ordered list will number each item while unordered lists will not
Is an HTML list a block element or an inline element?
Block element
What HTML tag is used to link to another website
Anchor (a) tag
What is an absolute URL?
Full webpage url to another page.