Text is any character or words put together. There are many tags to use when placing text in HTML.
The heading tags displays the text wrapped in it in different sizes and hierarchy of importance, starting from the h1 tag where the text is at largest and most important, and ending with h6 tags where the text is smallest and of least importance.
The <p> tag allows us to write paragraphs in the HTML document. Each <p> tag created will appear on a new line.
The <br> tag is used to force the html to start on a new line. The <hr> tag is used to create a horizontal line on the webpage.
The <strong> tag allows us to create a bold style on the word or sentence that is wrapped with <strong></strong>. For example, This text is BOLD.
The <em> tag allows us to create an emphasis on a certain word or sentence, where it will be italicized.
For example, this sentence is emphasized.
CSS refers to Cascading Style Sheet, which allows us to style the webpage. We can add borders, change the color of the text and much more. The CSS indicates that you must write the selector first, then opening and closing curly braces {}, inside the curly braces you will write the declaration. For example,
p{ color: red; }
This will change the text color of the paragraphs to red.
-
External CSS - The
<link rel="stylesheet" href="path to CSS file"></link>tag can be used to link the HTML document to an external CSS file, where each selector is combined with a declaration inside curly braces to style that element. -
Inline CSS - in each of the opeining tags we write
style="color:red;"to specify that this tag will use red as its text color. -
Internal CSS - we place
<style>css selectors and declarations</style>in the<head>tag at the begining of the HTML document.
JavaScript is a programming language used to add interactivity to your website and make it more dynamic. It can take inputs and display outputs and can be triggered with events such a mouse click or a scroll.
A script is a series of instructions that a computer can follow to achieve a certain goal. It can be compared to a recipe that is followed to make a certain dish.
// is used to make a single-line comment.
/* */ is used to make multiple-line comment.
A variable stores a piece of information for later use.
You can declare a variable by using:
- let "variable name"
- const "variable name"
- var "variable name"
But it is not recommended to use the 'var' keyword.
Variables can take numeric data type, such as 1 or 0.75, A string data type such as 'Hi, Osama', and a boolean type such as true or false.
The variable can begin with a dollar sign ($) or an underscore (_), but can't start with a number.
Variables are case-sensitive, where score is different than Score.
If a variable is made from multiple words, we use way called camel case, where eachWordBeigns with a capital letter except for the first word.
Decision can be illustrated in flow charts, where multiple operations can take place, if either the statement is true, one operation can take place, otherwise the statement is false and will run a different operation.
Loops can act as a verification process for certain values. The for loop can display a list of items, and the while loop can be used to verify a password entered correctly.