WebDesign HTML/CSS Flashcards
(285 cards)
Question
Answer
What does HTML stand for?
Hyper Text Markup Language
Which doctype declaration does HTML5 use?
< !DOCTYPE html >
How do you declare a headline?
< h1 >…< /h1 >
sizes range from 1 to 6
How do you declare paragraphs in HTML?
< p >…< /p >
Give the hyperlink tag to a homepage Sweetheart.com.
< a href=”http://www.sweetheart.com” > This is the link to Sweetheart< /a >
- the page will open in the current window
Explain < img src=”w3schools.jpg” alt=”W3Schools.com” width=”104” height=”142” >. (4)
- tag to display an image
- the src attribute links to where the image is located, in this case, the same folder the HTML file is in
- alt is the text that is displayed if you hover over the picture or that is displayed in case the picture won’t load
- width and height refer to the display properties, not the actual size of the image, it will be resized to fit
What does the < body > element define?
- the document body or what is actually displayed/visible on the web page
What does the < html > element define?
the whole document
How do you close a break element? Why should you close it when it is anyway empty?
< br / >
- close all elements if you need stricter validation or make your document readable by XML parsers
How can you display a tool tip about an element for screen readers? (3)
< p title=”paragraph about zoos in Chicago” >text text< /p >
- screen reader reads it to a blind person
- is also displayed when you hover over element
< p title=”mouse” >< /p >
What is the tag to create a horizontal line in HTML?
< hr / >
< br / > is an … HTML element for creating a …
…empty…line break
What is the < head > element for?
-it only contains meta data-permissible elements: < title >, < meta >, < style >, < link >, < script >, < noscript > and < base >
How do you avoid the “poem problem”, that lines and spaces are ignored in HTML?
If you wrap paragraphs not in < p >, but in < pre > tags, all spaces will be honoured.< pre >text will show this way< / pre >
< pre > defines…
pre-formatted text.
The … element defines emphasised text (italics), with added … importance.
…< em > …semantic
How do you italicise “flower” in the following text paragraph?< p >The red poppy, was the famous flower blooming across Flanders during WWI< / p >
< p >The red poppy, was the famous < i >flower< / i > blooming across Flanders during WWI< / p >< em > also italicises, but with added semantic importance; do not use it for formatting alone!
How do you format text in bold?
< b >text< / b > bold formatting< strong >< / strong > bold formatting with added semantic importance
How do you highlight text by colouring its background, similarily to using a text marker in a book?
< mark >text< / mark > …text will be highlighted in front of a yellow background
How can you can you create strikethrough formatting? And why would this be used?
< del >puppy< / del > …puppy will be cancelled out-emphasises that something is now deleted and still inform users that it once existed/was considered/etc.
How can you show through formatting that particular text was added to a paragraph?
< p >< ins >Bunnies< / ins > are cute.< / p >
How do you create a subscript in HTML such as is required for a logarithms base?
< sub >…< / sub >
How can you reformat HTML to a smaller sized text with direct formatting?
textsuitable for footmarks