IES: HTML Flashcards
<p>
</p>
- Block element
- Paragraph container separates content into sentences and paragraphs to be more easily read and more readily understood
- The browser usually separates each paragraph element typically leaving two empty lines between them.
<article>
</article>
- Article container element
- contains a stand-alone composition
<a></a>
- The anchor is an Inline element that defines a hyperlink which allows users to navigate from one page to another.
- The href attribute is most important to this element indicating the link’s destination: Without href, there is no hyperlink.
- The anchor can also include a title attribute displaying a “tooltip” when the hyperlink is hovered over.
URL
- A web address is formally known as a uniform resource locator
- Has three parts: protocol, domain, and its path
HTML
- hypertext markup language
HTTP
- Hypertext transfer protocol
- This is the first of the three parts that make up the URL: the protocol
- Always appears as the URL prefix: http://
HTTPS
- Hypertext transfer protocol secure
- Always appears as the URL prefix : https://
Protocol
- A set of rules governing the exchange or transmission of data between devices
- Denoted by the prefix on any URL
- (example http://… or https://…)
- 1st of 3 parts of the URL
IP
- Internet Protocol
- The numerical address of a specific domain name
WHATWG
- Web hypertext application technology working group
- An organization or group that sustains or supports the standard of the HTML language established by the W3C to prevent that Global Internet language from being fragmented or compromised
- This agency maintains the ever-evolving HTML living standard as technology in the world wide web culture demands
W3C
- Short for World Wide Web Consortium
- It is the international governing body for the development of platform-independent web standards and specifications
Domain Or domain name
- The hostname of the computer from which the file can be downloaded. For instance: www.example.com
- The second of three parts of a URL
Path
- The file name prefixed by any Parent Directory names where applicable. For instance:/htdocs/index HTML
- The third of three parts that form a URL
DNS
- The domain name system (DNS) Is the phone book of the internet. Humans access information online through domain names, like nytimes.com or espn.com
- DNS servers translate domain names into IP addresses, so browsers can load Internet resources.
Webserver
- The World Wide Web is comprised of a series of large-capacity computers known as web servers.
- Upon request from a computer for a resource, a web server will send back response headers and a copy of the requested file or an error message.
HTML document skeletal structure
The skeletal structure has three parts:
* document type declaration
* Head section
* Body section
Document type declaration
- <!doctype html>
- Declaring precisely which version of HTML is used to mark up the document.
<head>
</head>
- provides descriptive data about the document itself, such as the document title and the character set used.
- Non-empty element
<body>
</body>
- Contains the content that is to appear when the document gets loaded into a web browser
- Non-empty element
HTML fundamental structure (basic coding structure)
<!doctype html>
<html>
<head>
<!--Data describing the document to be added here. →
</head>
<body>
<!--Content to appear in the browser to be added here.–>
</body>
</html>
lang
- attribute of the HTML root element
- <html lang=”en”> (the previous “lang” attribute code appoints the document’s language as English) (“ar”: Arabic, “fr”: French, “es”: Spanish)
- attribute of the HTML root element
- <html lang=”en”> (the previous “lang” attribute code appoints the document’s language as English) (“ar”: Arabic, “fr”: French, “es”: Spanish)
<meta></meta>
- empty element
- presents Information or parameters about the document itself
- always appears in the head of the document’s HTML coding
Charset
- Character-set
- Charset is an attribute of the meta element
- Example coding: ( <meta charset=”utf-8”> )
UTF-8
- Setting the Charset as utf-8 assigns an 8-bit Unicode Transformation Format For the HTML document
- A type of character encoding format
<title>
</title>
- Text container in the head where the doc’s title is placed
- very important for SEO.
Used extensively: - bookmarks
- Title bar
- Navigation tab
- History
- Search engines
- Title should be short and meaningful: ideal length- 10 characters or less.
SEO
- Search Engine Optimization.
- Highly prized process of improving a page’s organic page rankings (rank in search results) presumably, maximizing the number of visitors to a particular website.
- It is useful to provide sufficient metadata that describes the page content well.
<h1>
</h1>
- Block element
- The tags For this element contain the largest of 6 different sizes of headings and subheadings
- Usually holds the doc’s main heading (Should be only one in doc, but can be more)
W3C Validator Tool
- Validator.w3.org
- Validator tools verify that any HTML doc will conform to its specified document type declaration: thereby, always appearing correctly in any standards-compliant browser.
HTML “character entities”
- In HTML coding, the way of including special characters in the document
- Begins with an ampersand and ends with a semicolon (& … ;) (W3C Chart of all character entities at: dev.w3.org/html5/html-author/charref)
- Best avoided in doc titles as the vocal narrator used by visually impaired viewers may read entity as a word.
<!--"<"-->
(The only coding relevant to this question lies between the quotes.)
- (<)
- These are often needed to avoid confusion with the angled brackets that surround each HTML tag.
<!--">"-->
(The only coding relevant to this question lies between the quotes.)
- (>)
- These are often needed to avoid confusion with the angled brackets that surround each HTML tag.
Word of coding:
* begins with “ &…”
* followed by “..nbsp..”
* ending in “..; “
(The only coding relevant to this question lies between the quotes.)
- (a single non-breaking space)
- A commonly used HTML entity
- A space that will not break into a new line.
- Two words separated by a non-breaking space will stick together (not break into a new line).
- This is handy when breaking the words might be disruptive.
<!--"•"-->
(The only coding relevant to this question lies between the quotes.)
- (bullet point)
<!--"©"-->
(The only coding relevant to this question lies between the quotes.)
- (©)
<!--"™"-->
(The only coding relevant to this question lies between the quotes.)
- (™)
<!--"®"-->
(The only coding relevant to this question lies between the quotes.)
- (®)
<!--"""-->
(The only coding relevant to this question lies between the quotes.)
- ( “ ), (Quotation marks)
- Example: "HTML in easy steps" (Appears as “HTML in easy steps”)
To launch the narrator in Windows 10
- WinKey + Ctrl + Enter
- Press the “tab” button to hear the document title
Coding in HTML to place a comment that is ignored by the browser
- <!--notes or comments here-->
Optimize doc view (all screens)
- Optimizes the page view for smaller / larger screens: ensures doc will fill the device screen width
- Sets the initial zoom level so the content is not zoomed.
- Coding: <meta name=”viewport” content=”width=device-width, initial-scale=1”>
Auto-page reload
- A technique often used in websites to dynamically update news our status items
- Does not depend on JavaScript support
- Coding: <meta http-equiv=”refresh” content=”5”>
Auto page redirection
- Coding: <meta http-equiv=”refresh” content=”5; url=’new-page.html’”>
SERP
- search engine result page
- Will Show The Meta description in search results below the page title
Meta “description”
- 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”>
Canonical link
- 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 for a piece of content
- Coding: <link rel=”canonical” href=”http://www.examplepage.com”/>
<link></link>
- Empty element
- Used to incorporate resources in a document
- ONLY appears in the head of the document (may contain many links)
- Must contain “rel” and “href” attributes
- May contain title or type attributes
type
- Hints at the MIME type of the link resource.
- For <button> elements, attribute specifies the type of button.</button>
- For <input></input> elements, attribute specifies the type of <input></input> element to display.
- For <embed></embed>, <link></link>, <object>,
, <source></source>, and <style> elements attribute specifies the Internet media type (formerly known as MIME type).</style>
</object> - May intend to help search engines to locate resources associated with the HTML document.
title
- 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.
- The title attribute is part of the Global Attributes, and can be used on any HTML element.
- May include a title for the page in another language
CSS
- 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);</style>
- 4th) external rules (<link></link> tag (in head) to stylesheet);
rel
- Attribute : “relationship”
- Example : <link rel=”stylesheet” href=”Daigle-style.css”>
href
- The Hypertext reference is an attribute of the anchor tag, which is
- used to identify sections within a document (i.e. internal links)
- used to identify links to pages in other sites (i.e. external links)
- The HREF contains two components: the URL, which is the actual link, and the clickable text that appears on the page, called the “anchor text.”
- Example: <a href=”#a”>A</a>
- (in-document hypertext navigational link anchor)
- Example: <a href=”laurendaigle.com”>Lauren Daigle’s Site</a>
- (external hypertext link anchor)
<style>
</style>- Added within or linked to an HTML document To present the rules governing how the content will appear
Rules governing the content appearance are linked to the html doc through: - Can be embedded within the head section
- Employed as an attribute in-line
- Linked by use of an external document to single or multiple HTML documents
<div>
</div>
- 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.
<span></span>
- 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.
<script> </script>
- Best placed right before the body closing tag (</body>), so browser Can process doc content before reading script
- Embeds JavaScript within an HTML document; links doc to a separate file: <script src=”script.js”> … </script>; or JS can be specified by script in-line to on-event (Ex: a mouse click event - <h1 onclick=”alert(‘Clicked!’)”>
<noscript>
</noscript>
- Only displayed when JavaScript functionality is absent or disabled
- Text container for Alternative fallback content (Example- <noscript>JavaScript Is Not Enabled!</noscript> )
<slot>
</slot>
- Exists purely for scripting
<template>
</template>
- Exists purely for scripting
MIME
- 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
<base></base>
- Empty element
- Specifies an alternate directory holding resources/files to be recognized by the browser. ( <base href=”http://localhost/resources/”> )
- Must be placed in doc head before any <link></link> elements.
Absolute address
- Includes the entire URL: protocol, domain name, and path
- Example: “https://www.laurendaigle.com/Daigle-turquoise.jpg”
Relative address
- Can reference a file in home directory of the main HTML document by file name and may use the ../ syntax to reference that parent directory. (Example: /Daigle-turquoise.jpg)
- By default, the browser will look in HTML doc’s home directory.
Permitted “rel” values
- (Many are intended to help search engines locate resources associated with that HTML document (a.k.a. Increase traffic to your webpage/website/document))
- Alternate
- Author
- Bookmark
- Help
- Icon
- License
- Next
- Nofollow
- Noreferrer
- Prev
- Search
- Stylesheet
- Tag
- Shortcut icon
Icon
- Established in the head
- Force browser to refresh icon- assign “favicon.ico?v=2” to link’s href attribute
- Coding: <link rel=”shortcut icon” href=”favicon.ico”>
Heading elements
- Order of importance (<h1>, <h2>, <h3>, <h4>, <h5>, <h6>) should implicitly convey the document structure through correct sequencing of the heading tags
- Correct sequencing and use of meta keywords in headings is important to SEO and allows syndication into another site
**Never use heading tags for their style qualities
<hgroup>
</hgroup>
- Grouping solution to the limited number of heading levels and the need to maintain a correctly sequenced document outline
- Doc may contain multiple hgroup elements, but an hgroup may contain ONLY heading elements.
- Ex. code
<hgroup>
<h1>HTML</h1>
<h2>Building better websites</h2>
</hgroup>
<header>
</header>
- May contain heading; hgroup; intro items like icons, banners, and table of contents; etc
- *You cannot Nest header elements one within another
- Ex. code
<header>
<img src=”Daigle-turquoise-banner.jpg” width=”500” height=”72” alt=”Banner”>
<hgroup>
<h1>HTML</h1>
<h2>Building better websites</h2>
</hgroup>
</header>
<nav>
</nav>
- Acts as a wrapper (not to replace any structural element) enclosing page-wide or site-wide navigation hyperlinks groups
- Includes ONLY page-wide or site-wide nav hyperlinks groups
- Ex. code
<nav id=”horizontal”>
<h2>Site Links</h2>
<p>
<a href=”#html”>Markup</a> |
<a href=”#js”>Scripting</a> |
<a href=”#css”>Style Sheets</a> </p>
</nav>
<img></img>
- Empty element
- used to embed an image in an HTML page
- are not technically inserted into a web page: they are linked to web pages
- creates a holding space for the referenced image
- Ex. code
<img src=”Daigle-turquoise-banner.jpg” width=”500” height=”72” alt=”Banner”>
<menu>
</menu>
- Includes a list of commands for the webpage or website
- Groups of hyperlinks on a webpage navigating around the page or website should be enclosed in nav tags or menu tags
<br></br>
- Line break element Can force the text to wrap to The next line Before It would automatically wrap to the next line at the text container elements edge
<footer>
</footer>
- A footer can be included in a doc or article, section, etc. of a doc and provides info about the doc or division of the.doc
- Might contain an address element (contact details, etc.); a small element (copyright, etc.); and a nav element
- Ex. code
<footer>
<nav> … </nav>
<small>Copyright © Example Corp.</small>
<address>www.example.com</address>
</footer>
<main>
</main>
- Page content container located between the header and the footer
- Ex. code
<body>
<header>
</header>
<main>
<p>(Page content goes here.)</p>
</main>
<footer>
</footer>
</body>
<small></small>
- Formats text (fine print items) within the body of the document, but is only meant to contain short comments that supplement surrounding content
- Regarded as a side comment to surrounding text such as copyright information
- *Does not denote content of lesser importance
<address>
</address>
- Container for Author’s name, author’s contact info, etc.
- Often located in the footer element
<article>
</article>
- Contains a stand-alone composition
- Might typically begin with its own heading followed by one or more paragraphs
VPN
- A virtual private network gives online privacy & anonymity by creating a private network from a public internet connection.
- extends a private network across a public network
- enables users to send and receive data across shared or public networks as if their computing devices were directly connected to the private network.
<aside>
</aside>
- Typically a sidebar or footnote, it should contain stand alone info (*May contain a footer element, but not a nav hyperlink).
- Can be nested in an article element incorporating contents SOMEWHAT RELATED to the main content, or used alone containing secondary content RELATED to the entire page, such as advertising.
- Ex code
<article>
<p>Oscar Wilde</p>
<aside>(1854-1900)<br></br>
Was an Irish writer and poet.
</aside>
</article>
<section>
</section>
- A grouping Element
- Not required in short docs unless you want to add section headings and footers
- Content placed within a body element and nested within a main element can also then be nested in a section element
<hr></hr>
- Empty element
- A horizontal rule tag can be inserted between paragraphs drawing a line separating them, but it may not be inserted inside of paragraph to separate sentences
- It represents a “paragraph-level thematic break“ such as a scene change in a story
- It represents the equivalent of an ellipsis standing alone on its own line
Flow
- the arrangement of page elements as defined by positioning statements and the order of html statements
- how the different elements take up space and arrange themselves around each other.
Phrasing
- The use of HTML phrase tags are special purpose tags, which define the structural meaning of a block of text or semantics of text.
- Must always be enclosed by a flow element
- Ex. <q> , <em></em></q>
<b></b>
- Changes font to bold
- should <b>only be used as a last resort: One legitimate use is to mark up the lead sentence of an article</b>
- No emphasis added or changed
<q></q>
- The quotes element causes the browser to automatically add quotation marks around the content
- phrasing element
- Quote elements can be nested one within another
<em></em>
- The emphasis element creates italics in the font and bears an emphasized semantic meaning in the content
- Used as an inline element for stylistic and semantic purposes with the font and content
<blockquote>
</blockquote>
- Intended to surround long quotations from another source and bears no quotation marks
- Typically produces a rectangular block area to contain the quotation starting on a new line and indented from surrounding content
<strong></strong>
- Changes Font to bold
- Emphasizes or increases Without changing the meaning of the sentence
<i></i>
- Changes font to italics (should only be used as a last resort)
- Text is enhanced without conveying extra importance such as technical terms
<s>
</s>
- The strikethrough is a phrasing element marking the text as being superseded by more accurate, relevant, up-to-date content
- Typically displayed with a strikethrough line
**Should not be used to indicate edited content
<del></del>
- The deleted-text element formats text with a strikethrough, and may include a cite attribute to specify a doc’s URL that will explain the changes
- Text within is regarded as having been removed from the document such as a completed item in a to-do list
<ins></ins>
- The inserted-text element formats text with an underline: may include a cite attribute to specify a docs URL explaining changes.
- Text within is regarded as having been added to the document such as a new additional items in a to-do list
<wbr></wbr>
- The word-break-opportunity is a phrasing element INVISIBLY marking the text broken by this tag as being a suitable point at which to break the line of text
- Particularly suitable for small devices for docs that may contain content that may exceed the width of browser
<u></u>
- The unarticulated annotation (underline) is a phrasing element marking the text as being different in some way to normal text content and is TYPICALLY underlined.
- Has the purpose of labeling misspelled words or labeling proper names in Chinese.
**Use is strongly discouraged due to confusion with hyperlinks.
<pre>
</pre>
- Flow/Block element that preserves the preformatting of the enclosed text:
1.) preserves white space;
2) renders all text with a fixed-width font;
3) disables automatic word-wrapping;
4) does not disable bi-directional processing - *Use spaces in the place of tabs when preparing pre-formatted text
<mark></mark>
- The marked-text is a phrasing element indicating the text as being of special significance for reference or notation.
- Typically displayed in a colored background block to highlight the text
- Not for emphasis: only to be used to highlight the relevance or importance of the text within a doc
- The subscript element specifies inline text typically with a lowered baseline using smaller font displayed for solely typographical reasons.
- Numbers (0-9) = -
- *Any content can be included within the tags, whereas, the availability of character entity references is limited.
<!--₀-->
html coding :
- subscript “0”
<!--₁-->
- subscript “1”
<!--₂-->
- subscript “2”
<!--₃-->
- subscript “3”
<!--₄-->
- subscript “4”
<!--₅-->
- subscript “5”
<!--₆-->
- subscript “6”
<!--₇-->
- subscript “7”
<!--₈-->
- subscript “8”
<!--₉-->
- subscript “9”
; ⊃
- The superscript (element and entity) specifies inline text typically with a raised baseline using smaller font and displayed for solely typographical reasons.
- Numbers = 1= ¹ 2= ² 3= ³ 4= 5= 6= 7= 8= 9= 0=
- *Any content can be included within the tags, whereas, the availability of character entity references is limited.
- 2 appears larger than “ ²” ; however, the entity as opposed to the tag keeps line spacings equal
<!--¹-->
- superscript “1”
<!--²-->
- superscript “2”
<!--³-->
- superscript “3”
<!--⁴-->
- superscript “4”
<!--⁵-->
- superscript “5”
<!--⁶-->
- superscript “6”
<!--⁷-->
- superscript “7”
<!--⁸-->
- superscript “8”