HTML Flashcards
1
Q
What is HTML and what is it used for?
A
HTML is a textual language for creating webpages.
2
Q
What is the format of an HTML file?
A
- Start with an indication of the document type
- then a head part with the page title and other page information
- Finally a body part with the actual page content
- May also contain CSS and JavaScript code
3
Q
What is an HTML element?
A
A single HTML structure that is represented with HTML tags. Most HTML elements have an opening and closing tag.
4
Q
How do you write HTML opening / closing tags for the ‘p’ element?
A
<p> paragraph </p>
5
Q
What are common HTML elements?
A
- h1, h2, h3: Headers, largest to smallest
- p: paragraph
- em, strong: italics and bold
- img: image (no closing tag)
- a: Link
6
Q
What are HTML tag attributes?
A
Special words used inside the opening tag to control the element’s behaviour.
7
Q
How does an anchor element create a link on a webpage?
A
With the href attribute in the opening a tag. Ex: a href=”link” </a>
8
Q
What is the syntax of a comment in HTML?
A
< ! - - Text - - >
(no whitespace normally)