Web Pages

  • When you type in a URL / click on a link the browser sends the URL to the DNS using HTTP
  • The DNS finds the matching IP addresses for the URL and sends the IP address to the web browser
  • The web browser sends a request to the web server for web pages
  • The web pages are sent from the web server to the browser
  • The browser renders HTML to display web pages 
  • Any security certificates are exchanged
  • SSL/HTTPS is used to secure the data which will encrypt any data that is sent

Structure & Presentation

Websites can be separated into structure and presentation.

HTML is:

  • A language used to create the structure/layout of a website
  • Written in plain text
  • Used in the content layer
  • Made up of a set of markup codes
  • Used to tell the browser how to display the page 

E.g.

  • Where text is placed
  • Margins of page
  • Line break
  • Padding

CSS is:

  • A language used to create the presentation / formatting of the page
  • Written in plain text
  • Used in the presentation layer
  • Used by web pages to produce a consistent format between different web pages

E.g.

  • Font size
  • Font colour
  • Background colour

Why are they kept separately?

  • The presentation of the page can be changed without needing to alter the structure so regular updates can be made without needing to check the structure
  • The formatting document (written in CSS) can be used again for a different website
  • If further content and web pages are added to the website, the necessary formatting can be easily applied so this can save time when developing a website
  • CSS to standardise formatting so CSS only needs to be created once and be applied to each webpage
  • One person can develop the structure and one can develop the presentation so this can save time when developing and updating a website

Loading

error: Content is protected !!