Aloysious' Codefellows Reading Notes
<== Previous Lesson Next Lesson ==>
<== Home 🏠
https://chris.beams.io/posts/git-commit/
The seven rules of a great Git commit message
Structural Markup the elements you can use to describe both the headings and paragraphs.
Semantic Markup provides different informtion; such as where the mphasis is placed in a sentence, that something you have written is a quotation (and who said it), the meaning of acronyms, and so on.
HTML elements (semantic information) are used to describe the structures of the page. (e.g. headings, subheadings, paragraphs).
They also provide semantic information (e.g. where emphasis should be placed, the definition of any acronynms used, when given text is a quotation).
<h1>
-<h6>
: <h1>
main <h2>
subheading <h3>
-<h6>
sections beyond subheading<strong>
element has strong importance, will be in bold<em>
emphasis has subtly changed, will be in italics<blockquote>
pg. 52 : element is used for longer qoutes that take up an entie paragraph. (no lazy inenting, use CSS for page indents)<q>
shorter quotes that sit between the paragraph<abbr>
If you use an abbreviation or an acronym, the the <abbr>
element can be used. A Title Attribute on the opening tag is used to fully specify the full term<cite>
when referencing<dfn>
is used to indicate the defining instance of a new term. The first time you explain tome new terminology (perhaps an acedemic concept or some jargon) in a document, it is known as the defining instance of it<address>
SPECIFIC PURPOSE: Contains contact details for the author of a page.<ins>
underline content has been inserted into a document<del>
line through element can show that text has been deleted from it<s>
: <p><s>
Price was 999.99</s></p>
Indicates something is no longer accurate or relavant (but that it should not be deleted). Creates a strike through content, old HTML placed an underline<hCard>
``<a
class=”h-card”
href=”http://waterpigs.co.uk”>
<img
src=”/photo.png” alt=”” /> Barnaby Walters</a>`A CSS rule-set consists of a selector and a declaration block:
The selector points to the HTML element you want to style.
The declaration block contains one or more declarations separated by semicolons.
Each declaration includes a CSS property name and a value, separated by a colon.
Multiple CSS declarations are separated with semicolons, and declaration blocks are surrounded by curly braces.
There are three ways of inserting a style sheet:
All the styles in a page will “cascade” into a new “virtual” style sheet by the following rules, where number one has the highest priority:
So, an inline style has the highest priority, and will override external and internal styles and browser defaults.
The id selector uses the id attribute of an HTML element to select a specific element.
The id of an element is unique within a page, so the id selector is used to select one unique element!
To select an element with a specific id, write a hash (#) character, followed by the id of the element.
The CSS rule below will be applied to the HTML element with
id="para1"
: (view in raw mode to view propper formatting)
#para1 { text-align: center; color: red; }
The class selector selects HTML elements with a specific class attribute.
To select elements with a specific class, write a period (.) character, followed by the class name.
In this example all HTML elements with class="center"
will be red
and center-aligned:
*
.center { text-align: center; color: red; }
You can also specify that only specific HTML elements should be affected by a class.
In this example only <p>
elements with class=”center” will be center-aligned:
p.center { text-align: center; color: red; }
The universal selector (*) selects all HTML elements on the page.
*
{
text-align: center;
color: blue;
}
UNIVERSAL BORDERS
*
{
border: solid: black; 1px
}
The grouping selector selects all the HTML elements with the same style definitions.
h1, h2, p { text-align: center; color: red; }
<HEAD>
.<B>
, shout your piece, and then go back to regular text with </B>
.<HEAD><TITLE>
Your text</HEAD></TITLE>
The correct order is:
**<HEAD><TITLE>
Your text</TITLE></HEAD>**
<P>
(paragraph) tag’s ALIGN attribute, for instance, lets you change the default (left) paragraph alignment. For example, <P
ALIGN=CENTER>
centers the next paragraph on the page.JavaScript variables are containers for storing data values.
In this example, x, y, and z, are variables, declared with the var keyword:
Example
var x = 5;
var y = 6;
var z = x + y;
From the example above, you can expect:
x stores the value 5
y stores the value 6
z stores the value 11
A variable in Java must be a specified data type.
Data types are divided into two groups:
A primitive data type specifies the size and type of variable values, and it has no additional methods.
Non-primitive data types are called reference types because they refer to objects.
The main difference between primitive and non-primitive data types are:
Storing data in variables - Khanacademy
Storing strings in variables - Khanacademy
Let’s say you’re trying to use quotation marks inside a string. You’ll need to
use opposite quotation marks inside and outside. That means strings containing
single quotes need to use double quotes and strings containing double quotes need
to use single quotes.
EXAMPLE
“It’s six o’clock.”;
‘Remember to say “please” and “thank you.”’;
Alternatively, you can use a backslash \ to escape the quotation marks. This lets
JavaScript know in advance that you want to use a special character.
Here’s what that looks like reusing the examples above:
EXAMPLE
‘It's six o'clock.’;
“Remember to say "please" and "thank you."”;
JavaScript Boolean
Boolean is a primitive data type in JavaScript. Boolean can have only two values,
true or false. It is useful in controlling program flow using conditional
statements like if..else, switch, while, do..while.
Boolean object
JavaScript includes Boolean object to represent true or false. It can be
initialized using new keyword.
Example: Boolean object
Boolean Methods
Primitive or Boolean object includes following methods.
toLocaleString() Returns string of boolean value in local browser environment.
Example: var result = (1 > 2); result.toLocaleString(); // returns “false”
toString() Returns a string of Boolean.
Example: var result = (1 > 2); result.toString(); // returns “false”
valueOf() Returns the value of the Boolean object.
Example: var result = (1 > 2); result.valueOf(); // returns false
Javascript tutorial all things Decisions & Loops
From the Duckett HTML book:
From the Duckett JS book:
<== Previous Lesson Next Lesson ==>
<== Home 🏠