Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Introduction to Front end development

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on. →

Introduction to Front end development

Avatar for Timi Omoyeni

Timi Omoyeni

April 17, 2018

Other Decks in Technology

Transcript

  1. OUTLINE HTML  Intro to HTML :-  What it

    is.  Page Structure  Must have tags.  Basic tags :-  HTML Headings  HTML Paragraph  HTML Links  HTML Image  HTML Buttons  HTML Lists  HTML Div
  2.  HTML Elements :-  What are they?  Examples.

     HTML Attributes :-  What are they?  Examples  Important Attributes Href Src Alt Style Lang Id Class
  3. HTML Text Formatting:- What are they? Examples  <strong> <em>

    <i> HTML Comments:- What are they? When to use them? How to use them
  4. HTML Colors:- How to use them Ways of referencing colors;

    The rgb()/rgba() way. The Hexcode way. The HSL()/HSLA() way HTML CSS:- What is CSS? What is HTML CSS? How to use it Inline External Internal
  5. HTML Links:- Local links Styling links Importance of „https://‟ Target

    attribute External paths HTML Images:- Syntax Importance of the „alt‟ attribute How to navigate to Images
  6. HTML Table:- What it is How to use it When

    to use it HTML Table tags and their uses <table> <thead> <td> <tr> <tfoot> HTML Lists:- Types, how and when to use them
  7. HTML Block and Inline Elements:- What are Block elements? Examples

    What are inline elements Examples Difference between Inline and Block elements HTML Class attribute:- What is it? How to use it When to use it Example Using it in JavaScript
  8. HTML ID attribute:- What it is When to use it

    How to use it Bookmark Example Difference between Class and ID Using it in JavaScript HTML Iframes What it is How to use it Examples
  9. HTML JavaScript:- What is JavaScript How to use it Example

    <noscript> HTML File Paths:- What are File Paths? Use cases Types Examples
  10. HTML Head:- What is it? Where to use it? Head

    as an element Important tags inside the head element and their meaning/use. Example HTML Layout Elements:- What it is Layout techniques.
  11.  HTML Responsive Design:-  What it is  How

    to build Responsive websites  What are Media Queries?  Using Frameworks for Responsive Design  HTML Forms:-  What are HTML forms?  The input element  How to use HTML Forms  HTML Canvas:-  What it is  How to use it  When to use it  Example
  12.  HTML Svg:-  What it is  When to

    use it  How to use it  Differences between svg and canvas  HTML Media:-  What it is  The video element  The audio element  Example  HTML Youtube:-  What it is  How to set it up  Example
  13. CSS  Intro to CSS  CSS syntax  CSS

    backgrounds  CSS borders  CSS margins  CSS Padding  CSS Height/Width  CSS Box model  CSS Outline  CSS Text  CSS Fonts  CSS icons  CSS links
  14.  CSS lists  CSS tables  CSS display 

    CSS max-width  CSS position  CSS overflow  CSS Float  CSS inline-block  CSS Align  CSS Combinator  CSS Pseudo-Class  CSS Pseudo-Element  CSS opacity  CSS navigation bar  CSS dropdown  CSS Image Gallery  CSS Image sprites  CSS attr selectors
  15. CSS forms CSS counters CSS website layout CSS units CSS

    rounded corners CSS Border images CSS Backgrounds CSS colors CSS Gradient CSS shadows CSS Text Effects CSS web fonts CSS 2D transform CSS 3D transform CSS transition
  16. CSS Animations CSS tooltip CSS Style images CSS Object fit

    CSS Buttons CSS Pagination CSS multiple columns CSS User interface CSS Variable CSS Box Sizing CSS Flexbox * CSS Media Queries * CSS Responsive *  CSS Grid *
  17. INTRO TO HTML What is HTML? HTML can be said

    to be the backbone for Front end Web development. It is the skeleton/structure of web pages . It also consists of group of tags that make up HTML elements on a page. A tag is used to label content in HTML. Example of a tag is „<h1>‟. The abbreviation „HTML‟ means Hyper Text Markup Language. An html file ends with „.html‟ or „.htm‟. An HTML code looks like this;
  18. Must have tags in an html document <!DOCTYPE HTML> <html

    lang=en> <head> <meta charset=‘UTF-8’> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title></title> <meta name="description" content="" /> <meta name="keyword" content="" /> <meta property='og:title' content="" /> <meta property="og:type" content="website" /> <meta property='og:locale' content="en_US" /> <meta property="og:url" content="" /> <meta property="og:image" content="" /> </head> <body> <!--- content goes here --> </body>
  19. BASIC TAGS • HTML Headings:- They are tags used to

    show that an element is an heading. Examples of and HTML Heading tag are <h1>,<h2>,<h3>,<h4>,<h5> and <h6>. The size of each Heading tag reduces from h1 to h6 and each one is used to show importance of an heading. For instance when you have an heading that has a sub-heading under it, the idle way is to use hx for the heading and use h(x+2) where x is any number between 1 and 5 (x+2) is not greater than 6 so as to show importance. ALL HEADING TAGS MUST BE CLOSED; i.e <h1></h1>,<h2></h2>,<h3></h3> etc. EXAMPLE
  20. • HTML Paragraph:- An HTML Paragraph is a tag used

    when composing a text or a paragraph that isn‟t an heading. The HTML Paragraph tag is represented with „<p></p>‟. It is one of the most used tags in HTML, is simple to use and easy to remember. It is important to close a paragraph tag once we‟re done writing the paragraph. Example.
  21. • HTML Link:- It is used to add reference to

    a website, a document, an image, a video , a PDF file etc. It is represented by “<a href=„link goes here‟></a>”. The „href‟ attribute takes in the link to anything that serves as a link. Example.
  22. • HTML Image:- They are used to show that an

    image is being used in an Html document. An Image tag looks like „<img src=„link to image‟ alt=„description of image‟>‟ and it doesn‟t have a closing tag. The „src‟ attribute works like the „href‟ attribute but they‟re different. Example.
  23. • HTML Button:- An Html button is a clickable element

    that leads to a new page, submits a form, navigates to a part of the website, or activates an animation (on click). It‟s tag looks like „<button>anything can go here</button>‟. It can also take in a „type‟ attribute when it‟s being used in/on a form. Example.
  24. • HTML List:- A list is used for many things

    in HTML, it can be used to create a group of elements that are placed side by side or to create a native list. It is represented by either „<ul><li></li></ul>‟(unordered list) or „<ol><li></li></ol>‟ (ordered list). Example
  25. • HTML Div It is one of the most used

    tags in html. It is represented as „<div>anything goes here</div>‟. A div element can be made of more than ten tags or no tags at all. It can serve as the body of an HTML page filled with several paragraphs, or a container for an image. Example.
  26. HTML ELEMENTS • What are they? – When a tag

    has other tags within them, such tag is called an element. Examples
  27. HTML ATTRIBUTES • Attributes provide additional information about an element.

    They are always located in the start tag. The syntax for every attribute is „name=“value”‟. The href attribute is used to link a file or a website to an html file. The src attribute is used to attach a file to an html page. The alt attribute is used to describe an image and acts as a fallback for broken images. The style attribute is used for styling a tag or element directly. The lang attribute is used to specify which language a site is written in. The class attribute is used to reference the css class being used on a tag/element. The id attributes serves the same function as a class but is used to reference a css id property.
  28. HTML TEXT FORMATTING • These are tags used (like the

    name implies) to format a text. It can be a whole paragraph or just a word in a paragraph. You can decide to make your text look bold and use the <b></b> or <strong></strong> tag, to make it in italics and use the <i></i> tag or to show that a particular word is important and use the <em></em> tag. There are a lot more ways/tags to format text but the above four are the most used. Example
  29. HTML COMMENT Q: What do have when you don‟t need

    to explain how your HTML page looks? *No comment* haha. • HTML comment are used to explain a part of a code or to mark out a code so it isn‟t rendered by the browser. It is useful when the structure of a page isn‟t self explanatory or when more than one person is working on a single html file. • An HTML comment is written like this „<!---- HTML comment is written like this -->‟ and can be as long as possible. Example
  30. HTML COLORS • HTML colors are used to style a

    page either adding it in the style attribute of a tag/element, in the style tag at the top of an html page or by writing it in a css file linked in the head tag of said page. There are three ways of referencing HTML colors; 1. The rgb or rgba way. 2. The hex code way 3. The hsl or hsla way.
  31. • The rgb or rgba way – Rgb is a

    combination of three primary colors; Red, Green and Blue. The value of each color can be any number from 0 – 255 and is separated by a comma. Example is rgb(0,0,0) which is the same as white. The „a‟ in rgba means alpha, which is also the same as opacity i.e how transparent you want the color to be and it can be any number from 0 to 1. An Example is rgba(0,0,0,0.1).
  32. • The Hexcode way – This is a way of

    referencing to colors using hexadecimal code preceded by a „#‟ sign. It is made up of either six characters or three characters and can either be numbers or alphabets. Example of an hex code is „#fff‟ which is the same as „#ffffff‟ and white.
  33. • The hsl/hsla way It stands for hue, saturation and

    lightness. Hue can be any value from 0 to 360 degree. Each value represents a color on the color wheel. Saturation is any value from 0% to 100%. Lightness is any valiue from 0% to 100%. example is hsl(0, 50%, 50%). The a is also the same as above, it means opacity and can be any value from 0 to 1.
  34. HTML CSS • CSS is what is responsible for how

    a page looks like. It Is used to design an HTML page. • The phrase CSS means Cascading style Sheet. HTML CSS is designing an HTML page directly on an HTML page either by using the style attribute(inline), the style tag at the top of the html body(internal) or by referencing it from a separate CSS file using it‟s file path or link (external) which is the recommended way. Example
  35. HTML LINKS Links are referenced using the <a href=„‟ target=„‟>

    tag. It can be a link to another HTML file in a folder on your machine or a link to another website on the web. The href attribute takes in a string that must always start with „https://‟ or „http://‟ if it‟s referencing to an external link while the target attribute tell the browser whether to open the link in a new tab/window(„_blank‟) or in the same tab/window(„_top‟) etc. Example
  36. HTML IMAGES Using an image in HTML is as simple

    as using the image tag like this “<img src=„link to image‟ alt=„description of image‟>”. It is doesn‟t require a closing tag and is easy to use. The alt attribute is very important whenever we use the img tag because it serves as a fallback for when and if your image doesn‟t load and it also allows screen readers to describe how an image looks to visually impaired users. The src takes in a link that is either an actual link or a file path to an image. Example
  37. HTML TABLE HTML Table is used for presented a group

    of data that are grouped into rows. Html table uses the <table></table> element that takes in a <tr></tr> tag that is used in defining a row, a <th></th> that is used in defining the header of each row of the table and a <td></td> tag used in defining the value in each row. Example
  38. HTML LISTS The HTML list tag/element is used for making

    a list in HTML. There are three types of list 1. Ordered list. • Unordered list. • Description list. Ordered list is used, like the name implies when making an ordered list. It takes in a type attribute that specifies the type of order you want i.e „A‟ for a, b, c, d etc, „1‟ for 1,2,3,4 etc, „i‟ for i, ii, iii,I v etc. Example of it‟s use case is …. Unordered list is used the arrangement of the list type doesn‟t matter or isn‟t needed at all. It takes in a type attribute that specifies the type of unordered list the list should be i.e bullet, square, disc etc. Example of it‟s use case is …. Description list is used to describing each term in a list. Tags used in description list are „<dl>‟, „<dt>‟, „<dd>‟.
  39. HTML BLOCK AND INLINE ELEMENTS Block elements are elements that

    by default take up the entire width of wherever they‟re placed making it impossible to place any other element beside them on your page unless it is changed with css. Example of a block element is a div or a paragraph tag. Inline elements are elements that by default only take up the width of their content or their „normal width‟. Example of inline element is the html link tag. Example
  40. HTML CLASS ATTRIBUTE The class attribute is used to reference

    a class name from either our style tag at the top of the page or from an external css file. It is used by adding the name of our preferred css class to the class attribute of our desired tag. It can also take in more than one class name. The class name is prefixed with a dot („.‟) followed by whatever name you want to give. It can be any name but must start with an alphabet. Example of a class name is „.body‟ . You can get the class attribute of a certain tag/tags in JavaScript by calling a „getElementByClassname(„className‟)‟. Example .
  41. HTML ID ATTRIBUTE The ID attribute is majorly used for

    working with JavaScript but it can be used to style an element in HTML works like the CSS attribute. It can serve as a link or a bookmark on the same html file or in a different file entirely. It is prefixed by a pound(„#‟) followed by any word. An example of an id is „#top‟. It can be referenced from a JavaScript file by calling a „getElementById(„ idName‟). One of the differences between class and id is that the class is prefixed with a „.‟ while an id is prefixed with a „#‟. A css class can be used by more than one element but the id can only be used by one element.
  42. HTML IFRAMES Iframes are used when you want to put

    another website on your page. It can be your Facebook profile or any website of choice. It is important to note that some websites don‟t support iframes. The iframe has a tag that looks like this „<iframe src=„url‟></iframe>‟
  43. HTML JAVASCRIPT JavaScript can be said to be the life

    of a website. It is used to program how a site should behave when the user interacts with a page. There are two ways of using JavaScript in HTML, 1. Internal. 2. External. When you write your JavaScript code at the top of your html inside a script tag, it is called internal When you write your JavaScript code in a separate file and link the file in the script tag in your head element. When writing a JavaScript code, it is important to let people that their browsers don‟t support JavaScript know that they won‟t get maximum user experience on the site using a „<noscript>Message goes here</noscript>‟ Example.
  44. HTML FILE PATHS File path in HTML is the location

    of a file on your system. It can be tricky to get, but it‟s possible to understand. If a file is in the same folder as the html file you‟re trying to use it in, you just write the name of such file, e.g „codeCamp.html‟. If the file is a folder that is one folder above the location of your current html file, you move a folder up then the name of the file you wish to use like this „./thePictureIWant.png‟. If the file you want to use is two folders above the current folder that your file is, you move two folders up then locate the file like this „../nameOfHtmlFile.htm‟. If the file is located in a separate folder in the root of the file, you acces such file like „/folderName/nameOfFile‟. Example
  45. HTML HEAD The head element is located at the top

    of your html page immediately after the html tag. It contains tags that tell the browser or the internet about your webpage. Example is the <title></title> tag, which is for the title of the page. The meta tags in the head are useful for google searches, SEO ranking and web crawling so it‟s best to include them in the head of your html document. Example
  46. HTML LAYOUT ELEMENTS HTML Layout is how your website looks.

    There are five different ways to give your website a layout; 1. HTML tables (not recommended). 2. CSS float property. 3. CSS Flexbox. 4. CSS Grid. 5. CSS frameworks.
  47. HTML RESPONSIVE DESIGN Responsive design is the process of making

    your website display properly across devices of different sizes. This can be achieved by using media queries or responsive frameworks like bootstrap or w3.css. It also involves the use of the <meta name=„viewport‟ content=„width=device- width, initial-scale=1.0‟> Media Queries? What are those? Those are what? Are what those? Media queries check for the screen size of the device loading a website and serve it the content that fit it best. Note that you must write the design for each screen size using media queries for this to work. In the absence of media queries, we can make use of bootstrap to build responsive websites. Example
  48. HTML FORMS • Forms in html are used to collect

    information from the user. It serves as an element because it takes in other input tags. The form in html is represented with a „<form></form>‟ tag. It takes in an „action‟ attribute that takes in a url, it also takes in a method attribute that specifies what HTTP method would be used on the form. Example of form elements is the <input> element. It is the most important form element. It takes a „type‟ attribute that specifies what the input type would be and a „name‟ attribute that tells the server what the data being sent to the back end is for.. Example of input types are; 1. Text 2. Submit 3. Number 4. Password 5. Submit 6. Email 7. Radio 8. Button 9. Checkbox e.t.c Another example is the textarea element. It is used when the text required might be longer than a line.
  49. CSS

  50. CSS is used in styling HTML. It is short for

    Cascading Style Sheets. CSS files have a „.css‟ extension. Syntax An example of a css styling looks like this; h1 { background-color: red; } H1 can either be a tag, a class name, an id or all of them combined together. Example
  51. CSS COMMENT Comments in CSS are used to explain the

    reason behind a styling choice. A CSS comment starts with a „/*‟ followed by the comment and closed with another „*/‟. CSS BACKGROUND When styling an element to have a certain background color, you make use of the „background-color‟ property. If we choose to style the element to have an image as the background, you make use of the „ background-image‟ property and use other properties such as „background-position‟, ‟background-size‟, „background-repeat‟ and „background-attachment‟ to style the image. Example
  52. CSS BORDERS CSS border is the line marking the end

    of an element‟s size. CSS uses the „border‟ property to style the border of an element as the short form. Each side of the border can also be styled individually e.g „border- bottom‟ • The „border-style‟ takes in the type of border you want your element to have i.e dotted, dashed, solid, double, groove, ridge e.t.c • The „border-width‟ takes in the size of the border e.g „2px‟ • The „border-color‟ takes in the color you want the border to be e.g „blue‟. Example
  53. CSS MARGIN This refers to the space surrounding an element

    outside of it‟s borders. The margin property is „margin‟ for general styling but can take any of the sides for individual styling e.g „margin-left‟ and it takes in a value e.g „20px‟ 0r „10%‟ . Example CSS PADDING This refers to the space between an element‟s content and it‟s borders. The padding property can either be „padding‟ or any of the sides i.e „padding-right‟. Example
  54. CSS HEIGHT & WIDTH This specifies the height and width

    of an element. These properties can take in a value of auto, meaning the element would take up the exact width/height of it‟s content. There is a property in css called „max- width‟ and „max-height‟. Each of these properties take in the maximum width and height an element can take up on a web page. Example
  55. CSS OUTLINE This property works like the border property but

    is drawn around an element and doesn‟t affect the element‟s width unlike borders. The outline property is „outline‟ and it takes in a style, color and width just like width. Example
  56. CSS TEXT This involves styling of every text in an

    element. • „color‟ is used for giving the text a color eg yellow. • „text-align‟ is used to position the text either to the left, the right or to the center. • „text-decoration‟ is used for decorating the text e.g underline • „text-transform‟ is used for changing the state of the text e.g to capital letters using uppercase, or using capitalize to make all the first letters in a word capital letters etc.
  57. • „text-indent‟ is used to index the first word in

    an element. E.g „50px‟. • „letter-spacing‟ is used to give each letter a specific space between each other. E.g 5px. • „line-height‟ is used for choosing the height of each text line in an element e.g 30px. • „direction‟ is used for choosing where the text in an element starts from e.g rtl. • „word-spacing‟ is used for choosing the distance between each word in an element eg 10px. • „text-shadow‟ is used to give each text in an element a shadow effect e.g 3px 2px red;
  58. CSS FONTS The font of an element can be styled

    in css using the „font-family‟. Google provides a range of fonts on their fonts website at https://fonts.google.com. The „font-style‟ property is used to make the font oblique, italic or normal. The „font-size‟ is used in giving the text a size, e.g 32px. The „font-weight‟ is used to make the text look light or thicker e.g normal, bold or 500.
  59. CSS ICONS Icons are image like objects that are usually

    one color. They have a tag in html that is „<i></i>‟ which takes in a class attribute with the name of the icon. Icons and how can be found from websites like • https://cdnjs.cloudfare.com/ajax/libs/font- awesome/4.7.0/css/font-awesome.min.css (font awesome icons). • https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/b ootstrap.min.css (bootstrap). • https://fonts.googleapis.com/icon?family=Material+icon s ( google)
  60. CSS LINKS When styling the state of your link, it

    must be arranged like; 1. a:link – a normal unvisited link 2. a:visited – a visited link 3. a:hover – a link that is being hovered on 4. a:active – a link that the browser is currently on.
  61. CSS LIST CSS list has the following properties used in

    styling lists; • „list-style-type‟ which is responsible for the type of list you want. Example of list types are square, circle, upper-roman etc • „list-style-image‟ is the property responsible for using images in the place of a „list-style- type‟.
  62. CSS DISPLAY This property tells the element whether or not

    it should be displayed. It can take in a value of „none‟, „block‟, „inline‟ or „inline-block‟ . Block elements take up the entire width of the container and don‟t allow any other elements on the same line horizontally as them. Inline elements only take up the width that is specified in css and allow other elements to be on the same horizontal line as them..
  63. CSS ROUNDED CORNERS Rounded corners in CSS are used to

    make the border of an element‟s box rounded/curved. This can be achieved using the „border-radius‟ property. You can choose to style each side of an element using „border-top-right-radius‟ or border-radius: top left, top right, bottom right, bottom left). Example
  64. CSS GRADIENTS Gradients are a combination of two or more

    colors. There are two types of gradients in CSS; 1. Linear Gradient 2. Radial Gradient • Linear gradient is used to make the colors combine diagonally or in what direction you want the colors to appear. You can also use rgba color style to make the colors transparent using the opacity value. E.g background: linear-gradient(direction or angle, color 1, color 2,..color x); • Radial gradient is used to make the colors combine to form a circle and can be used like this; background: radial-gradient( shape, color 1, color 2,….,color n).