reading-notes

https://mrobeidat.github.io/reading-notes/


HTML TEXT

  • What do we mean by headings ?

A HTML heading or HTML H tag can be defined as a title or a subtitle which you want to display on the webpage. h1 is the largest heading tag and h6 is the smallest one. So H1 is used for most important heading and h6 is used for least important

  • Paragraphs

  • Bold and Italic fonts

We use (b) tag for turning the font into bold, as well we use (i) tag to turn it into italic.

  • superscript & subscript

A subscript or superscript is a character (such as a number or letter) that is set slightly below or above the normal line of type, respectively. It is usually smaller than the rest of the text. Subscripts appear at or below the baseline, while superscripts are above.

  • line breaks and horizantal rules

(br/) if you wanted to add a line break inside the middle of a paragraph you can use the line break tag (br /). you can also add a horizontal rule between sections using the (hr /) tag.

  • Semantic Markup

Semantic markup is a way of writing and structuring your HTML (Hypertext Markup Language) so that it reinforces the semantics, or meaning, of the content rather than its appearance. … When you write a paragraph, mark it with a paragraph tag (p).

  • Strong & Emphasis

(Strong) the words contained in this element might be said with strong emphasis and the browser will show the content of it in bold. while the (em) element indicates emphasis that subtly changes the meaning of a sentence and the browser will show the content of it in italic.

  • Abbreviations & Acronyms

(abbr) If you use an abbreviation or an acronym, then the abbr element can be used. A titleattribute on the opening tag is used to specify the full term.

  • Author or details

Address element has quite a specific use: to contain contact details for the author of the page.

What is CSS ?

Cascading Style Sheets, commonly known as CSS, is an integral part of the modern web development process. It is a highly effective HTML tool that provides easy control over layout and presentation of website pages by separating content from design.

Merging CSS & HTML with rules

CSS works by associating rules with HTML elements. These rules govern how the content of specified elements should be displayed. A CSS rule contains two parts: a selector and a declaration.

The CSS job here is to affect the style of the website and how it should be look like.

So if we want to make a change on a specific element for HTML using CSS, all we have to do is type the tag of the element inside the CSS then we should put the tags of CSS wich will change the color or style of HTML element inside these curly brackets { }.

How to use CSS outside the HTML code (external)?

How to use CSS inside the HTML code (internal)?

An internal CSS is used to define a style for a single HTML page. An internal CSS is defined in the (head) section of an HTML page, within a (style) element as shown below :

CSS Selectors

There are several different types of selectors in CSS:

  • CSS Element Selector.
  • CSS Id Selector.
  • CSS Class Selector.
  • CSS Universal Selector.
  • CSS Group Selector.

Why using external style sheet better than internal one ?

* Since the CSS code is in a separate document, your HTML files will have a cleaner structure and are smaller in size.
* You can use the same . css file for multiple pages.

First what is Java Script ?

JavaScript (often shortened to JS) is a lightweight, interpreted, object-oriented language with first-class functions, and is best known as the scripting language for Web pages, but it’s used in many non-browser environments as well. … JavaScript can function as both a procedural and an object oriented language.

  • Comments

Multi-line comments start with /* and end with / Any text between /* and */ will be ignored by **JavaScript.

  • What is a Variable ?

Variable means anything that can vary. JavaScript includes variables which hold the data value and it can be changed anytime. JavaScript uses reserved keyword var to declare a variable. A variable must have a unique name, and this is how to declare them and give them a value or a string :

  • Rules of naming variables

1. Name your variables based on the terms of the subject area, so that the variable name clearly describes its purpose.

2. Create variable names by deleting spaces that separate the words. …

3. Do not begin variable names with an underscore.

4. Do not use variable names that consist of a single character.

  • Array

An array is a special type of variable. It doesn’t just store one value; it stores a list of values and you can use several types of operators and expressions in Arrays.

  • Loops

Loops are used in JavaScript to perform repeated tasks based on a condition. Conditions typically return true or false when analysed. A loop will continue running until the defined condition returns false . You can type js for , js while or js do while to get more info on any of these.