Web Development Basics Quiz
45 Questions
0 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What is the smallest space on a grid called?

  • Grid Gap
  • Grid Cell (correct)
  • Grid Track
  • Grid Line

Which property is used to create gaps between grid tracks?

  • gap
  • grid-width
  • grid-gap (correct)
  • track-space

What does the 'fr' unit represent in a grid layout?

  • Full row
  • Fraction of available space (correct)
  • Flexible range
  • Fixed ratio of width

Which function is used to repeat grid elements in CSS?

<p>repeat() (B)</p> Signup and view all the answers

What is the main purpose of ECMAScript in relation to JavaScript?

<p>To serve as a standard for JavaScript (A)</p> Signup and view all the answers

What is the primary function of the Domain Name System (DNS)?

<p>It translates domain names into IP addresses. (D)</p> Signup and view all the answers

Which HTTP request method is commonly used to update a resource?

<p>PUT (C)</p> Signup and view all the answers

What are web browsers primarily used for?

<p>To locate, retrieve, and display content on the web. (D)</p> Signup and view all the answers

Who is credited with the creation of the World Wide Web?

<p>Tim Berners-Lee (C)</p> Signup and view all the answers

What does a web server do?

<p>Delivers web pages to clients on the internet. (A)</p> Signup and view all the answers

Which port is typically used by web browsers for HTTP connections?

<p>80 (A)</p> Signup and view all the answers

What was a significant consequence of the Dot-Com Bubble?

<p>The widespread failure of many internet companies. (B)</p> Signup and view all the answers

Which of the following is NOT an example of web browser software?

<p>Apache (A)</p> Signup and view all the answers

How does absolute positioning differ from relative positioning in CSS?

<p>Absolute positioning does not appear in the normal flow of the document. (D)</p> Signup and view all the answers

What is the main function of Flexbox in CSS?

<p>To simplify the creation of complex, flexible layouts. (B)</p> Signup and view all the answers

Which property is used to define the direction of flex items in a Flex container?

<p>flex-direction (A)</p> Signup and view all the answers

What does the 'justify-content' property control in a Flex container?

<p>The space distribution between items along the main axis. (B)</p> Signup and view all the answers

How does the 'align-self' property in Flexbox differ from 'align-items'?

<p>align-items applies to all flex items, while align-self applies to individual items. (B)</p> Signup and view all the answers

What is one of the main advantages of using Grid over traditional CSS layout methods?

<p>It allows for responsive web design and adapts layouts using media queries. (A)</p> Signup and view all the answers

What does the 'gap' property in Flexbox and Grid layout control?

<p>The shared space between flex or grid items. (A)</p> Signup and view all the answers

Which of the following values can be assigned to the 'flex-direction' property?

<p>column-reverse (A)</p> Signup and view all the answers

Which statement accurately describes PHP?

<p>PHP executes on the server side and returns HTML to the browser. (C)</p> Signup and view all the answers

What file extension is commonly used for PHP files?

<p>.php (A)</p> Signup and view all the answers

Which of the following is a requirement to run PHP code?

<p>A web server, such as Nginx or Apache. (A)</p> Signup and view all the answers

How does PHP handle requests from a browser for PHP files?

<p>It executes the PHP code on the server and returns HTML output. (D)</p> Signup and view all the answers

What is the primary purpose of the Internet Protocol (IP)?

<p>To specify the format of packets and the addressing scheme (C)</p> Signup and view all the answers

What is a characteristic feature of server-side scripting languages like PHP?

<p>It is responsible for generating dynamic web pages. (D)</p> Signup and view all the answers

Which layer of the OSI model is responsible for data delivery reliability?

<p>Transport Layer (D)</p> Signup and view all the answers

Which data type in PHP is correctly paired with its example?

<p>Boolean: 0 (A)</p> Signup and view all the answers

What mechanism does Transmission Control Protocol (TCP) use to allow multiple data types to be sent simultaneously?

<p>Multiplexing (A)</p> Signup and view all the answers

Which of the following statements about PHP tags is true?

<p>You can omit the closing tag if the file contains only PHP code. (A)</p> Signup and view all the answers

Which of the following statements about the Internet is inaccurate?

<p>The Internet is primarily under centralized control. (D)</p> Signup and view all the answers

What is the role of the Presentation Layer in the OSI model?

<p>To ensure data is presented in a format usable by applications (B)</p> Signup and view all the answers

Which of these is NOT a server-side technology associated with web development?

<p>JavaScript (B)</p> Signup and view all the answers

What is the function of a local IP address in networking?

<p>To identify the device on the network using unique addressing (D)</p> Signup and view all the answers

Which OSI model layer handles the actual moving of data across a physical link?

<p>Data Link Layer (D)</p> Signup and view all the answers

What does the lack of centralized control in the Internet facilitate?

<p>Greater innovation in device creation (C)</p> Signup and view all the answers

What is the purpose of the preventDefault() method in JavaScript?

<p>To cancel the default action of an event. (B)</p> Signup and view all the answers

Which of the following methods is NOT a way to attach an event in JavaScript?

<p>Adding a CSS class. (A)</p> Signup and view all the answers

What will the following code output if the button is clicked? const btn = document.querySelector('button'); btn.addEventListener('click', function(event) { event.preventDefault(); console.log('Nope.'); });

<p>'Nope.' (B)</p> Signup and view all the answers

What does the spread operator (...) do in JavaScript?

<p>It expands elements in places where multiple values are needed. (A)</p> Signup and view all the answers

How is the rest operator used in JavaScript?

<p>To grab additional arguments passed to a function. (C)</p> Signup and view all the answers

In the class definition below, what will rect.calcArea() return? class Rectangle { constructor(height, width) { this.height = height; this.width = width; } calcArea() { return this.height * this.width; } } let rect = new Rectangle(20, 40);

<p>800 (A)</p> Signup and view all the answers

How can mouse events provide additional information?

<p>By accessing mouse position properties. (B)</p> Signup and view all the answers

Which statement regarding event listeners is correct?

<p>They are used to execute code when an event occurs. (C)</p> Signup and view all the answers

Flashcards

Port Number

A unique number assigned to a program or service running on a device, allowing multiple services to use the same IP address without interfering with each other.

Web Server

A computer that delivers web pages to users when they request them through their browsers.

Web Browser

Software used to access, retrieve, and display web content from the World Wide Web.

Domain Name System (DNS)

An internet service that translates human-readable domain names into numerical IP addresses.

Signup and view all the flashcards

Uniform Resource Locator (URL)

A global address used to locate and access specific documents and resources on the World Wide Web.

Signup and view all the flashcards

HTTP GET Request

A common HTTP request method used to retrieve or read data from a web resource.

Signup and view all the flashcards

HTTP POST Request

An HTTP request method used to create new resources or submit data to a web server.

Signup and view all the flashcards

HTTP PUT Request

An HTTP request method used to update or replace an existing resource on a web server.

Signup and view all the flashcards

What is the Internet?

A vast network of computers connected using the Internet Protocol (IP).

Signup and view all the flashcards

What is the Internet Protocol (IP)?

A set of rules that define how data is sent between computers on the Internet.

Signup and view all the flashcards

What are key aspects of the Internet?

It's decentralized, open to anyone, and allows computers to join and leave dynamically.

Signup and view all the flashcards

What are the layers of the OSI model?

A model that describes how data is transmitted from one computer to another through different layers with specific functions.

Signup and view all the flashcards

What is the purpose of the Physical layer?

It deals with the hardware used to send and receive data, such as cables and modems.

Signup and view all the flashcards

What is the purpose of the Data Link layer?

It handles the movement of data across a physical connection within a network.

Signup and view all the flashcards

What is the purpose of the Network layer?

It decides the best path for data to travel from its source to its destination.

Signup and view all the flashcards

What is the purpose of TCP?

It provides reliable data delivery and multiplexing on top of IP.

Signup and view all the flashcards

Grid Lines

Horizontal and vertical lines that create a grid structure.

Signup and view all the flashcards

Grid Tracks

The spaces between two grid lines. Tracks run horizontally or vertically.

Signup and view all the flashcards

Grid Cell

The smallest unit in a grid. It's the intersection of a row track and a column track.

Signup and view all the flashcards

Grid Gap

The space between grid tracks, creating separation between grid items.

Signup and view all the flashcards

Grid-template-columns and grid-template-rows

CSS properties used to define the structure of a grid layout. They determine the number and size of columns and rows.

Signup and view all the flashcards

Relative Positioning

Positions an element relative to its normal position in the document flow. The element is treated as a block-level element.

Signup and view all the flashcards

Absolute Positioning

Positions an element relative to its nearest positioned ancestor. If there is no positioned ancestor, the element's position will be relative to the initial containing block (the document's body). The element is removed from the normal document flow.

Signup and view all the flashcards

Flexbox

A layout method for creating one-dimensional layouts (rows or columns) that are responsive and adaptable to different screen sizes.

Signup and view all the flashcards

Flex Container

The parent element in a Flexbox layout, containing one or more Flex items.

Signup and view all the flashcards

Flex Item

The child element within a Flex Container, which can be arranged and styled using Flexbox properties.

Signup and view all the flashcards

Main Axis (Flexbox)

The primary direction of a Flexbox layout, either horizontal (row) or vertical (column).

Signup and view all the flashcards

Cross Axis (Flexbox)

The secondary direction of a Flexbox layout, perpendicular to the Main Axis.

Signup and view all the flashcards

Grid Layout

A versatile layout method for creating two-dimensional layouts (rows and columns) with precise control over element positioning.

Signup and view all the flashcards

Attaching Events

You can use JavaScript to make something happen when an event occurs, such as a mouse click. There are three ways: inline HTML, DOM property, and event listener.

Signup and view all the flashcards

Prevent Default Action

The 'preventDefault()' method stops the browser from performing its default action for an event. For example, preventing form submission.

Signup and view all the flashcards

JavaScript Classes

Classes in JavaScript function similar to classes in other languages like Java. They define objects with properties and methods. You create instances of classes with the 'new' keyword.

Signup and view all the flashcards

Spread Operator (... )

The spread operator expands an array, string, or object into its individual elements. It's useful for passing multiple arguments to a function.

Signup and view all the flashcards

Rest Operator (... )

The rest operator collects multiple arguments supplied to a function into an array. It's the opposite of the spread operator.

Signup and view all the flashcards

Mouse Events

Mouse events trigger JavaScript functions when a mouse action occurs, such as click, hover, or scroll. They provide information like mouse position.

Signup and view all the flashcards

'this' Keyword in Classes

The 'this' keyword in a class refers to the current instance of the class (the object). It allows you to access properties and methods within the class.

Signup and view all the flashcards

DOM Property

A method for attaching events in JavaScript. You access the element you want to apply the event to by its ID and use the 'onclick' property to assign a function to it.

Signup and view all the flashcards

What is PHP?

PHP (Hypertext Preprocessor) is a server-side scripting language used to create dynamic and interactive web pages. It runs on the server and generates HTML, which is then sent to the user's browser.

Signup and view all the flashcards

How does PHP work?

When a user requests a PHP file, the server executes the PHP code first. This generates HTML content, which is then sent back to the user's browser for display.

Signup and view all the flashcards

What are server-side languages?

Server-side languages run on the web server and generate dynamic content before it is sent to the user's browser. PHP is an example of a server-side language.

Signup and view all the flashcards

What are client-side languages?

Client-side languages run directly in the user's web browser. Examples include HTML, CSS, JavaScript, and frameworks like ReactJS, VueJS, and Angular.

Signup and view all the flashcards

What is the difference between client-side and server-side languages?

Client-side languages run in the user's browser and are responsible for the visual appearance and interactivity of a web page, while server-side languages execute on the server and generate dynamic content before sending it to the browser.

Signup and view all the flashcards

What is a PHP tag?

PHP tags are used to enclose PHP code within a web page. They allow the server to interpret and execute the PHP code.

Signup and view all the flashcards

What are the basic data types in PHP?

PHP supports various data types, including strings, integers, floats (decimal numbers), and booleans (true/false values). These types define the nature of the data a variable can hold.

Signup and view all the flashcards

What is the file extension for PHP files?

PHP files use the .php extension, indicating to the server that they contain PHP code to be executed.

Signup and view all the flashcards

Study Notes

Introduction to the Internet

  • A connection of computers using the Internet Protocol (IP)
  • IP is the method by which data is sent from one computer to another on the internet
  • Key aspects include decentralized control, open standards (anyone can create a new internet device), and everyone can use it with simple software.

Internet Layered Architecture

  • OSI Model Layers: The internet uses layers to organize and process data in a structured way.
    • Physical: Hardware for sending and receiving data (ethernet, modems, coaxial cables)
    • Data Link: Handles data transfer between physical links on a network.
    • Network: Determines the physical path data takes to its destination.
    • Transport: Ensures data delivery reliability and error correction.
    • Session: Manages the setup and termination of connections between communicating endpoints.
    • Presentation: Transforms data into a format that the application layer can use (e.g., encryption).
    • Application: Layer interacted with by web users (e.g., browser, email, ftp).

Internet Protocol (IP)

  • Specifies the format of packets (datagrams) and addressing scheme.
  • Local IP addresses are identified by commands such as ifconfig or ipconfig.

Transmission Control Protocol (TCP)

  • Adds multiplexing and guaranteed message delivery to the IP protocol.
  • Multiplexing allows sending different data types across a single communication channel.
  • TCP uses ports to assign each application a unique port number on a device, enabling multiple services to run simultaneously.
  • Multiple programs can use the same IP address on a given device.

World Wide Web (WWW)

  • Part of the internet that is accessible through websites.
  • Evolution through time from the 1960s-2000s, including the development of notable browsers such as Netscape Navigator and Internet Explorer.
  • Integral part of modern life
  • Web servers are computers serving web pages.
  • Web Browser software is used to locate, retrieve and display content.

Hypertext Transfer Protocol (HTTP)

  • Protocol that defines message formatting and transmission for web requests.
  • HTTP has methods for various tasks such as reading, creating, updating and deleting resources (GET, POST, PUT, PATCH etc.).
  • HTTP response codes show server status after handling a request(e.g., 200 OK, 404 Not Found, etc).
  • Mime Types help specify data types and content formats (e.g. text/html, text/plain).

Other Web Technologies

  • HTML : HyperText Markup Language - used for basic webpage structure
  • CSS : Cascading Style Sheets - used to style webpages
  • Javascript - used to control the behavior of web pages
  • PHP - Server-side language used to dynamically create web pages.

AJAX

  • Asynchronous JavaScript and XML (AJAX) makes it possible to update portions of a web page without refreshing the whole page.
  • XML, JSON used for representing data for fast and efficient exchange between computers.
  • SQL (Structured Query Language): a relational database language for asking, retrieving, or updating data in a structured way.

Javascript Basics

  • Types: Number, String, Boolean, Object, and Function. null and undefined are special values.
  • Operators: Arithmetic, comparison and logical (e.g. +,-,==, !=. ===, !==, &&, ||)
  • Control Structures: if/else, while, for loops.
  • Arrays: Ordered collections of values. Include operations such as push, pop, length to manipulate arrays.

Objects

  • Allows storage of values with named keys.
  • Access values using dot notation (object.key) or bracket notation (object["key"]).

Destructuring

  • Syntax that unpacks values from arrays or objects into distinct variables.

HTML

(Basic and important elements)

  • <h1> to <h6>: Headings of varying importance
  • <p>: Paragraphs
  • <img>: Images (with attributes like src and alt)
  • <a>: Links for navigation
  • <div> and <span>: Generic containers for grouping content

CSS (Cascading Style Sheets)

  • Used to style HTML elements. Includes selectors, properties, and values to control appearance.
  • Types of selectors include element selectors, id selectors, class selectors and pseudo-selectors like a:hover.

Layouts and Positioning

  • Normal flow: The default layout where each element takes its normal position.
  • Positioning: position properties (relative, absolute, fixed) allow for precise positioning of elements using top, bottom, left, and right

Flexbox and Grid Layouts

  • Flexbox lays elements out along a single axis.
  • Grid lays out elements on a two-dimensional grid(rows and columns)

HTTP Requests/Responses

  • HTTP is used for communications between web clients (browsers) and servers.
  • GET (for retrieving data), POST (for submitting data), and other types of operations like PUT (to update data) or DELETE.

PHP

  • PHP is a server-side scripting language used to create dynamic websites.

Database Management Systems(DBMS)

  • Relational database management systems (RDBMSs) organize data in tables with rows (records) and columns (fields).
  • SQL (Structured Query Language) is used to query, insert, update, and delete data within these systems.

SQL Queries

  • Select statements: retrieve data from tables (e.g., SELECT * FROM table_name).
  • Distincts clauses: filter for unique values.
  • Where clauses: filter rows by specific conditions (e.g., WHERE column='value').

SQL Joins

  • Combine data from multiple tables.
  • INNER JOIN, LEFT JOIN, RIGHT JOIN are different types of joins

Web Application Security

  • Issues such as Cross-Site Scripting (XSS), Cross-Site Request Forgery (CSRF), and SQL Injection, need to be considered.
  • Methods like using parameters in queries, escaping user inputs and checking for input types are ways to reduce risk.

Sessions

  • Used to maintain state across multiple web page requests.

Security Principles

  • Trust nothing and nobody
  • Assume worst-case scenarios
  • Apply defense in depth
  • Principle of least privilege

Web Accessibility

  • Design for different user types, use WCAG standards, and ensure web content is usable and accessible for everyone.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

WEB DEV PDF

Description

Test your knowledge on essential web development concepts including CSS grid and Flexbox, as well as important web technologies like ECMAScript and DNS. This quiz covers key functionalities and definitions important for any aspiring web developer.

More Like This

CSSのグリッドコンテナ
5 questions
Responsive Web Design and CSS Grid
6 questions
CSS Grid Layout Overview
44 questions
Use Quizgecko on...
Browser
Browser