HTML Flashcards
What was the purpose of HTLM in the past and what’s now?
In the past it was used as research documents, linking documents, reports, pictures and graphs;
Now it enables applications, fully featured.
What is the most common client for HTML?
Browsers.
What the difference between URI and URL?
URIs identify and URLs locate; however, locators are also identifiers, so every URL is also a URI, but there are URIs which are not URLs.
e.g: your name is your URI and your address is your URL.
What does the HTML element do?
Is the root of the document.
What does the HEAD element do?
Hold document metadata. Including title.
Where can the HTML be validated?
validator.w3.org
What’s traverse?
To move or travel in an area.
What’s a HREF?
It’s a reference to another document via some URI/URL.
What are the common child elements of HEAD?
key information used to index the pages - not so used nowadays once google and bing optmize their searches via actual page content.
import external scripts
import styles.. via files or inline
<link></link>
link to resources
<base></base>
define a base address (relative paths)
What’s the most common main page name of a website?
index.html
What is a ! mark in the html?
An instruction for the browser. e.g doctype and comment
What are common attributes?
Name, rel and class
What are the main child elements of BODY?
Text --- duh Lists Links Tables Images
Can ID and name attributes repeat?
No, they need to be unique. Id is document-wide unique and name need to be element-specific.
How many headings exists? (Hn)
- The number one should appear only once.
What’s the difference between block and inline elements?
Block elements are containers to text or other block and inline elements. Inline elements are containers for text or other inline elements.
What’s a div?
General-purpose element to identify a section of the page.
What’s a <pre> element?</pre>
Text in a pre element is displayed in a fixed-width font, and it preserves both spaces and line breaks.
What’s a <br></br> element?
It’s a line break.
What’s a <hr> element?
Horizontal line. not much used. people usually use borders.
What is and what are the most character entity?
represent a character that is special.
 : non-breaking space.
< and >: less and greater than. to not break html structure.
What does reference text elements do?
They help to cite other jobs/documents, to define abbreviations and even code and sample snippets.
What elements were introduced in HTML 5 that gives more semantic meaning for specific structures? note: they replace the generic divs.
Header, article, footer and section.
What are the different lists on HTML?
Ordered, unordered and definition.
How often lists are used?
Quite often. They are mostly used with css to make them be render horizontally as breadcrumbs or vertically as images.
What’s an anchor tag?
It’s a link. Link to another document or event to other elements.
What’s an href attribute?
Hypertext reference. It represents the link target.
What’s an absolute and a relative link/path?
Absolute contains the full link, including the server. The relative link is a link that depends where the user is positioned.
What’s a nav bar element?
An element that usually contains links to other screens. Can be located at the top, in the left side or even in the bottom.
How to create links to sections or elements?
Using href as well, but starting with #. The target elements must either have a matching ID or a anchor tag with an attribute with the same name as the #.
What are the most common anchor tag’s attributes?
language, relationship, content type, access key and target (e.g: _Blank).
What a table in HTML can do?
Display header values, the content values and also the footer (in case of aggregated data).
How does the structure of a table look like?
thead, tbody, tfoot, TR, TH, TD, colspans and rowspans.
How to display an image in the HTML?
with the img element. src, alt, height and width are property of an img.
What’s srcset attribute in the img element?
Allows defining the same img with different quality and the browser will decide which one is the best for the device which is accessing the page.
What’s a picture element?
Similar to img, but allow defining source types (e.g png and jpeg). Also allows srcset.