IES: HTML-recog dk3 Flashcards
1
Q
- A technique often used in websites to dynamically update news or status items
- Does not depend on JavaScript support
- Coding: <meta http-equiv=”refresh” content=”5”>
A
Auto-page reload
2
Q
- Coding: <meta http-equiv=”refresh” content=”5; url=’new-page.html’”>
A
Auto page redirection
3
Q
- Search Engine Results Page
- In search results:
1. Shows the page title
2. Shows the Meta Description (below the page title)
A
SERP
4
Q
- Should be between 50 and 160 characters long
- Including keywords relative to the text content is important for SEO purposes
- Coding: <meta name=”description” content=”place the page description here including the relevant keywords of the document within”>
A
Meta “description”
5
Q
- If a website contains pages of identical or very similar content you can specify which page is to be indexed by including this: designates the original source
- This consolidates and preserves SEO ranking efforts and assets.
- Coding: <link rel=”canonical” href=”http://www.examplepage.com”/>
A
Canonical link
6
Q
- Empty element
- Used to incorporate resources in a document
- ONLY appears in the head of the document (head may contain many)
- Must contain “rel” and “href” attributes
- May contain “title” or “type” attributes
A
“link”element
7
Q
- Hints at the MIME nature & format of the link resource.
- For “button” elements, attribute specifies the nature & format of button.
- For “input” elements, attribute specifies the input element nature & format to display.
- For “embed”, “link”, “object”, “script”, “source”, and “style” elements; attribute specifies the Internet media nature & format (formerly known as MIME ____).
- May intend to help search engines to locate resources associated with the HTML document.
A
type
8
Q
- Specifies extra information about an element or resource.
- The information is most often shown as a tooltip text when the mouse moves over the element.
- Is part of the Global Attributes, and can be used on any HTML element.
- May include a title for the page in another language
A
title attribute
9
Q
- Cascading Style Sheets
- Contain hierarchical information about how the content of a web page will be rendered in a browser or the presentational aspects of the content.
When multiple rules select the same property, the order of precedence:
* 1st) Generally, the rule read last by browser;
* 2nd) In-line rules (style as attribute);
* 3rd) embedded rules (<style> tags in head);
* 4th) external rules (<link></link> tag (in head) to stylesheet);</style>
A
CSS
10
Q
- Attribute : “relationship”
- Example : <link rel=”stylesheet” href=”Daigle-style.css”>
A
rel
11
Q
- The Hypertext reference is an anchor tag attribute.
- Contains two components:
1. the URL: the actual link
2. the anchor text: the clickable/tappable text which appears on the page - Creates two types of links:
1. * specifies a destination within a document (i.e. internal links) (Example: <a href=”#a”>A</a> (in-document hypertext navigational link anchor))
2. Used to specify a destination to pages in other sites (i.e. external links) (Example: <a href=”laurendaigle.com”>Lauren Daigle’s Site</a> (external hypertext link anchor))
A
href
12
Q
- Added within or linked to an HTML document To present the rules governing how the content will appear by use of the following:
- Can be embedded within the head section as a non-empty element.
- Employed as an attribute in-line
- Linked by use of an external document to single or multiple HTML documents
A
“style”
13
Q
- Block element; semantically meaningless; anonymous. (Best avoided in favor of more meaningful tags)
- Not to be used for structural purposes: should be used for stylistic purposes.
- Can include an id, class, or style attribute for application of style rules.
A
“div” element
14
Q
- In-line element; semantically meaningless; anonymous (Best avoided in favor of more meaningful tags)
- Not to be used for structural purposes: it should rather be used for stylistic purposes.
- Can include an id, class, or style attribute for application of style rules.
A
<span></span>
15
Q
- Tag used to embed JavaScript within an HTML doc:
1. Placed in the head- executed when it/they are called, or when an event is triggered: placed in the head, you will ensure it/they are loaded before anyone uses them. (Ex: a mouse click event - <h1 onclick=”alert(‘Clicked!’)”>…</h1>
2. Placed in the body section(inline): to be executed when the page loads: it generates the content of the page. (Ex: a mouse click event - <h1 onclick=”alert(‘Clicked!’)”>…</h1>
3. Points to an external file through the src attribute: Simplifies running the same script on several pages without repeatedly writing it. (Remember: place exactly where you normally would write it). <script src=”script.js”> … </script> - Best placed right before the body closing tag (</body>), so browser can process doc content before reading script
- Common uses: image manipulation, form validation, dynamic changes of content
A
“script”
16
Q
- Only displayed when JavaScript functionality is absent or disabled
- Text container for Alternative fallback content (Example- <noscript>JavaScript Is Not Enabled!</noscript> )
A
“noscript” element
17
Q
- Exists purely for scripting
- Placeholder inside a web component that can be filled with custom markup
- Allows the creation of separate DOM trees while presenting them together.
- Part of the Web Components technology suite (allows creation of reusable custom elements — with their functionality encapsulated away from the other code — and utilization in web apps.
A
“slot” element
18
Q
- Exists purely for scripting
- Serves as a mechanism/container for holding HTML content/fragments hidden from the user when the page loads:
1. can be used later via JavaScript
2. can be generated immediately into shadow DOM. - Shadow DOM enables attachment of a DOM tree to an element, and have the internals(custom settings, etc.) of this tree hidden from JavaScript and CSS running in the page.
- You can use if you have some HTML code you want to use over and over again but not until you ask for it
A
“template” element
19
Q
- Multipart Internet Mail Extension
- Standard for formatting files of different types, such as text, graphics, or audio, so they can be sent over the internet and seen or played by a web browser or email application.
- Describes file types: ex.: “text/html”
- Official list at: http://www.iana.org/assignments/media-types/media-types.xhtml
A
MIME
20
Q
- Empty element
- Specifies an alternate directory holding resources/files to be recognized by the browser. ( <____ href=”http://localhost/resources/”> )
- Must be placed in document head before any “link” elements.
A
“base”element