81 skills found · Page 1 of 3
sz3 / LibcimbarOptimized implementation for color-icon-matrix barcodes
st3w / NeoSimulates the digital rain from "The Matrix" (CMatrix clone with 32-bit color and Unicode support)
sz3 / Cimbarcolor-icon-matrix barcodes. Proof of concept implementation.
iyegoroff / React Native Color Matrix Image FiltersVarious color matrix based image filters for iOS & Android
toolness / Accessible Color MatrixAn Elm-based prototype to help designers build accessible color palettes.
sayantann11 / All Classification Templetes For MLClassification - Machine Learning This is ‘Classification’ tutorial which is a part of the Machine Learning course offered by Simplilearn. We will learn Classification algorithms, types of classification algorithms, support vector machines(SVM), Naive Bayes, Decision Tree and Random Forest Classifier in this tutorial. Objectives Let us look at some of the objectives covered under this section of Machine Learning tutorial. Define Classification and list its algorithms Describe Logistic Regression and Sigmoid Probability Explain K-Nearest Neighbors and KNN classification Understand Support Vector Machines, Polynomial Kernel, and Kernel Trick Analyze Kernel Support Vector Machines with an example Implement the Naïve Bayes Classifier Demonstrate Decision Tree Classifier Describe Random Forest Classifier Classification: Meaning Classification is a type of supervised learning. It specifies the class to which data elements belong to and is best used when the output has finite and discrete values. It predicts a class for an input variable as well. There are 2 types of Classification: Binomial Multi-Class Classification: Use Cases Some of the key areas where classification cases are being used: To find whether an email received is a spam or ham To identify customer segments To find if a bank loan is granted To identify if a kid will pass or fail in an examination Classification: Example Social media sentiment analysis has two potential outcomes, positive or negative, as displayed by the chart given below. https://www.simplilearn.com/ice9/free_resources_article_thumb/classification-example-machine-learning.JPG This chart shows the classification of the Iris flower dataset into its three sub-species indicated by codes 0, 1, and 2. https://www.simplilearn.com/ice9/free_resources_article_thumb/iris-flower-dataset-graph.JPG The test set dots represent the assignment of new test data points to one class or the other based on the trained classifier model. Types of Classification Algorithms Let’s have a quick look into the types of Classification Algorithm below. Linear Models Logistic Regression Support Vector Machines Nonlinear models K-nearest Neighbors (KNN) Kernel Support Vector Machines (SVM) Naïve Bayes Decision Tree Classification Random Forest Classification Logistic Regression: Meaning Let us understand the Logistic Regression model below. This refers to a regression model that is used for classification. This method is widely used for binary classification problems. It can also be extended to multi-class classification problems. Here, the dependent variable is categorical: y ϵ {0, 1} A binary dependent variable can have only two values, like 0 or 1, win or lose, pass or fail, healthy or sick, etc In this case, you model the probability distribution of output y as 1 or 0. This is called the sigmoid probability (σ). If σ(θ Tx) > 0.5, set y = 1, else set y = 0 Unlike Linear Regression (and its Normal Equation solution), there is no closed form solution for finding optimal weights of Logistic Regression. Instead, you must solve this with maximum likelihood estimation (a probability model to detect the maximum likelihood of something happening). It can be used to calculate the probability of a given outcome in a binary model, like the probability of being classified as sick or passing an exam. https://www.simplilearn.com/ice9/free_resources_article_thumb/logistic-regression-example-graph.JPG Sigmoid Probability The probability in the logistic regression is often represented by the Sigmoid function (also called the logistic function or the S-curve): https://www.simplilearn.com/ice9/free_resources_article_thumb/sigmoid-function-machine-learning.JPG In this equation, t represents data values * the number of hours studied and S(t) represents the probability of passing the exam. Assume sigmoid function: https://www.simplilearn.com/ice9/free_resources_article_thumb/sigmoid-probability-machine-learning.JPG g(z) tends toward 1 as z -> infinity , and g(z) tends toward 0 as z -> infinity K-nearest Neighbors (KNN) K-nearest Neighbors algorithm is used to assign a data point to clusters based on similarity measurement. It uses a supervised method for classification. The steps to writing a k-means algorithm are as given below: https://www.simplilearn.com/ice9/free_resources_article_thumb/knn-distribution-graph-machine-learning.JPG Choose the number of k and a distance metric. (k = 5 is common) Find k-nearest neighbors of the sample that you want to classify Assign the class label by majority vote. KNN Classification A new input point is classified in the category such that it has the most number of neighbors from that category. For example: https://www.simplilearn.com/ice9/free_resources_article_thumb/knn-classification-machine-learning.JPG Classify a patient as high risk or low risk. Mark email as spam or ham. Keen on learning about Classification Algorithms in Machine Learning? Click here! Support Vector Machine (SVM) Let us understand Support Vector Machine (SVM) in detail below. SVMs are classification algorithms used to assign data to various classes. They involve detecting hyperplanes which segregate data into classes. SVMs are very versatile and are also capable of performing linear or nonlinear classification, regression, and outlier detection. Once ideal hyperplanes are discovered, new data points can be easily classified. https://www.simplilearn.com/ice9/free_resources_article_thumb/support-vector-machines-graph-machine-learning.JPG The optimization objective is to find “maximum margin hyperplane” that is farthest from the closest points in the two classes (these points are called support vectors). In the given figure, the middle line represents the hyperplane. SVM Example Let’s look at this image below and have an idea about SVM in general. Hyperplanes with larger margins have lower generalization error. The positive and negative hyperplanes are represented by: https://www.simplilearn.com/ice9/free_resources_article_thumb/positive-negative-hyperplanes-machine-learning.JPG Classification of any new input sample xtest : If w0 + wTxtest > 1, the sample xtest is said to be in the class toward the right of the positive hyperplane. If w0 + wTxtest < -1, the sample xtest is said to be in the class toward the left of the negative hyperplane. When you subtract the two equations, you get: https://www.simplilearn.com/ice9/free_resources_article_thumb/equation-subtraction-machine-learning.JPG Length of vector w is (L2 norm length): https://www.simplilearn.com/ice9/free_resources_article_thumb/length-of-vector-machine-learning.JPG You normalize with the length of w to arrive at: https://www.simplilearn.com/ice9/free_resources_article_thumb/normalize-equation-machine-learning.JPG SVM: Hard Margin Classification Given below are some points to understand Hard Margin Classification. The left side of equation SVM-1 given above can be interpreted as the distance between the positive (+ve) and negative (-ve) hyperplanes; in other words, it is the margin that can be maximized. Hence the objective of the function is to maximize with the constraint that the samples are classified correctly, which is represented as : https://www.simplilearn.com/ice9/free_resources_article_thumb/hard-margin-classification-machine-learning.JPG This means that you are minimizing ‖w‖. This also means that all positive samples are on one side of the positive hyperplane and all negative samples are on the other side of the negative hyperplane. This can be written concisely as : https://www.simplilearn.com/ice9/free_resources_article_thumb/hard-margin-classification-formula.JPG Minimizing ‖w‖ is the same as minimizing. This figure is better as it is differentiable even at w = 0. The approach listed above is called “hard margin linear SVM classifier.” SVM: Soft Margin Classification Given below are some points to understand Soft Margin Classification. To allow for linear constraints to be relaxed for nonlinearly separable data, a slack variable is introduced. (i) measures how much ith instance is allowed to violate the margin. The slack variable is simply added to the linear constraints. https://www.simplilearn.com/ice9/free_resources_article_thumb/soft-margin-calculation-machine-learning.JPG Subject to the above constraints, the new objective to be minimized becomes: https://www.simplilearn.com/ice9/free_resources_article_thumb/soft-margin-calculation-formula.JPG You have two conflicting objectives now—minimizing slack variable to reduce margin violations and minimizing to increase the margin. The hyperparameter C allows us to define this trade-off. Large values of C correspond to larger error penalties (so smaller margins), whereas smaller values of C allow for higher misclassification errors and larger margins. https://www.simplilearn.com/ice9/free_resources_article_thumb/machine-learning-certification-video-preview.jpg SVM: Regularization The concept of C is the reverse of regularization. Higher C means lower regularization, which increases bias and lowers the variance (causing overfitting). https://www.simplilearn.com/ice9/free_resources_article_thumb/concept-of-c-graph-machine-learning.JPG IRIS Data Set The Iris dataset contains measurements of 150 IRIS flowers from three different species: Setosa Versicolor Viriginica Each row represents one sample. Flower measurements in centimeters are stored as columns. These are called features. IRIS Data Set: SVM Let’s train an SVM model using sci-kit-learn for the Iris dataset: https://www.simplilearn.com/ice9/free_resources_article_thumb/svm-model-graph-machine-learning.JPG Nonlinear SVM Classification There are two ways to solve nonlinear SVMs: by adding polynomial features by adding similarity features Polynomial features can be added to datasets; in some cases, this can create a linearly separable dataset. https://www.simplilearn.com/ice9/free_resources_article_thumb/nonlinear-classification-svm-machine-learning.JPG In the figure on the left, there is only 1 feature x1. This dataset is not linearly separable. If you add x2 = (x1)2 (figure on the right), the data becomes linearly separable. Polynomial Kernel In sci-kit-learn, one can use a Pipeline class for creating polynomial features. Classification results for the Moons dataset are shown in the figure. https://www.simplilearn.com/ice9/free_resources_article_thumb/polynomial-kernel-machine-learning.JPG Polynomial Kernel with Kernel Trick Let us look at the image below and understand Kernel Trick in detail. https://www.simplilearn.com/ice9/free_resources_article_thumb/polynomial-kernel-with-kernel-trick.JPG For large dimensional datasets, adding too many polynomial features can slow down the model. You can apply a kernel trick with the effect of polynomial features without actually adding them. The code is shown (SVC class) below trains an SVM classifier using a 3rd-degree polynomial kernel but with a kernel trick. https://www.simplilearn.com/ice9/free_resources_article_thumb/polynomial-kernel-equation-machine-learning.JPG The hyperparameter coefθ controls the influence of high-degree polynomials. Kernel SVM Let us understand in detail about Kernel SVM. Kernel SVMs are used for classification of nonlinear data. In the chart, nonlinear data is projected into a higher dimensional space via a mapping function where it becomes linearly separable. https://www.simplilearn.com/ice9/free_resources_article_thumb/kernel-svm-machine-learning.JPG In the higher dimension, a linear separating hyperplane can be derived and used for classification. A reverse projection of the higher dimension back to original feature space takes it back to nonlinear shape. As mentioned previously, SVMs can be kernelized to solve nonlinear classification problems. You can create a sample dataset for XOR gate (nonlinear problem) from NumPy. 100 samples will be assigned the class sample 1, and 100 samples will be assigned the class label -1. https://www.simplilearn.com/ice9/free_resources_article_thumb/kernel-svm-graph-machine-learning.JPG As you can see, this data is not linearly separable. https://www.simplilearn.com/ice9/free_resources_article_thumb/kernel-svm-non-separable.JPG You now use the kernel trick to classify XOR dataset created earlier. https://www.simplilearn.com/ice9/free_resources_article_thumb/kernel-svm-xor-machine-learning.JPG Naïve Bayes Classifier What is Naive Bayes Classifier? Have you ever wondered how your mail provider implements spam filtering or how online news channels perform news text classification or even how companies perform sentiment analysis of their audience on social media? All of this and more are done through a machine learning algorithm called Naive Bayes Classifier. Naive Bayes Named after Thomas Bayes from the 1700s who first coined this in the Western literature. Naive Bayes classifier works on the principle of conditional probability as given by the Bayes theorem. Advantages of Naive Bayes Classifier Listed below are six benefits of Naive Bayes Classifier. Very simple and easy to implement Needs less training data Handles both continuous and discrete data Highly scalable with the number of predictors and data points As it is fast, it can be used in real-time predictions Not sensitive to irrelevant features Bayes Theorem We will understand Bayes Theorem in detail from the points mentioned below. According to the Bayes model, the conditional probability P(Y|X) can be calculated as: P(Y|X) = P(X|Y)P(Y) / P(X) This means you have to estimate a very large number of P(X|Y) probabilities for a relatively small vector space X. For example, for a Boolean Y and 30 possible Boolean attributes in the X vector, you will have to estimate 3 billion probabilities P(X|Y). To make it practical, a Naïve Bayes classifier is used, which assumes conditional independence of P(X) to each other, with a given value of Y. This reduces the number of probability estimates to 2*30=60 in the above example. Naïve Bayes Classifier for SMS Spam Detection Consider a labeled SMS database having 5574 messages. It has messages as given below: https://www.simplilearn.com/ice9/free_resources_article_thumb/naive-bayes-spam-machine-learning.JPG Each message is marked as spam or ham in the data set. Let’s train a model with Naïve Bayes algorithm to detect spam from ham. The message lengths and their frequency (in the training dataset) are as shown below: https://www.simplilearn.com/ice9/free_resources_article_thumb/naive-bayes-spam-spam-detection.JPG Analyze the logic you use to train an algorithm to detect spam: Split each message into individual words/tokens (bag of words). Lemmatize the data (each word takes its base form, like “walking” or “walked” is replaced with “walk”). Convert data to vectors using scikit-learn module CountVectorizer. Run TFIDF to remove common words like “is,” “are,” “and.” Now apply scikit-learn module for Naïve Bayes MultinomialNB to get the Spam Detector. This spam detector can then be used to classify a random new message as spam or ham. Next, the accuracy of the spam detector is checked using the Confusion Matrix. For the SMS spam example above, the confusion matrix is shown on the right. Accuracy Rate = Correct / Total = (4827 + 592)/5574 = 97.21% Error Rate = Wrong / Total = (155 + 0)/5574 = 2.78% https://www.simplilearn.com/ice9/free_resources_article_thumb/confusion-matrix-machine-learning.JPG Although confusion Matrix is useful, some more precise metrics are provided by Precision and Recall. https://www.simplilearn.com/ice9/free_resources_article_thumb/precision-recall-matrix-machine-learning.JPG Precision refers to the accuracy of positive predictions. https://www.simplilearn.com/ice9/free_resources_article_thumb/precision-formula-machine-learning.JPG Recall refers to the ratio of positive instances that are correctly detected by the classifier (also known as True positive rate or TPR). https://www.simplilearn.com/ice9/free_resources_article_thumb/recall-formula-machine-learning.JPG Precision/Recall Trade-off To detect age-appropriate videos for kids, you need high precision (low recall) to ensure that only safe videos make the cut (even though a few safe videos may be left out). The high recall is needed (low precision is acceptable) in-store surveillance to catch shoplifters; a few false alarms are acceptable, but all shoplifters must be caught. Learn about Naive Bayes in detail. Click here! Decision Tree Classifier Some aspects of the Decision Tree Classifier mentioned below are. Decision Trees (DT) can be used both for classification and regression. The advantage of decision trees is that they require very little data preparation. They do not require feature scaling or centering at all. They are also the fundamental components of Random Forests, one of the most powerful ML algorithms. Unlike Random Forests and Neural Networks (which do black-box modeling), Decision Trees are white box models, which means that inner workings of these models are clearly understood. In the case of classification, the data is segregated based on a series of questions. Any new data point is assigned to the selected leaf node. https://www.simplilearn.com/ice9/free_resources_article_thumb/decision-tree-classifier-machine-learning.JPG Start at the tree root and split the data on the feature using the decision algorithm, resulting in the largest information gain (IG). This splitting procedure is then repeated in an iterative process at each child node until the leaves are pure. This means that the samples at each node belonging to the same class. In practice, you can set a limit on the depth of the tree to prevent overfitting. The purity is compromised here as the final leaves may still have some impurity. The figure shows the classification of the Iris dataset. https://www.simplilearn.com/ice9/free_resources_article_thumb/decision-tree-classifier-graph.JPG IRIS Decision Tree Let’s build a Decision Tree using scikit-learn for the Iris flower dataset and also visualize it using export_graphviz API. https://www.simplilearn.com/ice9/free_resources_article_thumb/iris-decision-tree-machine-learning.JPG The output of export_graphviz can be converted into png format: https://www.simplilearn.com/ice9/free_resources_article_thumb/iris-decision-tree-output.JPG Sample attribute stands for the number of training instances the node applies to. Value attribute stands for the number of training instances of each class the node applies to. Gini impurity measures the node’s impurity. A node is “pure” (gini=0) if all training instances it applies to belong to the same class. https://www.simplilearn.com/ice9/free_resources_article_thumb/impurity-formula-machine-learning.JPG For example, for Versicolor (green color node), the Gini is 1-(0/54)2 -(49/54)2 -(5/54) 2 ≈ 0.168 https://www.simplilearn.com/ice9/free_resources_article_thumb/iris-decision-tree-sample.JPG Decision Boundaries Let us learn to create decision boundaries below. For the first node (depth 0), the solid line splits the data (Iris-Setosa on left). Gini is 0 for Setosa node, so no further split is possible. The second node (depth 1) splits the data into Versicolor and Virginica. If max_depth were set as 3, a third split would happen (vertical dotted line). https://www.simplilearn.com/ice9/free_resources_article_thumb/decision-tree-boundaries.JPG For a sample with petal length 5 cm and petal width 1.5 cm, the tree traverses to depth 2 left node, so the probability predictions for this sample are 0% for Iris-Setosa (0/54), 90.7% for Iris-Versicolor (49/54), and 9.3% for Iris-Virginica (5/54) CART Training Algorithm Scikit-learn uses Classification and Regression Trees (CART) algorithm to train Decision Trees. CART algorithm: Split the data into two subsets using a single feature k and threshold tk (example, petal length < “2.45 cm”). This is done recursively for each node. k and tk are chosen such that they produce the purest subsets (weighted by their size). The objective is to minimize the cost function as given below: https://www.simplilearn.com/ice9/free_resources_article_thumb/cart-training-algorithm-machine-learning.JPG The algorithm stops executing if one of the following situations occurs: max_depth is reached No further splits are found for each node Other hyperparameters may be used to stop the tree: min_samples_split min_samples_leaf min_weight_fraction_leaf max_leaf_nodes Gini Impurity or Entropy Entropy is one more measure of impurity and can be used in place of Gini. https://www.simplilearn.com/ice9/free_resources_article_thumb/gini-impurity-entrophy.JPG It is a degree of uncertainty, and Information Gain is the reduction that occurs in entropy as one traverses down the tree. Entropy is zero for a DT node when the node contains instances of only one class. Entropy for depth 2 left node in the example given above is: https://www.simplilearn.com/ice9/free_resources_article_thumb/entrophy-for-depth-2.JPG Gini and Entropy both lead to similar trees. DT: Regularization The following figure shows two decision trees on the moons dataset. https://www.simplilearn.com/ice9/free_resources_article_thumb/dt-regularization-machine-learning.JPG The decision tree on the right is restricted by min_samples_leaf = 4. The model on the left is overfitting, while the model on the right generalizes better. Random Forest Classifier Let us have an understanding of Random Forest Classifier below. A random forest can be considered an ensemble of decision trees (Ensemble learning). Random Forest algorithm: Draw a random bootstrap sample of size n (randomly choose n samples from the training set). Grow a decision tree from the bootstrap sample. At each node, randomly select d features. Split the node using the feature that provides the best split according to the objective function, for instance by maximizing the information gain. Repeat the steps 1 to 2 k times. (k is the number of trees you want to create, using a subset of samples) Aggregate the prediction by each tree for a new data point to assign the class label by majority vote (pick the group selected by the most number of trees and assign new data point to that group). Random Forests are opaque, which means it is difficult to visualize their inner workings. https://www.simplilearn.com/ice9/free_resources_article_thumb/random-forest-classifier-graph.JPG However, the advantages outweigh their limitations since you do not have to worry about hyperparameters except k, which stands for the number of decision trees to be created from a subset of samples. RF is quite robust to noise from the individual decision trees. Hence, you need not prune individual decision trees. The larger the number of decision trees, the more accurate the Random Forest prediction is. (This, however, comes with higher computation cost). Key Takeaways Let us quickly run through what we have learned so far in this Classification tutorial. Classification algorithms are supervised learning methods to split data into classes. They can work on Linear Data as well as Nonlinear Data. Logistic Regression can classify data based on weighted parameters and sigmoid conversion to calculate the probability of classes. K-nearest Neighbors (KNN) algorithm uses similar features to classify data. Support Vector Machines (SVMs) classify data by detecting the maximum margin hyperplane between data classes. Naïve Bayes, a simplified Bayes Model, can help classify data using conditional probability models. Decision Trees are powerful classifiers and use tree splitting logic until pure or somewhat pure leaf node classes are attained. Random Forests apply Ensemble Learning to Decision Trees for more accurate classification predictions. Conclusion This completes ‘Classification’ tutorial. In the next tutorial, we will learn 'Unsupervised Learning with Clustering.'
chrisneagu / FTC Skystone Dark Angels Romania 2020NOTICE This repository contains the public FTC SDK for the SKYSTONE (2019-2020) competition season. If you are looking for the current season's FTC SDK software, please visit the new and permanent home of the public FTC SDK: FtcRobotController repository Welcome! This GitHub repository contains the source code that is used to build an Android app to control a FIRST Tech Challenge competition robot. To use this SDK, download/clone the entire project to your local computer. Getting Started If you are new to robotics or new to the FIRST Tech Challenge, then you should consider reviewing the FTC Blocks Tutorial to get familiar with how to use the control system: FTC Blocks Online Tutorial Even if you are an advanced Java programmer, it is helpful to start with the FTC Blocks tutorial, and then migrate to the OnBot Java Tool or to Android Studio afterwards. Downloading the Project If you are an Android Studio programmer, there are several ways to download this repo. Note that if you use the Blocks or OnBot Java Tool to program your robot, then you do not need to download this repository. If you are a git user, you can clone the most current version of the repository: git clone https://github.com/FIRST-Tech-Challenge/SKYSTONE.git Or, if you prefer, you can use the "Download Zip" button available through the main repository page. Downloading the project as a .ZIP file will keep the size of the download manageable. You can also download the project folder (as a .zip or .tar.gz archive file) from the Downloads subsection of the Releases page for this repository. Once you have downloaded and uncompressed (if needed) your folder, you can use Android Studio to import the folder ("Import project (Eclipse ADT, Gradle, etc.)"). Getting Help User Documentation and Tutorials FIRST maintains online documentation with information and tutorials on how to use the FIRST Tech Challenge software and robot control system. You can access this documentation using the following link: SKYSTONE Online Documentation Note that the online documentation is an "evergreen" document that is constantly being updated and edited. It contains the most current information about the FIRST Tech Challenge software and control system. Javadoc Reference Material The Javadoc reference documentation for the FTC SDK is now available online. Click on the following link to view the FTC SDK Javadoc documentation as a live website: FTC Javadoc Documentation Documentation for the FTC SDK is also included with this repository. There is a subfolder called "doc" which contains several subfolders: The folder "apk" contains the .apk files for the FTC Driver Station and FTC Robot Controller apps. The folder "javadoc" contains the JavaDoc user documentation for the FTC SDK. Online User Forum For technical questions regarding the Control System or the FTC SDK, please visit the FTC Technology forum: FTC Technology Forum Release Information Version 5.5 (20200824-090813) Version 5.5 requires Android Studio 4.0 or later. New features Adds support for calling custom Java classes from Blocks OpModes (fixes SkyStone issue #161). Classes must be in the org.firstinspires.ftc.teamcode package. Methods must be public static and have no more than 21 parameters. Parameters declared as OpMode, LinearOpMode, Telemetry, and HardwareMap are supported and the argument is provided automatically, regardless of the order of the parameters. On the block, the sockets for those parameters are automatically filled in. Parameters declared as char or java.lang.Character will accept any block that returns text and will only use the first character in the text. Parameters declared as boolean or java.lang.Boolean will accept any block that returns boolean. Parameters declared as byte, java.lang.Byte, short, java.lang.Short, int, java.lang.Integer, long, or java.lang.Long, will accept any block that returns a number and will round that value to the nearest whole number. Parameters declared as float, java.lang.Float, double, java.lang.Double will accept any block that returns a number. Adds telemetry API method for setting display format Classic Monospace HTML (certain tags only) Adds blocks support for switching cameras. Adds Blocks support for TensorFlow Object Detection with a custom model. Adds support for uploading a custom TensorFlow Object Detection model in the Manage page, which is especially useful for Blocks and OnBotJava users. Shows new Control Hub blink codes when the WiFi band is switched using the Control Hub's button (only possible on Control Hub OS 1.1.2) Adds new warnings which can be disabled in the Advanced RC Settings Mismatched app versions warning Unnecessary 2.4 GHz WiFi usage warning REV Hub is running outdated firmware (older than version 1.8.2) Adds support for Sony PS4 gamepad, and reworks how gamepads work on the Driver Station Removes preference which sets gamepad type based on driver position. Replaced with menu which allows specifying type for gamepads with unknown VID and PID Attempts to auto-detect gamepad type based on USB VID and PID If gamepad VID and PID is not known, use type specified by user for that VID and PID If gamepad VID and PID is not known AND the user has not specified a type for that VID and PID, an educated guess is made about how to map the gamepad Driver Station will now attempt to automatically recover from a gamepad disconnecting, and re-assign it to the position it was assigned to when it dropped If only one gamepad is assigned and it drops: it can be recovered If two gamepads are assigned, and have different VID/PID signatures, and only one drops: it will be recovered If two gamepads are assigned, and have different VID/PID signatures, and BOTH drop: both will be recovered If two gamepads are assigned, and have the same VID/PID signatures, and only one drops: it will be recovered If two gamepads are assigned, and have the same VID/PID signatures, and BOTH drop: neither will be recovered, because of the ambiguity of the gamepads when they re-appear on the USB bus. There is currently one known edge case: if there are two gamepads with the same VID/PID signature plugged in, but only one is assigned, and they BOTH drop, it's a 50-50 chance of which one will be chosen for automatic recovery to the assigned position: it is determined by whichever one is re-enumerated first by the USB bus controller. Adds landscape user interface to Driver Station New feature: practice timer with audio cues New feature (Control Hub only): wireless network connection strength indicator (0-5 bars) New feature (Control Hub only): tapping on the ping/channel display will switch to an alternate display showing radio RX dBm and link speed (tap again to switch back) The layout will NOT autorotate. You can switch the layout from the Driver Station's settings menu. Breaking changes Removes support for Android versions 4.4 through 5.1 (KitKat and Lollipop). The minSdkVersion is now 23. Removes the deprecated LinearOpMode methods waitOneFullHardwareCycle() and waitForNextHardwareCycle() Enhancements Handles RS485 address of Control Hub automatically The Control Hub is automatically given a reserved address Existing configuration files will continue to work All addresses in the range of 1-10 are still available for Expansion Hubs The Control Hub light will now normally be solid green, without blinking to indicate the address The Control Hub will not be shown on the Expansion Hub Address Change settings page Improves REV Hub firmware updater The user can now choose between all available firmware update files Version 1.8.2 of the REV Hub firmware is bundled into the Robot Controller app. Text was added to clarify that Expansion Hubs can only be updated via USB. Firmware update speed was reduced to improve reliability Allows REV Hub firmware to be updated directly from the Manage webpage Improves log viewer on Robot Controller Horizontal scrolling support (no longer word wrapped) Supports pinch-to-zoom Uses a monospaced font Error messages are highlighted New color scheme Attempts to force-stop a runaway/stuck OpMode without restarting the entire app Not all types of runaway conditions are stoppable, but if the user code attempts to talk to hardware during the runaway, the system should be able to capture it. Makes various tweaks to the Self Inspect screen Renames "OS version" entry to "Android version" Renames "WiFi Direct Name" to "WiFi Name" Adds Control Hub OS version, when viewing the report of a Control Hub Hides the airplane mode entry, when viewing the report of a Control Hub Removes check for ZTE Speed Channel Changer Shows firmware version for all Expansion and Control Hubs Reworks network settings portion of Manage page All network settings are now applied with a single click The WiFi Direct channel of phone-based Robot Controllers can now be changed from the Manage page WiFi channels are filtered by band (2.4 vs 5 GHz) and whether they overlap with other channels The current WiFi channel is pre-selected on phone-based Robot Controllers, and Control Hubs running OS 1.1.2 or later. On Control Hubs running OS 1.1.2 or later, you can choose to have the system automatically select a channel on the 5 GHz band Improves OnBotJava New light and dark themes replace the old themes (chaos, github, chrome,...) the new default theme is light and will be used when you first update to this version OnBotJava now has a tabbed editor Read-only offline mode Improves function of "exit" menu item on Robot Controller and Driver Station Now guaranteed to be fully stopped and unloaded from memory Shows a warning message if a LinearOpMode exists prematurely due to failure to monitor for the start condition Improves error message shown when the Driver Station and Robot Controller are incompatible with each other Driver Station OpMode Control Panel now disabled while a Restart Robot is in progress Disables advanced settings related to WiFi direct when the Robot Controller is a Control Hub. Tint phone battery icons on Driver Station when low/critical. Uses names "Control Hub Portal" and "Control Hub" (when appropriate) in new configuration files Improve I2C read performance Very large improvement on Control Hub; up to ~2x faster with small (e.g. 6 byte) reads Not as apparent on Expansion Hubs connected to a phone Update/refresh build infrastructure Update to 'androidx' support library from 'com.android.support:appcompat', which is end-of-life Update targetSdkVersion and compileSdkVersion to 28 Update Android Studio's Android plugin to latest Fix reported build timestamp in 'About' screen Add sample illustrating manual webcam use: ConceptWebcam Bug fixes Fixes SkyStone issue #248 Fixes SkyStone issue #232 and modifies bulk caching semantics to allow for cache-preserving MANUAL/AUTO transitions. Improves performance when REV 2M distance sensor is unplugged Improves readability of Toast messages on certain devices Allows a Driver Station to connect to a Robot Controller after another has disconnected Improves generation of fake serial numbers for UVC cameras which do not provide a real serial number Previously some devices would assign such cameras a serial of 0:0 and fail to open and start streaming Fixes ftc_app issue #638. Fixes a slew of bugs with the Vuforia camera monitor including: Fixes bug where preview could be displayed with a wonky aspect ratio Fixes bug where preview could be cut off in landscape Fixes bug where preview got totally messed up when rotating phone Fixes bug where crosshair could drift off target when using webcams Fixes issue in UVC driver on some devices (ftc_app 681) if streaming was started/stopped multiple times in a row Issue manifested as kernel panic on devices which do not have this kernel patch. On affected devices which do have the patch, the issue was manifest as simply a failure to start streaming. The Tech Team believes that the root cause of the issue is a bug in the Linux kernel XHCI driver. A workaround was implemented in the SDK UVC driver. Fixes bug in UVC driver where often half the frames from the camera would be dropped (e.g. only 15FPS delivered during a streaming session configured for 30FPS). Fixes issue where TensorFlow Object Detection would show results whose confidence was lower than the minimum confidence parameter. Fixes a potential exploitation issue of CVE-2019-11358 in OnBotJava Fixes changing the address of an Expansion Hub with additional Expansion Hubs connected to it Preserves the Control Hub's network connection when "Restart Robot" is selected Fixes issue where device scans would fail while the Robot was restarting Fix RenderScript usage Use androidx.renderscript variant: increased compatibility Use RenderScript in Java mode, not native: simplifies build Fixes webcam-frame-to-bitmap conversion problem: alpha channel wasn't being initialized, only R, G, & B Fixes possible arithmetic overflow in Deadline Fixes deadlock in Vuforia webcam support which could cause 5-second delays when stopping OpMode Version 5.4 (20200108-101156) Fixes SkyStone issue #88 Adds an inspection item that notes when a robot controller (Control Hub) is using the factory default password. Fixes SkyStone issue #61 Fixes SkyStone issue #142 Fixes ftc_app issue #417 by adding more current and voltage monitoring capabilities for REV Hubs. Fixes a crash sometimes caused by OnBotJava activity Improves OnBotJava autosave functionality ftc_app #738 Fixes system responsiveness issue when an Expansion Hub is disconnected Fixes issue where IMU initialization could prevent Op Modes from stopping Fixes issue where AndroidTextToSpeech.speak() would fail if it was called too early Adds telemetry.speak() methods and blocks, which cause the Driver Station (if also updated) to speak text Adds and improves Expansion Hub-related warnings Improves Expansion Hub low battery warning Displays the warning immediately after the hub reports it Specifies whether the condition is current or occurred temporarily during an OpMode run Displays which hubs reported low battery Displays warning when hub loses and regains power during an OpMode run Fixes the hub's LED pattern after this condition Displays warning when Expansion Hub is not responding to commands Specifies whether the condition is current or occurred temporarily during an OpMode run Clarifies warning when Expansion Hub is not present at startup Specifies that this condition requires a Robot Restart before the hub can be used. The hub light will now accurately reflect this state Improves logging and reduces log spam during these conditions Syncs the Control Hub time and timezone to a connected web browser programming the robot, if a Driver Station is not available. Adds bulk read functionality for REV Hubs A bulk caching mode must be set at the Hub level with LynxModule#setBulkCachingMode(). This applies to all relevant SDK hardware classes that reference that Hub. The following following Hub bulk caching modes are available: BulkCachingMode.OFF (default): All hardware calls operate as usual. Bulk data can read through LynxModule#getBulkData() and processed manually. BulkCachingMode.AUTO: Applicable hardware calls are served from a bulk read cache that is cleared/refreshed automatically to ensure identical commands don't hit the same cache. The cache can also be cleared manually with LynxModule#clearBulkCache(), although this is not recommended. (advanced users) BulkCachingMode.MANUAL: Same as BulkCachingMode.AUTO except the cache is never cleared automatically. To avoid getting stale data, the cache must be manually cleared at the beginning of each loop body or as the user deems appropriate. Removes PIDF Annotation values added in Rev 5.3 (to AndyMark, goBILDA and TETRIX motor configurations). The new motor types will still be available but their Default control behavior will revert back to Rev 5.2 Adds new ConceptMotorBulkRead sample Opmode to demonstrate and compare Motor Bulk-Read modes for reducing I/O latencies. Version 5.3 (20191004-112306) Fixes external USB/UVC webcam support Makes various bugfixes and improvements to Blocks page, including but not limited to: Many visual tweaks Browser zoom and window resize behave better Resizing the Java preview pane works better and more consistently across browsers The Java preview pane consistently gets scrollbars when needed The Java preview pane is hidden by default on phones Internet Explorer 11 should work Large dropdown lists display properly on lower res screens Disabled buttons are now visually identifiable as disabled A warning is shown if a user selects a TFOD sample, but their device is not compatible Warning messages in a Blocks op mode are now visible by default. Adds goBILDA 5201 and 5202 motors to Robot Configurator Adds PIDF Annotation values to AndyMark, goBILDA and TETRIX motor configurations. This has the effect of causing the RUN_USING_ENCODERS and RUN_TO_POSITION modes to use PIDF vs PID closed loop control on these motors. This should provide more responsive, yet stable, speed control. PIDF adds Feedforward control to the basic PID control loop. Feedforward is useful when controlling a motor's speed because it "anticipates" how much the control voltage must change to achieve a new speed set-point, rather than requiring the integrated error to change sufficiently. The PIDF values were chosen to provide responsive, yet stable, speed control on a lightly loaded motor. The more heavily a motor is loaded (drag or friction), the more noticable the PIDF improvement will be. Fixes startup crash on Android 10 Fixes ftc_app issue #712 (thanks to FROGbots-4634) Fixes ftc_app issue #542 Allows "A" and lowercase letters when naming device through RC and DS apps. Version 5.2 (20190905-083277) Fixes extra-wide margins on settings activities, and placement of the new configuration button Adds Skystone Vuforia image target data. Includes sample Skystone Vuforia Navigation op modes (Java). Includes sample Skystone Vuforia Navigation op modes (Blocks). Adds TensorFlow inference model (.tflite) for Skystone game elements. Includes sample Skystone TensorFlow op modes (Java). Includes sample Skystone TensorFlow op modes (Blocks). Removes older (season-specific) sample op modes. Includes 64-bit support (to comply with Google Play requirements). Protects against Stuck OpModes when a Restart Robot is requested. (Thanks to FROGbots-4634) (ftc_app issue #709) Blocks related changes: Fixes bug with blocks generated code when hardware device name is a java or javascript reserved word. Shows generated java code for blocks, even when hardware items are missing from the active configuration. Displays warning icon when outdated Vuforia and TensorFlow blocks are used (SkyStone issue #27) Version 5.1 (20190820-222104) Defines default PIDF parameters for the following motors: REV Core Hex Motor REV 20:1 HD Hex Motor REV 40:1 HD Hex Motor Adds back button when running on a device without a system back button (such as a Control Hub) Allows a REV Control Hub to update the firmware on a REV Expansion Hub via USB Fixes SkyStone issue #9 Fixes ftc_app issue #715 Prevents extra DS User clicks by filtering based on current state. Prevents incorrect DS UI state changes when receiving new OpMode list from RC Adds support for REV Color Sensor V3 Adds a manual-refresh DS Camera Stream for remotely viewing RC camera frames. To show the stream on the DS, initialize but do not run a stream-enabled opmode, select the Camera Stream option in the DS menu, and tap the image to refresh. This feature is automatically enabled when using Vuforia or TFOD—no additional RC configuration is required for typical use cases. To hide the stream, select the same menu item again. Note that gamepads are disabled and the selected opmode cannot be started while the stream is open as a safety precaution. To use custom streams, consult the API docs for CameraStreamServer#setSource and CameraStreamSource. Adds many Star Wars sounds to RobotController resources. Added SKYSTONE Sounds Chooser Sample Program. Switches out startup, connect chimes, and error/warning sounds for Star Wars sounds Updates OnBot Java to use a WebSocket for communication with the robot The OnBot Java page no longer has to do a full refresh when a user switches from editing one file to another Known issues: Camera Stream The Vuforia camera stream inherits the issues present in the phone preview (namely ftc_app issue #574). This problem does not affect the TFOD camera stream even though it receives frames from Vuforia. The orientation of the stream frames may not always match the phone preview. For now, these frames may be rotated manually via a custom CameraStreamSource if desired. OnBotJava Browser back button may not always work correctly It's possible for a build to be queued, but not started. The OnBot Java build console will display a warning if this occurs. A user might not realize they are editing a different file if the user inadvertently switches from one file to another since this switch is now seamless. The name of the currently open file is displayed in the browser tab. Version 5.0 (built on 19.06.14) Support for the REV Robotics Control Hub. Adds a Java preview pane to the Blocks editor. Adds a new offline export feature to the Blocks editor. Display wifi channel in Network circle on Driver Station. Adds calibration for Logitech C270 Updates build tooling and target SDK. Compliance with Google's permissions infrastructure (Required after build tooling update). Keep Alives to mitigate the Motorola wifi scanning problem. Telemetry substitute no longer necessary. Improves Vuforia error reporting. Fixes ftctechnh/ftc_app issues 621, 713. Miscellaneous bug fixes and improvements. Version 4.3 (built on 18.10.31) Includes missing TensorFlow-related libraries and files. Version 4.2 (built on 18.10.30) Includes fix to avoid deadlock situation with WatchdogMonitor which could result in USB communication errors. Comm error appeared to require that user disconnect USB cable and restart the Robot Controller app to recover. robotControllerLog.txt would have error messages that included the words "E RobotCore: lynx xmit lock: #### abandoning lock:" Includes fix to correctly list the parent module address for a REV Robotics Expansion Hub in a configuration (.xml) file. Bug in versions 4.0 and 4.1 would incorrect list the address module for a parent REV Robotics device as "1". If the parent module had a higher address value than the daisy-chained module, then this bug would prevent the Robot Controller from communicating with the downstream Expansion Hub. Added requirement for ACCESS_COARSE_LOCATION to allow a Driver Station running Android Oreo to scan for Wi-Fi Direct devices. Added google() repo to build.gradle because aapt2 must be downloaded from the google() repository beginning with version 3.2 of the Android Gradle Plugin. Important Note: Android Studio users will need to be connected to the Internet the first time build the ftc_app project. Internet connectivity is required for the first build so the appropriate files can be downloaded from the Google repository. Users should not need to be connected to the Internet for subsequent builds. This should also fix buid issue where Android Studio would complain that it "Could not find com.android.tools.lint:lint-gradle:26.1.4" (or similar). Added support for REV Spark Mini motor controller as part of the configuration menu for a servo/PWM port on the REV Expansion Hub. Provide examples for playing audio files in an Op Mode. Block Development Tool Changes Includes a fix for a problem with the Velocity blocks that were reported in the FTC Technology forum (Blocks Programming subforum). Change the "Save completed successfully." message to a white color so it will contrast with a green background. Fixed the "Download image" feature so it will work if there are text blocks in the op mode. Introduce support for Google's TensorFlow Lite technology for object detetion for 2018-2019 game. TensorFlow lite can recognize Gold Mineral and Silver Mineral from 2018-2019 game. Example Java and Block op modes are included to show how to determine the relative position of the gold block (left, center, right). Version 4.1 (released on 18.09.24) Changes include: Fix to prevent crash when deprecated configuration annotations are used. Change to allow FTC Robot Controller APK to be auto-updated using FIRST Global Control Hub update scripts. Removed samples for non supported / non legal hardware. Improvements to Telemetry.addData block with "text" socket. Updated Blocks sample op mode list to include Rover Ruckus Vuforia example. Update SDK library version number. Version 4.0 (released on 18.09.12) Changes include: Initial support for UVC compatible cameras If UVC camera has a unique serial number, RC will detect and enumerate by serial number. If UVC camera lacks a unique serial number, RC will only support one camera of that type connected. Calibration settings for a few cameras are included (see TeamCode/src/main/res/xml/teamwebcamcalibrations.xml for details). User can upload calibration files from Program and Manage web interface. UVC cameras seem to draw a fair amount of electrical current from the USB bus. This does not appear to present any problems for the REV Robotics Control Hub. This does seem to create stability problems when using some cameras with an Android phone-based Robot Controller. FTC Tech Team is investigating options to mitigate this issue with the phone-based Robot Controllers. Updated sample Vuforia Navigation and VuMark Op Modes to demonstrate how to use an internal phone-based camera and an external UVC webcam. Support for improved motor control. REV Robotics Expansion Hub firmware 1.8 and greater will support a feed forward mechanism for closed loop motor control. FTC SDK has been modified to support PIDF coefficients (proportional, integral, derivative, and feed forward). FTC Blocks development tool modified to include PIDF programming blocks. Deprecated older PID-related methods and variables. REV's 1.8.x PIDF-related changes provide a more linear and accurate way to control a motor. Wireless Added 5GHz support for wireless channel changing for those devices that support it. Tested with Moto G5 and E4 phones. Also tested with other (currently non-approved) phones such as Samsung Galaxy S8. Improved Expansion Hub firmware update support in Robot Controller app Changes to make the system more robust during the firmware update process (when performed through Robot Controller app). User no longer has to disconnect a downstream daisy-chained Expansion Hub when updating an Expansion Hub's firmware. If user is updating an Expansion Hub's firmware through a USB connection, he/she does not have to disconnect RS485 connection to other Expansion Hubs. The user still must use a USB connection to update an Expansion Hub's firmware. The user cannot update the Expansion Hub firmware for a downstream device that is daisy chained through an RS485 connection. If an Expansion Hub accidentally gets "bricked" the Robot Controller app is now more likely to recognize the Hub when it scans the USB bus. Robot Controller app should be able to detect an Expansion Hub, even if it accidentally was bricked in a previous update attempt. Robot Controller app should be able to install the firmware onto the Hub, even if if accidentally was bricked in a previous update attempt. Resiliency FTC software can detect and enable an FTDI reset feature that is available with REV Robotics v1.8 Expansion Hub firmware and greater. When enabled, the Expansion Hub can detect if it hasn't communicated with the Robot Controller over the FTDI (USB) connection. If the Hub hasn't heard from the Robot Controller in a while, it will reset the FTDI connection. This action helps system recover from some ESD-induced disruptions. Various fixes to improve reliability of FTC software. Blocks Fixed errors with string and list indices in blocks export to java. Support for USB connected UVC webcams. Refactored optimized Blocks Vuforia code to support Rover Ruckus image targets. Added programming blocks to support PIDF (proportional, integral, derivative and feed forward) motor control. Added formatting options (under Telemetry and Miscellaneous categories) so user can set how many decimal places to display a numerical value. Support to play audio files (which are uploaded through Blocks web interface) on Driver Station in addition to the Robot Controller. Fixed bug with Download Image of Blocks feature. Support for REV Robotics Blinkin LED Controller. Support for REV Robotics 2m Distance Sensor. Added support for a REV Touch Sensor (no longer have to configure as a generic digital device). Added blocks for DcMotorEx methods. These are enhanced methods that you can use when supported by the motor controller hardware. The REV Robotics Expansion Hub supports these enhanced methods. Enhanced methods include methods to get/set motor velocity (in encoder pulses per second), get/set PIDF coefficients, etc.. Modest Improvements in Logging Decrease frequency of battery checker voltage statements. Removed non-FTC related log statements (wherever possible). Introduced a "Match Logging" feature. Under "Settings" a user can enable/disable this feature (it's disabled by default). If enabled, user provides a "Match Number" through the Driver Station user interface (top of the screen). The Match Number is used to create a log file specifically with log statements from that particular Op Mode run. Match log files are stored in /sdcard/FIRST/matlogs on the Robot Controller. Once an op mode run is complete, the Match Number is cleared. This is a convenient way to create a separate match log with statements only related to a specific op mode run. New Devices Support for REV Robotics Blinkin LED Controller. Support for REV Robotics 2m Distance Sensor. Added configuration option for REV 20:1 HD Hex Motor. Added support for a REV Touch Sensor (no longer have to configure as a generic digital device). Miscellaneous Fixed some errors in the definitions for acceleration and velocity in our javadoc documentation. Added ability to play audio files on Driver Station When user is configuring an Expansion Hub, the LED on the Expansion Hub will change blink pattern (purple-cyan) to indicate which Hub is currently being configured. Renamed I2cSensorType to I2cDeviceType. Added an external sample Op Mode that demonstrates localization using 2018-2019 (Rover Ruckus presented by QualComm) Vuforia targets. Added an external sample Op Mode that demonstrates how to use the REV Robotics 2m Laser Distance Sensor. Added an external sample Op Mode that demonstrates how to use the REV Robotics Blinkin LED Controller. Re-categorized external Java sample Op Modes to "TeleOp" instead of "Autonomous". Known issues: Initial support for UVC compatible cameras UVC cameras seem to draw significant amount of current from the USB bus. This does not appear to present any problems for the REV Robotics Control Hub. This does seem to create stability problems when using some cameras with an Android phone-based Robot Controller. FTC Tech Team is investigating options to mitigate this issue with the phone-based Robot Controllers. There might be a possible deadlock which causes the RC to become unresponsive when using a UVC webcam with a Nougat Android Robot Controller. Wireless When user selects a wireless channel, this channel does not necessarily persist if the phone is power cycled. Tech Team is hoping to eventually address this issue in a future release. Issue has been present since apps were introduced (i.e., it is not new with the v4.0 release). Wireless channel is not currently displayed for WiFi Direct connections. Miscellaneous The blink indication feature that shows which Expansion Hub is currently being configured does not work for a newly created configuration file. User has to first save a newly created configuration file and then close and re-edit the file in order for blink indicator to work. Version 3.6 (built on 17.12.18) Changes include: Blocks Changes Uses updated Google Blockly software to allow users to edit their op modes on Apple iOS devices (including iPad and iPhone). Improvement in Blocks tool to handle corrupt op mode files. Autonomous op modes should no longer get switched back to tele-op after re-opening them to be edited. The system can now detect type mismatches during runtime and alert the user with a message on the Driver Station. Updated javadoc documentation for setPower() method to reflect correct range of values (-1 to +1). Modified VuforiaLocalizerImpl to allow for user rendering of frames Added a user-overrideable onRenderFrame() method which gets called by the class's renderFrame() method. Version 3.5 (built on 17.10.30) Changes with version 3.5 include: Introduced a fix to prevent random op mode stops, which can occur after the Robot Controller app has been paused and then resumed (for example, when a user temporarily turns off the display of the Robot Controller phone, and then turns the screen back on). Introduced a fix to prevent random op mode stops, which were previously caused by random peer disconnect events on the Driver Station. Fixes issue where log files would be closed on pause of the RC or DS, but not re-opened upon resume. Fixes issue with battery handler (voltage) start/stop race. Fixes issue where Android Studio generated op modes would disappear from available list in certain situations. Fixes problem where OnBot Java would not build on REV Robotics Control Hub. Fixes problem where OnBot Java would not build if the date and time on the Robot Controller device was "rewound" (set to an earlier date/time). Improved error message on OnBot Java that occurs when renaming a file fails. Removed unneeded resources from android.jar binaries used by OnBot Java to reduce final size of Robot Controller app. Added MR_ANALOG_TOUCH_SENSOR block to Blocks Programming Tool. Version 3.4 (built on 17.09.06) Changes with version 3.4 include: Added telemetry.update() statement for BlankLinearOpMode template. Renamed sample Block op modes to be more consistent with Java samples. Added some additional sample Block op modes. Reworded OnBot Java readme slightly. Version 3.3 (built on 17.09.04) This version of the software includes improves for the FTC Blocks Programming Tool and the OnBot Java Programming Tool. Changes with verion 3.3 include: Android Studio ftc_app project has been updated to use Gradle Plugin 2.3.3. Android Studio ftc_app project is already using gradle 3.5 distribution. Robot Controller log has been renamed to /sdcard/RobotControllerLog.txt (note that this change was actually introduced w/ v3.2). Improvements in I2C reliability. Optimized I2C read for REV Expansion Hub, with v1.7 firmware or greater. Updated all external/samples (available through OnBot and in Android project folder). Vuforia Added support for VuMarks that will be used for the 2017-2018 season game. Blocks Update to latest Google Blockly release. Sample op modes can be selected as a template when creating new op mode. Fixed bug where the blocks would disappear temporarily when mouse button is held down. Added blocks for Range.clip and Range.scale. User can now disable/enable Block op modes. Fix to prevent occasional Blocks deadlock. OnBot Java Significant improvements with autocomplete function for OnBot Java editor. Sample op modes can be selected as a template when creating new op mode. Fixes and changes to complete hardware setup feature. Updated (and more useful) onBot welcome message. Known issues: Android Studio After updating to the new v3.3 Android Studio project folder, if you get error messages indicating "InvalidVirtualFileAccessException" then you might need to do a File->Invalidate Caches / Restart to clear the error. OnBot Java Sometimes when you push the build button to build all op modes, the RC returns an error message that the build failed. If you press the build button a second time, the build typically suceeds. Version 3.2 (built on 17.08.02) This version of the software introduces the "OnBot Java" Development Tool. Similar to the FTC Blocks Development Tool, the FTC OnBot Java Development Tool allows a user to create, edit and build op modes dynamically using only a Javascript-enabled web browser. The OnBot Java Development Tool is an integrated development environment (IDE) that is served up by the Robot Controller. Op modes are created and edited using a Javascript-enabled browser (Google Chromse is recommended). Op modes are saved on the Robot Controller Android device directly. The OnBot Java Development Tool provides a Java programming environment that does NOT need Android Studio. Changes with version 3.2 include: Enhanced web-based development tools Introduction of OnBot Java Development Tool. Web-based programming and management features are "always on" (user no longer needs to put Robot Controller into programming mode). Web-based management interface (where user can change Robot Controller name and also easily download Robot Controller log file). OnBot Java, Blocks and Management features available from web based interface. Blocks Programming Development Tool: Changed "LynxI2cColorRangeSensor" block to "REV Color/range sensor" block. Fixed tooltip for ColorSensor.isLightOn block. Added blocks for ColorSensor.getNormalizedColors and LynxI2cColorRangeSensor.getNormalizedColors. Added example op modes for digital touch sensor and REV Robotics Color Distance sensor. User selectable color themes. Includes many minor enhancements and fixes (too numerous to list). Known issues: Auto complete function is incomplete and does not support the following (for now): Access via this keyword Access via super keyword Members of the super cloass, not overridden by the class Any methods provided in the current class Inner classes Can't handle casted objects Any objects coming from an parenthetically enclosed expression Version 3.10 (built on 17.05.09) This version of the software provides support for the REV Robotics Expansion Hub. This version also includes improvements in the USB communication layer in an effort to enhance system resiliency. If you were using a 2.x version of the software previously, updating to version 3.1 requires that you also update your Driver Station software in addition to updating the Robot Controller software. Also note that in version 3.10 software, the setMaxSpeed and getMaxSpeed methods are no longer available (not deprecated, they have been removed from the SDK). Also note that the the new 3.x software incorporates motor profiles that a user can select as he/she configures the robot. Changes include: Blocks changes Added VuforiaTrackableDefaultListener.getPose and Vuforia.trackPose blocks. Added optimized blocks support for Vuforia extended tracking. Added atan2 block to the math category. Added useCompetitionFieldTargetLocations parameter to Vuforia.initialize block. If set to false, the target locations are placed at (0,0,0) with target orientation as specified in https://github.com/gearsincorg/FTCVuforiaDemo/blob/master/Robot_Navigation.java tutorial op mode. Incorporates additional improvements to USB comm layer to improve system resiliency (to recover from a greater number of communication disruptions). Additional Notes Regarding Version 3.00 (built on 17.04.13) In addition to the release changes listed below (see section labeled "Version 3.00 (built on 17.04.013)"), version 3.00 has the following important changes: Version 3.00 software uses a new version of the FTC Robocol (robot protocol). If you upgrade to v3.0 on the Robot Controller and/or Android Studio side, you must also upgrade the Driver Station software to match the new Robocol. Version 3.00 software removes the setMaxSpeed and getMaxSpeed methods from the DcMotor class. If you have an op mode that formerly used these methods, you will need to remove the references/calls to these methods. Instead, v3.0 provides the max speed information through the use of motor profiles that are selected by the user during robot configuration. Version 3.00 software currently does not have a mechanism to disable extra i2c sensors. We hope to re-introduce this function with a release in the near future. Version 3.00 (built on 17.04.13) *** Use this version of the software at YOUR OWN RISK!!! *** This software is being released as an "alpha" version. Use this version at your own risk! This pre-release software contains SIGNIFICANT changes, including changes to the Wi-Fi Direct pairing mechanism, rewrites of the I2C sensor classes, changes to the USB/FTDI layer, and the introduction of support for the REV Robotics Expansion Hub and the REV Robotics color-range-light sensor. These changes were implemented to improve the reliability and resiliency of the FTC control system. Please note, however, that version 3.00 is considered "alpha" code. This code is being released so that the FIRST community will have an opportunity to test the new REV Expansion Hub electronics module when it becomes available in May. The developers do not recommend using this code for critical applications (i.e., competition use). *** Use this version of the software at YOUR OWN RISK!!! *** Changes include: Major rework of sensor-related infrastructure. Includes rewriting sensor classes to implement synchronous I2C communication. Fix to reset Autonomous timer back to 30 seconds. Implementation of specific motor profiles for approved 12V motors (includes Tetrix, AndyMark, Matrix and REV models). Modest improvements to enhance Wi-Fi P2P pairing. Fixes telemetry log addition race. Publishes all the sources (not just a select few). Includes Block programming improvements Addition of optimized Vuforia blocks. Auto scrollbar to projects and sounds pages. Fixed blocks paste bug. Blocks execute after while-opModeIsActive loop (to allow for cleanup before exiting op mode). Added gyro integratedZValue block. Fixes bug with projects page for Firefox browser. Added IsSpeaking block to AndroidTextToSpeech. Implements support for the REV Robotics Expansion Hub Implements support for integral REV IMU (physically installed on I2C bus 0, uses same Bosch BNO055 9 axis absolute orientation sensor as Adafruit 9DOF abs orientation sensor). - Implements support for REV color/range/light sensor. Provides support to update Expansion Hub firmware through FTC SDK. Detects REV firmware version and records in log file. Includes support for REV Control Hub (note that the REV Control Hub is not yet approved for FTC use). Implements FTC Blocks programming support for REV Expansion Hub and sensor hardware. Detects and alerts when I2C device disconnect. Version 2.62 (built on 17.01.07) Added null pointer check before calling modeToByte() in finishModeSwitchIfNecessary method for ModernRoboticsUsbDcMotorController class. Changes to enhance Modern Robotics USB protocol robustness. Version 2.61 (released on 16.12.19) Blocks Programming mode changes: Fix to correct issue when an exception was thrown because an OpticalDistanceSensor object appears twice in the hardware map (the second time as a LightSensor). Version 2.6 (released on 16.12.16) Fixes for Gyro class: Improve (decrease) sensor refresh latency. fix isCalibrating issues. Blocks Programming mode changes: Blocks now ignores a device in the configuration xml if the name is empty. Other devices work in configuration work fine. Version 2.5 (internal release on released on 16.12.13) Blocks Programming mode changes: Added blocks support for AdafruitBNO055IMU. Added Download Op Mode button to FtcBocks.html. Added support for copying blocks in one OpMode and pasting them in an other OpMode. The clipboard content is stored on the phone, so the programming mode server must be running. Modified Utilities section of the toolbox. In Programming Mode, display information about the active connections. Fixed paste location when workspace has been scrolled. Added blocks support for the android Accelerometer. Fixed issue where Blocks Upload Op Mode truncated name at first dot. Added blocks support for Android SoundPool. Added type safety to blocks for Acceleration. Added type safety to blocks for AdafruitBNO055IMU.Parameters. Added type safety to blocks for AnalogInput. Added type safety to blocks for AngularVelocity. Added type safety to blocks for Color. Added type safety to blocks for ColorSensor. Added type safety to blocks for CompassSensor. Added type safety to blocks for CRServo. Added type safety to blocks for DigitalChannel. Added type safety to blocks for ElapsedTime. Added type safety to blocks for Gamepad. Added type safety to blocks for GyroSensor. Added type safety to blocks for IrSeekerSensor. Added type safety to blocks for LED. Added type safety to blocks for LightSensor. Added type safety to blocks for LinearOpMode. Added type safety to blocks for MagneticFlux. Added type safety to blocks for MatrixF. Added type safety to blocks for MrI2cCompassSensor. Added type safety to blocks for MrI2cRangeSensor. Added type safety to blocks for OpticalDistanceSensor. Added type safety to blocks for Orientation. Added type safety to blocks for Position. Added type safety to blocks for Quaternion. Added type safety to blocks for Servo. Added type safety to blocks for ServoController. Added type safety to blocks for Telemetry. Added type safety to blocks for Temperature. Added type safety to blocks for TouchSensor. Added type safety to blocks for UltrasonicSensor. Added type safety to blocks for VectorF. Added type safety to blocks for Velocity. Added type safety to blocks for VoltageSensor. Added type safety to blocks for VuforiaLocalizer.Parameters. Added type safety to blocks for VuforiaTrackable. Added type safety to blocks for VuforiaTrackables. Added type safety to blocks for enums in AdafruitBNO055IMU.Parameters. Added type safety to blocks for AndroidAccelerometer, AndroidGyroscope, AndroidOrientation, and AndroidTextToSpeech. Version 2.4 (released on 16.11.13) Fix to avoid crashing for nonexistent resources. Blocks Programming mode changes: Added blocks to support OpenGLMatrix, MatrixF, and VectorF. Added blocks to support AngleUnit, AxesOrder, AxesReference, CameraDirection, CameraMonitorFeedback, DistanceUnit, and TempUnit. Added blocks to support Acceleration. Added blocks to support LinearOpMode.getRuntime. Added blocks to support MagneticFlux and Position. Fixed typos. Made blocks for ElapsedTime more consistent with other objects. Added blocks to support Quaternion, Velocity, Orientation, AngularVelocity. Added blocks to support VuforiaTrackables, VuforiaTrackable, VuforiaLocalizer, VuforiaTrackableDefaultListener. Fixed a few blocks. Added type checking to new blocks. Updated to latest blockly. Added default variable blocks to navigation and matrix blocks. Fixed toolbox entry for openGLMatrix_rotation_withAxesArgs. When user downloads Blocks-generated op mode, only the .blk file is downloaded. When user uploads Blocks-generated op mode (.blk file), Javascript code is auto generated. Added DbgLog support. Added logging when a blocks file is read/written. Fixed bug to properly render blocks even if missing devices from configuration file. Added support for additional characters (not just alphanumeric) for the block file names (for download and upload). Added support for OpMode flavor (“Autonomous” or “TeleOp”) and group. Changes to Samples to prevent tutorial issues. Incorporated suggested changes from public pull 216 (“Replace .. paths”). Remove Servo Glitches when robot stopped. if user hits “Cancels” when editing a configuration file, clears the unsaved changes and reverts to original unmodified configuration. Added log info to help diagnose why the Robot Controller app was terminated (for example, by watch dog function). Added ability to transfer log from the controller. Fixed inconsistency for AngularVelocity Limit unbounded growth of data for telemetry. If user does not call telemetry.update() for LinearOpMode in a timely manner, data added for telemetry might get lost if size limit is exceeded. Version 2.35 (released on 16.10.06) Blockly programming mode - Removed unnecesary idle() call from blocks for new project. Version 2.30 (released on 16.10.05) Blockly programming mode: Mechanism added to save Blockly op modes from Programming Mode Server onto local device To avoid clutter, blocks are displayed in categorized folders Added support for DigitalChannel Added support for ModernRoboticsI2cCompassSensor Added support for ModernRoboticsI2cRangeSensor Added support for VoltageSensor Added support for AnalogInput Added support for AnalogOutput Fix for CompassSensor setMode block Vuforia Fix deadlock / make camera data available while Vuforia is running. Update to Vuforia 6.0.117 (recommended by Vuforia and Google to close security loophole). Fix for autonomous 30 second timer bug (where timer was in effect, even though it appeared to have timed out). opModeIsActive changes to allow cleanup after op mode is stopped (with enforced 2 second safety timeout). Fix to avoid reading i2c twice. Updated sample Op Modes. Improved logging and fixed intermittent freezing. Added digital I/O sample. Cleaned up device names in sample op modes to be consistent with Pushbot guide. Fix to allow use of IrSeekerSensorV3. Version 2.20 (released on 16.09.08) Support for Modern Robotics Compass Sensor. Support for Modern Robotics Range Sensor. Revise device names for Pushbot templates to match the names used in Pushbot guide. Fixed bug so that IrSeekerSensorV3 device is accessible as IrSeekerSensor in hardwareMap. Modified computer vision code to require an individual Vuforia license (per legal requirement from PTC). Minor fixes. Blockly enhancements: Support for Voltage Sensor. Support for Analog Input. Support for Analog Output. Support for Light Sensor. Support for Servo Controller. Version 2.10 (released on 16.09.03) Support for Adafruit IMU. Improvements to ModernRoboticsI2cGyro class Block on reset of z axis. isCalibrating() returns true while gyro is calibration. Updated sample gyro program. Blockly enhancements support for android.graphics.Color. added support for ElapsedTime. improved look and legibility of blocks. support for compass sensor. support for ultrasonic sensor. support for IrSeeker. support for LED. support for color sensor. support for CRServo prompt user to configure robot before using programming mode. Provides ability to disable audio cues. various bug fixes and improvements. Version 2.00 (released on 16.08.19) This is the new release for the upcoming 2016-2017 FIRST Tech Challenge Season. Channel change is enabled in the FTC Robot Controller app for Moto G 2nd and 3rd Gen phones. Users can now use annotations to register/disable their Op Modes. Changes in the Android SDK, JDK and build tool requirements (minsdk=19, java 1.7, build tools 23.0.3). Standardized units in analog input. Cleaned up code for existing analog sensor classes. setChannelMode and getChannelMode were REMOVED from the DcMotorController class. This is important - we no longer set the motor modes through the motor controller. setMode and getMode were added to the DcMotor class. ContinuousRotationServo class has been added to the FTC SDK. Range.clip() method has been overloaded so it can support this operation for int, short and byte integers. Some changes have been made (new methods added) on how a user can access items from the hardware map. Users can now set the zero power behavior for a DC motor so that the motor will brake or float when power is zero. Prototype Blockly Programming Mode has been added to FTC Robot Controller. Users can place the Robot Controller into this mode, and then use a device (such as a laptop) that has a Javascript enabled browser to write Blockly-based Op Modes directly onto the Robot Controller. Users can now configure the robot remotely through the FTC Driver Station app. Android Studio project supports Android Studio 2.1.x and compile SDK Version 23 (Marshmallow). Vuforia Computer Vision SDK integrated into FTC SDK. Users can use sample vision targets to get localization information on a standard FTC field. Project structure has been reorganized so that there is now a TeamCode package that users can use to place their local/custom Op Modes into this package. Inspection function has been integrated into the FTC Robot Controller and Driver Station Apps (Thanks Team HazMat… 9277 & 10650!). Audio cues have been incorporated into FTC SDK. Swap mechanism added to FTC Robot Controller configuration activity. For example, if you have two motor controllers on a robot, and you misidentified them in your configuration file, you can use the Swap button to swap the devices within the configuration file (so you do not have to manually re-enter in the configuration info for the two devices). Fix mechanism added to all user to replace an electronic module easily. For example, suppose a servo controller dies on your robot. You replace the broken module with a new module, which has a different serial number from the original servo controller. You can use the Fix button to automatically reconfigure your configuration file to use the serial number of the new module. Improvements made to fix resiliency and responsiveness of the system. For LinearOpMode the user now must for a telemetry.update() to update the telemetry data on the driver station. This update() mechanism ensures that the driver station gets the updated data properly and at the same time. The Auto Configure function of the Robot Controller is now template based. If there is a commonly used robot configuration, a template can be created so that the Auto Configure mechanism can be used to quickly configure a robot of this type. The logic to detect a runaway op mode (both in the LinearOpMode and OpMode types) and to abort the run, then auto recover has been improved/implemented. Fix has been incorporated so that Logitech F310 gamepad mappings will be correct for Marshmallow users. Release 16.07.08 For the ftc_app project, the gradle files have been modified to support Android Studio 2.1.x. Release 16.03.30 For the MIT App Inventor, the design blocks have new icons that better represent the function of each design component. Some changes were made to the shutdown logic to ensure the robust shutdown of some of our USB services. A change was made to LinearOpMode so as to allow a given instance to be executed more than once, which is required for the App Inventor. Javadoc improved/updated. Release 16.03.09 Changes made to make the FTC SDK synchronous (significant change!) waitOneFullHardwareCycle() and waitForNextHardwareCycle() are no longer needed and have been deprecated. runOpMode() (for a LinearOpMode) is now decoupled from the system's hardware read/write thread. loop() (for an OpMode) is now decoupled from the system's hardware read/write thread. Methods are synchronous. For example, if you call setMode(DcMotorController.RunMode.RESET_ENCODERS) for a motor, the encoder is guaranteed to be reset when the method call is complete. For legacy module (NXT compatible), user no longer has to toggle between read and write modes when reading from or writing to a legacy device. Changes made to enhance reliability/robustness during ESD event. Changes made to make code thread safe. Debug keystore added so that user-generated robot controller APKs will all use the same signed key (to avoid conflicts if a team has multiple developer laptops for example). Firmware version information for Modern Robotics modules are now logged. Changes made to improve USB comm reliability and robustness. Added support for voltage indicator for legacy (NXT-compatible) motor controllers. Changes made to provide auto stop capabilities for op modes. A LinearOpMode class will stop when the statements in runOpMode() are complete. User does not have to push the stop button on the driver station. If an op mode is stopped by the driver station, but there is a run away/uninterruptible thread persisting, the app will log an error message then force itself to crash to stop the runaway thread. Driver Station UI modified to display lowest measured voltage below current voltage (12V battery). Driver Station UI modified to have color background for current voltage (green=good, yellow=caution, red=danger, extremely low voltage). javadoc improved (edits and additional classes). Added app build time to About activity for driver station and robot controller apps. Display local IP addresses on Driver Station About activity. Added I2cDeviceSynchImpl. Added I2cDeviceSync interface. Added seconds() and milliseconds() to ElapsedTime for clarity. Added getCallbackCount() to I2cDevice. Added missing clearI2cPortActionFlag. Added code to create log messages while waiting for LinearOpMode shutdown. Fix so Wifi Direct Config activity will no longer launch multiple times. Added the ability to specify an alternate i2c address in software for the Modern Robotics gyro. Release 16.02.09 Improved battery checker feature so that voltage values get refreshed regularly (every 250 msec) on Driver Station (DS) user interface. Improved software so that Robot Controller (RC) is much more resilient and “self-healing” to USB disconnects: If user attempts to start/restart RC with one or more module missing, it will display a warning but still start up. When running an op mode, if one or more modules gets disconnected, the RC & DS will display warnings,and robot will keep on working in spite of the missing module(s). If a disconnected module gets physically reconnected the RC will auto detect the module and the user will regain control of the recently connected module. Warning messages are more helpful (identifies the type of module that’s missing plus its USB serial number). Code changes to fix the null gamepad reference when users try to reference the gamepads in the init() portion of their op mode. NXT light sensor output is now properly scaled. Note that teams might have to readjust their light threshold values in their op modes. On DS user interface, gamepad icon for a driver will disappear if the matching gamepad is disconnected or if that gamepad gets designated as a different driver. Robot Protocol (ROBOCOL) version number info is displayed in About screen on RC and DS apps. Incorporated a display filter on pairing screen to filter out devices that don’t use the “-“ format. This filter can be turned off to show all WiFi Direct devices. Updated text in License file. Fixed formatting error in OpticalDistanceSensor.toString(). Fixed issue on with a blank (“”) device name that would disrupt WiFi Direct Pairing. Made a change so that the WiFi info and battery info can be displayed more quickly on the DS upon connecting to RC. Improved javadoc generation. Modified code to make it easier to support language localization in the future. Release 16.01.04 Updated compileSdkVersion for apps Prevent Wifi from entering power saving mode removed unused import from driver station Corrrected "Dead zone" joystick code. LED.getDeviceName and .getConnectionInfo() return null apps check for ROBOCOL_VERSION mismatch Fix for Telemetry also has off-by-one errors in its data string sizing / short size limitations error User telemetry output is sorted. added formatting variants to DbgLog and RobotLog APIs code modified to allow for a long list of op mode names. changes to improve thread safety of RobocolDatagramSocket Fix for "missing hardware leaves robot controller disconnected from driver station" error fix for "fast tapping of Init/Start causes problems" (toast is now only instantiated on UI thread). added some log statements for thread life cycle. moved gamepad reset logic inside of initActiveOpMode() for robustness changes made to mitigate risk of race conditions on public methods. changes to try and flag when WiFi Direct name contains non-printable characters. fix to correct race condition between .run() and .close() in ReadWriteRunnableStandard. updated FTDI driver made ReadWriteRunnableStanard interface public. fixed off-by-one errors in Command constructor moved specific hardware implmentations into their own package. moved specific gamepad implemnatations to the hardware library. changed LICENSE file to new BSD version. fixed race condition when shutting down Modern Robotics USB devices. methods in the ColorSensor classes have been synchronized. corrected isBusy() status to reflect end of motion. corrected "back" button keycode. the notSupported() method of the GyroSensor class was changed to protected (it should not be public). Release 15.11.04.001 Added Support for Modern Robotics Gyro. The GyroSensor class now supports the MR Gyro Sensor. Users can access heading data (about Z axis) Users can also access raw gyro data (X, Y, & Z axes). Example MRGyroTest.java op mode included. Improved error messages More descriptive error messages for exceptions in user code. Updated DcMotor API Enable read mode on new address in setI2cAddress Fix so that driver station app resets the gamepads when switching op modes. USB-related code changes to make USB comm more responsive and to display more explicit error messages. Fix so that USB will recover properly if the USB bus returns garbage data. Fix USB initializtion race condition. Better error reporting during FTDI open. More explicit messages during USB failures. Fixed bug so that USB device is closed if event loop teardown method was not called. Fixed timer UI issue Fixed duplicate name UI bug (Legacy Module configuration). Fixed race condition in EventLoopManager. Fix to keep references stable when updating gamepad. For legacy Matrix motor/servo controllers removed necessity of appending "Motor" and "Servo" to controller names. Updated HT color sensor driver to use constants from ModernRoboticsUsbLegacyModule class. Updated MR color sensor driver to use constants from ModernRoboticsUsbDeviceInterfaceModule class. Correctly handle I2C Address change in all color sensors Updated/cleaned up op modes. Updated comments in LinearI2cAddressChange.java example op mode. Replaced the calls to "setChannelMode" with "setMode" (to match the new of the DcMotor method). Removed K9AutoTime.java op mode. Added MRGyroTest.java op mode (demonstrates how to use MR Gyro Sensor). Added MRRGBExample.java op mode (demonstrates how to use MR Color Sensor). Added HTRGBExample.java op mode (demonstrates how to use HT legacy color sensor). Added MatrixControllerDemo.java (demonstrates how to use legacy Matrix controller). Updated javadoc documentation. Updated release .apk files for Robot Controller and Driver Station apps. Release 15.10.06.002 Added support for Legacy Matrix 9.6V motor/servo controller. Cleaned up build.gradle file. Minor UI and bug fixes for driver station and robot controller apps. Throws error if Ultrasonic sensor (NXT) is not configured for legacy module port 4 or 5. Release 15.08.03.001 New user interfaces for FTC Driver Station and FTC Robot Controller apps. An init() method is added to the OpMode class. For this release, init() is triggered right before the start() method. Eventually, the init() method will be triggered when the user presses an "INIT" button on driver station. The init() and loop() methods are now required (i.e., need to be overridden in the user's op mode). The start() and stop() methods are optional. A new LinearOpMode class is introduced. Teams can use the LinearOpMode mode to create a linear (not event driven) program model. Teams can use blocking statements like Thread.sleep() within a linear op mode. The API for the Legacy Module and Core Device Interface Module have been updated. Support for encoders with the Legacy Module is now working. The hardware loop has been updated for better performance.
sammycage / PlutofilterA single-header, zero-allocation image filter library in C
board707 / DMD STM32STM32Duino library for RGB, Monochrome and Two-color led matrix panels
PixiColorEffects / Pixi Color EffectsA various color Matrix filters and Presets for pixi.js
lighttransport / ColorcorrectionmatrixCompute color correction matrix in python and C++
marcmerlin / LED MatrixSingle/bi/tri-color LED Matrix PWM driver for arduino (direct IO or Shift Register connected)
rprokap / EntremanureOnce upon a time there was a lovely princess. But she had an enchantment upon her of a fearful sort which could only be broken by love's first kiss. She was locked away in a castle guarded by a terrible fire-breathing dragon. Many brave knights had attempted to free her from this dreadful prison, but non prevailed. She waited in the dragon's keep in the highest room of the tallest tower for her true love and true love's first kiss. (laughs) Like that's ever gonna happen. What a load of - (toilet flush) Allstar - by Smashmouth begins to play. Shrek goes about his day. While in a nearby town, the villagers get together to go after the ogre. NIGHT - NEAR SHREK'S HOME MAN1 Think it's in there? MAN2 All right. Let's get it! MAN1 Whoa. Hold on. Do you know what that thing can do to you? MAN3 Yeah, it'll grind your bones for it's bread. Shrek sneaks up behind them and laughs. SHREK Yes, well, actually, that would be a giant. Now, ogres, oh they're much worse. They'll make a suit from your freshly peeled skin. MEN No! SHREK They'll shave your liver. Squeeze the jelly from your eyes! Actually, it's quite good on toast. MAN1 Back! Back, beast! Back! I warn ya! (waves the torch at Shrek.) Shrek calmly licks his fingers and extinguishes the torch. The men shrink back away from him. Shrek roars very loudly and long and his breath extinguishes all the remaining torches until the men are in the dark. SHREK This is the part where you run away. (The men scramble to get away. He laughs.) And stay out! (looks down and picks up a piece of paper. Reads.) "Wanted. Fairy tale creatures."(He sighs and throws the paper over his shoulder.) THE NEXT DAY There is a line of fairy tale creatures. The head of the guard sits at a table paying people for bringing the fairy tale creatures to him. There are cages all around. Some of the people in line are Peter Pan, who is carrying Tinkerbell in a cage, Gipetto who's carrying Pinocchio, and a farmer who is carrying the three little pigs. GUARD All right. This one's full. Take it away! Move it along. Come on! Get up! HEAD GUARD Next! GUARD (taking the witch's broom) Give me that! Your flying days are over. (breaks the broom in half) HEAD GUARD That's 20 pieces of silver for the witch. Next! GUARD Get up! Come on! HEAD GUARD Twenty pieces. LITTLE BEAR (crying) This cage is too small. DONKEY Please, don't turn me in. I'll never be stubborn again. I can change. Please! Give me another chance! OLD WOMAN Oh, shut up. (jerks his rope) DONKEY Oh! HEAD GUARD Next! What have you got? GIPETTO This little wooden puppet. PINOCCHIO I'm not a puppet. I'm a real boy. (his nose grows) HEAD GUARD Five shillings for the possessed toy. Take it away. PINOCCHIO Father, please! Don't let them do this! Help me! Gipetto takes the money and walks off. The old woman steps up to the table. HEAD GUARD Next! What have you got? OLD WOMAN Well, I've got a talking donkey. HEAD GUARD Right. Well, that's good for ten shillings, if you can prove it. OLD WOMAN Oh, go ahead, little fella. Donkey just looks up at her. HEAD GUARD Well? OLD WOMAN Oh, oh, he's just...he's just a little nervous. He's really quite a chatterbox. Talk, you boneheaded dolt... HEAD GUARD That's it. I've heard enough. Guards! OLD WOMAN No, no, he talks! He does. (pretends to be Donkey) I can talk. I love to talk. I'm the talkingest damn thing you ever saw. HEAD GUARD Get her out of my sight. OLD WOMAN No, no! I swear! Oh! He can talk! The guards grab the old woman and she struggles with them. One of her legs flies out and kicks Tinkerbell out of Peter Pan's hands, and her cage drops on Donkey's head. He gets sprinkled with fairy dust and he's able to fly. DONKEY Hey! I can fly! PETER PAN He can fly! 3 LITTLE PIGS He can fly! HEAD GUARD He can talk! DONKEY Ha, ha! That's right, fool! Now I'm a flying, talking donkey. You might have seen a housefly, maybe even a superfly but I bet you ain't never seen a donkey fly. Ha, ha! (the pixie dust begins to wear off) Uh-oh. (he begins to sink to the ground.) He hits the ground with a thud. HEAD GUARD Seize him! (Donkey takes of running.) After him! GUARDS He's getting away! Get him! This way! Turn! Donkey keeps running and he eventually runs into Shrek. Literally. Shrek turns around to see who bumped into him. Donkey looks scared for a moment then he spots the guards coming up the path. He quickly hides behind Shrek. HEAD GUARD You there. Ogre! SHREK Aye? HEAD GUARD By the order of Lord Farquaad I am authorized to place you both under arrest and transport you to a designated resettlement facility. SHREK Oh, really? You and what army? He looks behind the guard and the guard turns to look as well and we see that the other men have run off. The guard tucks tail and runs off. Shrek laughs and goes back about his business and begins walking back to his cottage. DONKEY Can I say something to you? Listen, you was really, really, really somethin' back here. Incredible! SHREK Are you talkin' to...(he turns around and Donkey is gone) me? (he turns back around and Donkey is right in front of him.) Whoa! DONKEY Yes. I was talkin' to you. Can I tell you that you that you was great back here? Those guards! They thought they was all of that. Then you showed up, and bam! They was trippin' over themselves like babes in the woods. That really made me feel good to see that. SHREK Oh, that's great. Really. DONKEY Man, it's good to be free. SHREK Now, why don't you go celebrate your freedom with your own friends? Hmm? DONKEY But, uh, I don't have any friends. And I'm not goin' out there by myself. Hey, wait a minute! I got a great idea! I'll stick with you. You're mean, green, fightin' machine. Together we'll scare the spit out of anybody that crosses us. Shrek turns and regards Donkey for a moment before roaring very loudly. DONKEY Oh, wow! That was really scary. If you don't mind me sayin', if that don't work, your breath certainly will get the job done, 'cause you definitely need some Tic Tacs or something, 'cause you breath stinks! You almost burned the hair outta my nose, just like the time...(Shrek covers his mouth but Donkey continues to talk, so Shrek removes his hand.) ...then I ate some rotten berries. I had strong gases leaking out of my butt that day. SHREK Why are you following me? DONKEY I'll tell you why. (singing) 'Cause I'm all alone, There's no one here beside me, My problems have all gone, There's no one to deride me, But you gotta have faith... SHREK Stop singing! It's no wonder you don't have any friends. DONKEY Wow. Only a true friend would be that cruelly honest. SHREK Listen, little donkey. Take a look at me. What am I? DONKEY (looks all the way up at Shrek) Uh ...really tall? SHREK No! I'm an ogre! You know. "Grab your torch and pitchforks." Doesn't that bother you? DONKEY Nope. SHREK Really? DONKEY Really, really. SHREK Oh. DONKEY Man, I like you. What's you name? SHREK Uh, Shrek. DONKEY Shrek? Well, you know what I like about you, Shrek? You got that kind of I-don't-care-what-nobody-thinks-of-me thing. I like that. I respect that, Shrek. You all right. (They come over a hill and you can see Shrek's cottage.) Whoa! Look at that. Who'd want to live in place like that? SHREK That would be my home. DONKEY Oh! And it is lovely! Just beautiful. You know you are quite a decorator. It's amazing what you've done with such a modest budget. I like that boulder. That is a nice boulder. I guess you don't entertain much, do you? SHREK I like my privacy. DONKEY You know, I do too. That's another thing we have in common. Like I hate it when you got somebody in your face. You've trying to give them a hint, and they won't leave. There's that awkward silence. (awkward silence) Can I stay with you? SHREK Uh, what? DONKEY Can I stay with you, please? SHREK (sarcastically) Of course! DONKEY Really? SHREK No. DONKEY Please! I don't wanna go back there! You don't know what it's like to be considered a freak. (pause while he looks at Shrek) Well, maybe you do. But that's why we gotta stick together. You gotta let me stay! Please! Please! SHREK Okay! Okay! But one night only. DONKEY Ah! Thank you! (he runs inside the cottage) SHREK What are you...? (Donkey hops up onto a chair.) No! No! DONKEY This is gonna be fun! We can stay up late, swappin' manly stories, and in the mornin' I'm makin' waffles. SHREK Oh! DONKEY Where do, uh, I sleep? SHREK (irritated) Outside! DONKEY Oh, well, I guess that's cool. I mean, I don't know you, and you don't know me, so I guess outside is best, you know. Here I go. Good night. (Shrek slams the door.) (sigh) I mean, I do like the outdoors. I'm a donkey. I was born outside. I'll just be sitting by myself outside, I guess, you know. By myself, outside. I'm all alone...there's no one here beside me... SHREK'S COTTAGE - NIGHT Shrek is getting ready for dinner. He sits himself down and lights a candle made out of earwax. He begins to eat when he hears a noise. He stands up with a huff. SHREK (to Donkey) I thought I told you to stay outside. DONKEY (from the window) I am outside. There is another noise and Shrek turns to find the person that made the noise. He sees several shadows moving. He finally turns and spots 3 blind mice on his table. BLIND MOUSE1 Well, gents, it's a far cry from the farm, but what choice do we have? BLIND MOUSE2 It's not home, but it'll do just fine. GORDO (bouncing on a slug) What a lovely bed. SHREK Got ya. (Grabs a mouse, but it escapes and lands on his shoulder.) GORDO I found some cheese. (bites Shrek's ear) SHREK Ow! GORDO Blah! Awful stuff. BLIND MOUSE1 Is that you, Gordo? GORDO How did you know? SHREK Enough! (he grabs the 3 mice) What are you doing in my house? (He gets bumped from behind and he drops the mice.) Hey! (he turns and sees the Seven Dwarves with Snow White on the table.) Oh, no, no, no. Dead broad off the table. DWARF Where are we supposed to put her? The bed's taken. SHREK Huh? Shrek marches over to the bedroom and throws back the curtain. The Big Bad Wolf is sitting in the bed. The wolf just looks at him. BIG BAD WOLF What? TIME LAPSE Shrek now has the Big Bad Wolf by the collar and is dragging him to the front door. SHREK I live in a swamp. I put up signs. I'm a terrifying ogre! What do I have to do get a little privacy? (He opens the front door to throw the Wolf out and he sees that all the collected Fairy Tale Creatures are on his land.) Oh, no. No! No! The 3 bears sit around the fire, the pied piper is playing his pipe and the rats are all running to him, some elves are directing flight traffic so that the fairies and witches can land...etc. SHREK What are you doing in my swamp? (this echoes and everyone falls silent.) Gasps are heard all around. The 3 good fairies hide inside a tent. SHREK All right, get out of here. All of you, move it! Come on! Let's go! Hapaya! Hapaya! Hey! Quickly. Come on! (more dwarves run inside the house) No, no! No, no. Not there. Not there. (they shut the door on him) Oh! (turns to look at Donkey) DONKEY Hey, don't look at me. I didn't invite them. PINOCCHIO Oh, gosh, no one invited us. SHREK What? PINOCCHIO We were forced to come here. SHREK (flabbergasted) By who? LITTLE PIG Lord Farquaad. He huffed and he puffed and he...signed an eviction notice. SHREK (heavy sigh) All right. Who knows where this Farquaad guy is? Everyone looks around at each other but no one answers. DONKEY Oh, I do. I know where he is. SHREK Does anyone else know where to find him? Anyone at all? DONKEY Me! Me! SHREK Anyone? DONKEY Oh! Oh, pick me! Oh, I know! I know! Me, me! SHREK (sigh) Okay, fine. Attention, all fairy tale things. Do not get comfortable. Your welcome is officially worn out. In fact, I'm gonna see this guy Farquaad right now and get you all off my land and back where you came from! (Pause. Then the crowd goes wild.) Oh! (to Donkey) You! You're comin' with me. DONKEY All right, that's what I like to hear, man. Shrek and Donkey, two stalwart friends, off on a whirlwind big-city adventure. I love it! DONKEY (singing) On the road again. Sing it with me, Shrek. I can't wait to get on the road again. SHREK What did I say about singing? DONKEY Can I whistle? SHREK No. DONKEY Can I hum it? SHREK All right, hum it. Donkey begins to hum 'On the Road Again'. DULOC - KITCHEN A masked man is torturing the Gingerbread Man. He's continually dunking him in a glass of milk. Lord Farquaad walks in. FARQUAAD That's enough. He's ready to talk. The Gingerbread Man is pulled out of the milk and slammed down onto a cookie sheet. Farquaad laughs as he walks over to the table. However when he reaches the table we see that it goes up to his eyes. He clears his throat and the table is lowered. FARQUAAD (he picks up the Gingerbread Man's legs and plays with them) Run, run, run, as fast as you can. You can't catch me. I'm the gingerbread man. GINGERBREAD MAN You are a monster. FARQUAAD I'm not the monster here. You are. You and the rest of that fairy tale trash, poisoning my perfect world. Now, tell me! Where are the others? GINGERBREAD MAN Eat me! (He spits milk into Farquaad's eye.) FARQUAAD I've tried to be fair to you creatures. Now my patience has reached its end! Tell me or I'll...(he makes as if to pull off the Gingerbread Man's buttons) GINGERBREAD MAN No, no, not the buttons. Not my gumdrop buttons. FARQUAAD All right then. Who's hiding them? GINGERBREAD MAN Okay, I'll tell you. Do you know the muffin man? FARQUAAD The muffin man? GINGERBREAD MAN The muffin man. FARQUAAD Yes, I know the muffin man, who lives on Drury Lane? GINGERBREAD MAN Well, she's married to the muffin man. FARQUAAD The muffin man? GINGERBREAD MAN The muffin man! FARQUAAD She's married to the muffin man. The door opens and the Head Guard walks in. HEAD GUARD My lord! We found it. FARQUAAD Then what are you waiting for? Bring it in. More guards enter carrying something that is covered by a sheet. They hang up whatever it is and remove the sheet. It is the Magic Mirror. GINGERBREAD MAN (in awe) Ohhhh... FARQUAAD Magic mirror... GINGERBREAD MAN Don't tell him anything! (Farquaad picks him up and dumps him into a trash can with a lid.) No! FARQUAAD Evening. Mirror, mirror on the wall. Is this not the most perfect kingdom of them all? MIRROR Well, technically you're not a king. FARQUAAD Uh, Thelonius. (Thelonius holds up a hand mirror and smashes it with his fist.) You were saying? MIRROR What I mean is you're not a king yet. But you can become one. All you have to do is marry a princess. FARQUAAD Go on. MIRROR (chuckles nervously) So, just sit back and relax, my lord, because it's time for you to meet today's eligible bachelorettes. And here they are! Bachelorette number one is a mentally abused shut-in from a kingdom far, far away. She likes sushi and hot tubbing anytime. Her hobbies include cooking and cleaning for her two evil sisters. Please welcome Cinderella. (shows picture of Cinderella) Bachelorette number two is a cape-wearing girl from the land of fancy. Although she lives with seven other men, she's not easy. Just kiss her dead, frozen lips and find out what a live wire she is. Come on. Give it up for Snow White! (shows picture of Snow White) And last, but certainly not last, bachelorette number three is a fiery redhead from a dragon-guarded castle surrounded by hot boiling lava! But don't let that cool you off. She's a loaded pistol who likes pina colads and getting caught in the rain. Yours for the rescuing, Princess Fiona! (Shows picture of Princess Fiona) So will it be bachelorette number one, bachelorette number two or bachelorette number three? GUARDS Two! Two! Three! Three! Two! Two! Three! FARQUAAD Three? One? Three? THELONIUS Three! (holds up 2 fingers) Pick number three, my lord! FARQUAAD Okay, okay, uh, number three! MIRROR Lord Farquaad, you've chosen Princess Fiona. FARQUAAD Princess Fiona. She's perfect. All I have to do is just find someone who can go... MIRROR But I probably should mention the little thing that happens at night. FARQUAAD I'll do it. MIRROR Yes, but after sunset... FARQUAAD Silence! I will make this Princess Fiona my queen, and DuLoc will finally have the perfect king! Captain, assemble your finest men. We're going to have a tournament. (smiles evilly) DuLoc Parking Lot - Lancelot Section Shrek and Donkey come out of the field that is right by the parking lot. The castle itself is about 40 stories high. DONKEY But that's it. That's it right there. That's DuLoc. I told ya I'd find it. SHREK So, that must be Lord Farquaad's castle. DONKEY Uh-huh. That's the place. SHREK Do you think maybe he's compensating for something? (He laughs, but then groans as Donkey doesn't get the joke. He continues walking through the parking lot.) DONKEY Hey, wait. Wait up, Shrek. MAN Hurry, darling. We're late. Hurry. SHREK Hey, you! (The attendant, who is wearing a giant head that looks like Lord Farquaad, screams and begins running through the rows of rope to get to the front gate to get away from Shrek.) Wait a second. Look, I'm not gonna eat you. I just - - I just - - (He sighs and then begins walking straight through the rows. The attendant runs into a wall and falls down. Shrek and Donkey look at him then continue on into DuLoc.) DULOC They look around but all is quiet. SHREK It's quiet. Too quiet. Where is everybody? DONKEY Hey, look at this! Donkey runs over and pulls a lever that is attached to a box marked 'Information'. The music winds up and then the box doors open up. There are little wooden people inside and they begin to sing. WOODEN PEOPLE Welcome to DuLoc such a perfect town Here we have some rules Let us lay them down Don't make waves, stay in line And we'll get along fine DuLoc is perfect place Please keep off of the grass Shine your shoes, wipe your... face DuLoc is, DuLoc is DuLoc is perfect place. Suddenly a camera takes Donkey and Shrek's picture. DONKEY Wow! Let's do that again! (makes ready to run over and pull the lever again) SHREK (grabs Donkey's tail and holds him still) No. No. No, no, no! No. They hear a trumpet fanfare and head over to the arena. FARQUAAD Brave knights. You are the best and brightest in all the land. Today one of you shall prove himself... As Shrek and Donkey walk down the tunnel to get into the arena Donkey is humming the DuLoc theme song. SHREK All right. You're going the right way for a smacked bottom. DONKEY Sorry about that. FARQUAAD That champion shall have the honor - - no, no - - the privilege to go forth and rescue the lovely Princess Fiona from the fiery keep of the dragon. If for any reason the winner is unsuccessful, the first runner-up will take his place and so on and so forth. Some of you may die, but it's a sacrifice I am willing to make. (cheers) Let the tournament begin! (He notices Shrek) Oh! What is that? It's hideous! SHREK (turns to look at Donkey and then back at Farquaad) Ah, that's not very nice. It's just a donkey. FARQUAAD Indeed. Knights, new plan! The one who kills the ogre will be named champion! Have it him! MEN Get him! SHREK Oh, hey! Now come on! Hang on now. (bumps into a table where there are mugs of beer) CROWD Go ahead! Get him! SHREK (holds up a mug of beer) Can't we just settle this over a pint? CROWD Kill the beast! SHREK No? All right then. (drinks the beer) Come on! He takes the mug and smashes the spigot off the large barrel of beer behind him. The beer comes rushing out drenching the other men and wetting the ground. It's like mud now. Shrek slides past the men and picks up a spear that one of the men dropped. As Shrek begins to fight Donkey hops up onto one of the larger beer barrels. It breaks free of it's ropes and begins to roll. Donkey manages to squish two men into the mud. There is so much fighting going on here I'm not going to go into detail. Suffice to say that Shrek kicks butt. DONKEY Hey, Shrek, tag me! Tag me! Shrek comes over and bangs a man's head up against Donkeys. Shrek gets up on the ropes and interacts with the crowd. SHREK Yeah! A man tries to sneak up behind Shrek, but Shrek turns in time and sees him. WOMAN The chair! Give him the chair! Shrek smashes a chair over the guys back. Finally all the men are down. Donkey kicks one of them in the helmet, and the ding sounds the end of the match. The audience goes wild. SHREK Oh, yeah! Ah! Ah! Thank you! Thank you very much! I'm here till Thursday. Try the veal! Ha, ha! (laughs) The laughter stops as all of the guards turn their weapons on Shrek. HEAD GUARD Shall I give the order, sir? FARQUAAD No, I have a better idea. People of DuLoc, I give you our champion! SHREK What? FARQUAAD Congratulations, ogre. You're won the honor of embarking on a great and noble quest. SHREK Quest? I'm already in a quest, a quest to get my swamp back. FARQUAAD Your swamp? SHREK Yeah, my swamp! Where you dumped those fairy tale creatures! FARQUAAD Indeed. All right, ogre. I'll make you a deal. Go on this quest for me, and I'll give you your swamp back. SHREK Exactly the way it was? FARQUAAD Down to the last slime-covered toadstool. SHREK And the squatters? FARQUAAD As good as gone. SHREK What kind of quest? Time Lapse - Donkey and Shrek are now walking through the field heading away from DuLoc. Shrek is munching on an onion. DONKEY Let me get this straight. You're gonna go fight a dragon and rescue a princess just so Farquaad will give you back a swamp which you only don't have because he filled it full of freaks in the first place. Is that about right? SHREK You know, maybe there's a good reason donkeys shouldn't talk. DONKEY I don't get it. Why don't you just pull some of that ogre stuff on him? Throttle him, lay siege to his fortress, grinds his bones to make your bread, the whole ogre trip. SHREK Oh, I know what. Maybe I could have decapitated an entire village and put their heads on a pike, gotten a knife, cut open their spleen and drink their fluids. Does that sound good to you? DONKEY Uh, no, not really, no. SHREK For your information, there's a lot more to ogres than people think. DONKEY Example? SHREK Example? Okay, um, ogres are like onions. (he holds out his onion) DONKEY (sniffs the onion) They stink? SHREK Yes - - No! DONKEY They make you cry? SHREK No! DONKEY You leave them in the sun, they get all brown, start sproutin' little white hairs. SHREK No! Layers! Onions have layers. Ogres have layers! Onions have layers. You get it? We both have layers. (he heaves a sigh and then walks off) DONKEY (trailing after Shrek) Oh, you both have layers. Oh. {Sniffs} You know, not everybody likes onions. Cake! Everybody loves cakes! Cakes have layers. SHREK I don't care... what everyone likes. Ogres are not like cakes. DONKEY You know what else everybody likes? Parfaits. Have you ever met a person, you say, "Let's get some parfait," they say, "Hell no, I don't like no parfait"? Parfaits are delicious. SHREK No! You dense, irritating, miniature beast of burden! Ogres are like onions! And of story. Bye-bye. See ya later. DONKEY Parfaits may be the most delicious thing on the whole damn planet. SHREK You know, I think I preferred your humming. DONKEY Do you have a tissue or something? I'm making a mess. Just the word parfait make me start slobbering. They head off. There is a montage of their journey. Walking through a field at sunset. Sleeping beneath a bright moon. Shrek trying to put the campfire out the next day and having a bit of a problem, so Donkey pees on the fire to put it out. DRAGON'S KEEP Shrek and Donkey are walking up to the keep that's supposed to house Princess Fiona. It appears to look like a giant volcano. DONKEY (sniffs) Ohh! Shrek! Did you do that? You gotta warn somebody before you just crack one off. My mouth was open and everything. SHREK Believe me, Donkey, if it was me, you'd be dead. (sniffs) It's brimstone. We must be getting close. DONKEY Yeah, right, brimstone. Don't be talking about it's the brimstone. I know what I smell. It wasn't no brimstone. It didn't come off no stone neither. They climb up the side of the volcano/keep and look down. There is a small piece of rock right in the center and that is where the castle is. It is surrounded by boiling lava. It looks very foreboding. SHREK Sure, it's big enough, but look at the location. (laughs...then the laugh turns into a groan) DONKEY Uh, Shrek? Uh, remember when you said ogres have layers? SHREK Oh, aye. DONKEY Well, I have a bit of a confession to make. Donkeys don't have layers. We wear our fear right out there on our sleeves. SHREK Wait a second. Donkeys don't have sleeves. DONKEY You know what I mean. SHREK You can't tell me you're afraid of heights. DONKEY No, I'm just a little uncomfortable about being on a rickety bridge over a boiling like of lava! SHREK Come on, Donkey. I'm right here beside ya, okay? For emotional support., we'll just tackle this thing together one little baby step at a time. DONKEY Really? SHREK Really, really. DONKEY Okay, that makes me feel so much better. SHREK Just keep moving. And don't look down. DONKEY Okay, don't look down. Don't look down. Don't look down. Keep on moving. Don't look down. (he steps through a rotting board and ends up looking straight down into the lava) Shrek! I'm lookin' down! Oh, God, I can't do this! Just let me off, please! SHREK But you're already halfway. DONKEY But I know that half is safe! SHREK Okay, fine. I don't have time for this. You go back. DONKEY Shrek, no! Wait! SHREK Just, Donkey - - Let's have a dance then, shall me? (bounces and sways the bridge) DONKEY Don't do that! SHREK Oh, I'm sorry. Do what? Oh, this? (bounces the bridge again) DONKEY Yes, that! SHREK Yes? Yes, do it. Okay. (continues to bounce and sway as he backs Donkey across the bridge) DONKEY No, Shrek! No! Stop it! SHREK You said do it! I'm doin' it. DONKEY I'm gonna die. I'm gonna die. Shrek, I'm gonna die. (steps onto solid ground) Oh! SHREK That'll do, Donkey. That'll do. (walks towards the castle) DONKEY Cool. So where is this fire-breathing pain-in-the-neck anyway? SHREK Inside, waiting for us to rescue her. (chuckles) DONKEY I was talkin' about the dragon, Shrek. INSIDE THE CASTLE DONKEY You afraid? SHREK No. DONKEY But... SHREK Shh. DONKEY Oh, good. Me neither. (sees a skeleton and gasps) 'Cause there's nothin' wrong with bein' afraid. Fear's a sensible response to an unfamiliar situation. Unfamiliar dangerous situation, I might add. With a dragon that breathes fire and eats knights and breathes fire, it sure doesn't mean you're a coward if you're a little scared. I sure as heck ain't no coward. I know that. SHREK Donkey, two things, okay? Shut ... up. Now go over there and see if you can find any stairs. DONKEY Stairs? I thought we was lookin' for the princess. SHREK (putting on a helmet) The princess will be up the stairs in the highest room in the tallest tower. DONKEY What makes you think she'll be there? SHREK I read it in a book once. (walks off) DONKEY Cool. You handle the dragon. I'll handle the stairs. I'll find those stairs. I'll whip their butt too. Those stairs won't know which way they're goin'. (walks off) EMPTY ROOM Donkey is still talking to himself as he looks around the room. DONKEY I'm gonna take drastic steps. Kick it to the curb. Don't mess with me. I'm the stair master. I've mastered the stairs. I wish I had a step right here. I'd step all over it. ELSEWHERE Shrek spots a light in the tallest tower window. SHREK Well, at least we know where the princess is, but where's the... DONKEY (os) Dragon! Donkey gasps and takes off running as the dragon roars again. Shrek manages to grab Donkey out of the way just as the dragon breathes fire. SHREK Donkey, look out! (he manages to get a hold of the dragons tail and holds on) Got ya! The dragon gets irritated at this and flicks it's tail and Shrek goes flying through the air and crashes through the roof of the tallest tower. Fiona wakes up with a jerk and looks at him lying on the floor. DONKEY Oh! Aah! Aah! Donkey get cornered as the Dragon knocks away all but a small part of the bridge he's on. DONKEY No. Oh, no, No! (the dragon roars) Oh, what large teeth you have. (the dragon growls) I mean white, sparkling teeth. I know you probably hear this all time from your food, but you must bleach, 'cause that is one dazzling smile you got there. Do I detect a hint of minty freshness? And you know what else? You're - - You're a girl dragon! Oh, sure! I mean, of course you're a girl dragon. You're just reeking of feminine beauty. (the dragon begins fluttering her eyes at him) What's the matter with you? You got something in your eye? Ohh. Oh. Oh. Man, I'd really love to stay, but you know, I'm, uh...(the dragon blows a smoke ring in the shape of a heart right at him, and he coughs) I'm an asthmatic, and I don't know if it'd work out if you're gonna blow smoke rings. Shrek! (the dragon picks him up with her teeth and carries him off) No! Shrek! Shrek! Shrek! FIONA'S ROOM Shrek groans as he gets up off the floor. His back is to Fiona so she straightens her dress and lays back down on the bed. She then quickly reaches over and gets the bouquet of flowers off the side table. She then lays back down and appears to be asleep. Shrek turns and goes over to her. He looks down at Fiona for a moment and she puckers her lips. Shrek takes her by the shoulders and shakes her away. FIONA Oh! Oh! SHREK Wake up! FIONA What? SHREK Are you Princess Fiona? FIONA I am, awaiting a knight so bold as to rescue me. SHREK Oh, that's nice. Now let's go! FIONA But wait, Sir Knight. This be-ith our first meeting. Should it not be a wonderful, romantic moment? SHREK Yeah, sorry, lady. There's no time. FIONA Hey, wait. What are you doing? You should sweep me off my feet out yonder window and down a rope onto your valiant steed. SHREK You've had a lot of time to plan this, haven't you? FIONA (smiles) Mm-hmm. Shrek breaks the lock on her door and pulls her out and down the hallway. FIONA But we have to savor this moment! You could recite an epic poem for me. A ballad? A sonnet! A limerick? Or something! SHREK I don't think so. FIONA Can I at least know the name of my champion? SHREK Uh, Shrek. FIONA Sir Shrek. (clears throat and holds out a handkerchief) I pray that you take this favor as a token of my gratitude. SHREK Thanks! Suddenly they hear the dragon roar. FIONA (surprised)You didn't slay the dragon? SHREK It's on my to-do list. Now come on! (takes off running and drags Fiona behind him.) FIONA But this isn't right! You were meant to charge in, sword drawn, banner flying. That's what all the other knights did. SHREK Yeah, right before they burst into flame. FIONA That's not the point. (Shrek suddenly stops and she runs into him.) Oh! (Shrek ignores her and heads for a wooden door off to the side.) Wait. Where are you going? The exit's over there. SHREK Well, I have to save my ass. FIONA What kind of knight are you? SHREK One of a kind. (opens the door into the throne room) DONKEY (os) Slow down. Slow down, baby, please. I believe it's healthy to get to know someone over a long period of time. Just call me old-fashioned. (laughs worriedly) (we see him up close and from a distance as Shrek sneaks into the room) I don't want to rush into a physical relationship. I'm not emotionally ready for a commitment of, uh, this - - Magnitude really is the word I'm looking for. Magnitude- - Hey, that is unwanted physical contact. Hey, what are you doing? Okay, okay. Let's just back up a little and take this one step at a time. We really should get to know each other first as friends or pen pals. I'm on the road a lot, but I just love receiving cards - - I'd really love to stay, but - - Don't do that! That's my tail! That's my personal tail. You're gonna tear it off. I don't give permission - - What are you gonna do with that? Hey, now. No way. No! No! No, no! No. No, no, no. No! Oh! Shrek grabs a chain that's connected to the chandelier and swings toward the dragon. He misses and he swings back again. He looks up and spots that the chandelier is right above the dragons head. He pulls on the chain and it releases and he falls down and bumps Donkey out of the way right as the dragon is about to kiss him. Instead the dragon kisses Shreks' butt. She opens her eyes and roars. Shrek lets go of the chain and the chandelier falls onto her head, but it's too big and it goes over her head and forms a sort of collar for her. She roars again and Shrek and Donkey take off running. Very 'Matrix' style. Shrek grabs Donkey and then grabs Princess Fiona as he runs past her. DONKEY Hi, Princess! FIONA It talks! SHREK Yeah, it's getting him to shut up that's the trick. They all start screaming as the dragon gains on them. Shrek spots a descending slide and jumps on. But unfortunately there is a crack in the stone and it hits Shrek right in the groin. His eyes cross and as he reaches the bottom of the slide he stumbles off and walks lightly. SHREK Oh! Shrek gets them close to the exit and sets down Donkey and Fiona. SHREK Okay, you two, heard for the exit! I'll take care of the dragon. Shrek grabs a sword and heads back toward the interior of the castle. He throws the sword down in between several overlapping chain links. The chain links are attached to the chandelier that is still around the dragons neck. SHREK (echoing) Run! They all take off running for the exit with the dragon in hot pursuit. They make it to the bridge and head across. The dragons breathes fire and the bridge begins to burn. They all hang on for dear life as the ropes holding the bridge up collapse. They are swung to the other side. As they hang upside down they look in horror as the dragon makes to fly over the boiling lava to get them. But suddenly the chandelier with the chain jerk the dragon back and she's unable to get to them. Our gang climbs quickly to safety as the dragon looks angry and then gives a sad whimper as she watches Donkey walk away. FIONA (sliding down the 'volcano' hill) You did it! You rescued me! You're amazing. (behind her Donkey falls down the hill) You're - - You're wonderful. You're... (turns and sees Shrek fall down the hill and bump into Donkey) a little unorthodox I'll admit. But thy deed is great, and thy heart is pure. I am eternally in your debt. (Donkey clears his throat.) And where would a brave knight be without his noble steed? DONKEY I hope you heard that. She called me a noble steed. She think I'm a steed. FIONA The battle is won. You may remove your helmet, good Sir Knight. SHREK Uh, no. FIONA Why not? SHREK I have helmet hair. FIONA Please. I would'st look upon the face of my rescuer. SHREK No, no, you wouldn't - - 'st. FIONA But how will you kiss me? SHREK What? (to Donkey) That wasn't in the job description. DONKEY Maybe it's a perk. FIONA No, it's destiny. Oh, you must know how it goes. A princess locked in a tower and beset by a dragon is rescued by a brave knight, and then they share true love's first kiss. DONKEY Hmm? With Shrek? You think- - Wait. Wait. You think that Shrek is you true love? FIONA Well, yes. Both Donkey and Shrek burst out laughing. DONKEY You think Shrek is your true love! FIONA What is so funny? SHREK Let's just say I'm not your type, okay?Fiona: Of course, you are. You're my rescuer. Now - - Now remove your helmet. SHREK Look. I really don't think this is a good idea. FIONA Just take off the helmet. SHREK I'm not going to. FIONA Take it off. SHREK No! FIONA Now! SHREK Okay! Easy. As you command. Your Highness. (takes off his helmet) FIONA You- - You're a- - an ogre. SHREK Oh, you were expecting Prince Charming. FIONA Well, yes, actually. Oh, no. This is all wrong. You're not supposed to be an ogre. SHREK Princess, I was sent to rescue you by Lord Farquaad, okay? He is the one who wants to marry you. FIONA Then why didn't he come rescue me? SHREK Good question. You should ask him that when we get there. FIONA But I have to be rescued by my true love, not by some ogre and his- - his pet. DONKEY Well, so much for noble steed. SHREK You're not making my job any easier. FIONA I'm sorry, but your job is not my problem. You can tell Lord Farquaad that if he wants to rescue me properly, I'll be waiting for him right here. SHREK Hey! I'm no one's messenger boy, all right? (ominous) I'm a delivery boy. (he swiftly picks her up and swings her over his shoulder like she was a sack of potatoes) FIONA You wouldn't dare. Put me down! SHREK Ya comin', Donkey? DONKEY I'm right behind ya. FIONA Put me down, or you will suffer the consequences! This is not dignified! Put me down! WOODS A little time has passed and Fiona has calmed down. She just hangs there limply while Shrek carries her. DONKEY Okay, so here's another question. Say there's a woman that digs you, right, but you don't really like her that way. How do you let her down real easy so her feelings aren't hurt, but you don't get burned to a crisp and eaten? FIONA You just tell her she's not your true love. Everyone knows what happens when you find your...(Shrek drops her on the ground) Hey! The sooner we get to DuLoc the better. DONKEY You're gonna love it there, Princess. It's beautiful! FIONA And what of my groom-to-be? Lord Farquaad? What's he like? SHREK Let me put it this way, Princess. Men of Farquaad's stature are in short supply. (he and Donkey laugh) Shrek then proceeds to splash water onto his face to wash off the dust and grime. DONKEY I don't know. There are those who think little of him. (they laugh again) Fiona: Stop it. Stop it, both of you. You're just jealous you can never measure up to a great ruler like Lord Farquaad. SHREK Yeah, well, maybe you're right, Princess. But I'll let you do the "measuring" when you see him tomorrow. FIONA (looks at the setting sun) Tomorrow? It'll take that long? Shouldn't we stop to make camp? SHREK No, that'll take longer. We can keep going. FIONA But there's robbers in the woods. DONKEY Whoa! Time out, Shrek! Camp is starting to sound good. SHREK Hey, come on. I'm scarier than anything we're going to see in this forest. FIONA I need to find somewhere to camp now! Both Donkey and Shrek's ears lower as they shrink away from her. MOUNTAIN CLIFF Shrek has found a cave that appears to be in good order. He shoves a stone boulder out of the way to reveal the cave. SHREK Hey! Over here. DONKEY Shrek, we can do better than that. I don't think this is fit for a princess. FIONA No, no, it's perfect. It just needs a few homey touches. SHREK Homey touches? Like what? (he hears a tearing noise and looks over at Fiona who has torn the bark off of a tree.) FIONA A door? Well, gentlemen, I bid thee good night. (goes into the cave and puts the bark door up behind her) DONKEY You want me to read you a bedtime story? I will. FIONA (os) I said good night! Shrek looks at Donkey for a second and then goes to move the boulder back in front of the entrance to the cave with Fiona still inside. DONKEY Shrek, What are you doing? SHREK (laughs) I just- - You know - - Oh, come on. I was just kidding. LATER THAT NIGHT Shrek and Donkey are sitting around a campfire. They are staring up into the sky as Shrek points out certain star constellations to Donkey. SHREK And, uh, that one, that's Throwback, the only ogre to ever spit over three wheat fields. DONKEY Right. Yeah. Hey, can you tell my future from these stars? SHREK The stars don't tell the future, Donkey. They tell stories. Look, there's Bloodnut, the Flatulent. You can guess what he's famous for. DONKEY I know you're making this up. SHREK No, look. There he is, and there's the group of hunters running away from his stench. DONKEY That ain't nothin' but a bunch of little dots. SHREK You know, Donkey, sometimes things are more than they appear. Hmm? Forget it. DONKEY (heaves a big sigh) Hey, Shrek, what we gonna do when we get our swamp anyway? SHREK Our swamp? DONKEY You know, when we're through rescuing the princess. SHREK We? Donkey, there's no "we". There's no "our". There's just me and my swamp. The first thing I'm gonna do is build a ten-foot wall around my land. DONKEY You cut me deep, Shrek. You cut me real deep just now. You know what I think? I think this whole wall thing is just a way to keep somebody out. SHREK No, do ya think? DONKEY Are you hidin' something? SHREK Never mind, Donkey. DONKEY Oh, this is another one of those onion things, isn't it? SHREK No, this is one of those drop-it and leave-it alone things. DONKEY Why don't you want to talk about it? SHREK Why do you want to talk about it? DONKEY Why are you blocking? SHREK I'm not blocking. DONKEY Oh, yes, you are. SHREK Donkey, I'm warning you. DONKEY Who you trying to keep out? SHREK Everyone! Okay? DONKEY (pause) Oh, now we're gettin' somewhere. (grins) At this point Fiona pulls the 'door' away from the entrance to the cave and peaks out. Neither of the guys see her. SHREK Oh! For the love of Pete! (gets up and walks over to the edge of the cliff and sits down) DONKEY What's your problem? What you got against the whole world anyway? SHREK Look, I'm not the one with the problem, okay? It's the world that seems to have a problem with me. People take one look at me and go. "Aah! Help! Run! A big, stupid, ugly ogre!" They judge me before they even know me. That's why I'm better off alone. DONKEY You know what? When we met, I didn't think you was just a big, stupid, ugly ogre. SHREK Yeah, I know. DONKEY So, uh, are there any donkeys up there? SHREK Well, there's, um, Gabby, the Small and Annoying. DONKEY Okay, okay, I see it now. The big shiny one, right there. That one there? Fiona puts the door back. SHREK That's the moon. DONKEY Oh, okay. DuLoc - Farquaad's Bedroom The camera pans over a lot of wedding stuff. Soft music plays in the background. Farquaad is in bed, watching as the Magic Mirror shows him Princess Fiona. FARQUAAD Again, show me again. Mirror, mirror, show her to me. Show me the princess. MIRROR Hmph. The Mirror rewinds and begins to play again from the beginning. FARQUAAD Ah. Perfect. Farquaad looks down at his bare chest and pulls the sheet up to cover himself as though Fiona could see him as he gazes sheepishly at her image in the mirror. MORNING Fiona walks out of the cave. She glances at Shrek and Donkey who are still sleeping. She wanders off into the woods and comes across a blue bird. She begins to sing. The bird sings along with her. She hits higher and higher notes and the bird struggles to keep up with her. Suddenly the pressure of the note is too big and the bird explodes. Fiona looks a little sheepish, but she eyes the eggs that the bird left behind. Time lapse, Fiona is now cooking the eggs for breakfast. Shrek and Donkey are still sleeping. Shrek wakes up and looks at Fiona. Donkey's talking in his sleep. DONKEY (quietly) Mmm, yeah, you know I like it like that. Come on, baby. I said I like it. SHREK Donkey, wake up. (shakes him) DONKEY Huh? What? SHREK Wake up. DONKEY What? (stretches and yawns) FIONA Good morning. Hm, how do you like your eggs? DONKEY Oh, good morning, Princess! Fiona gets up and sets the eggs down in front of them. SHREK What's all this about? FIONA You know, we kind of got off to a bad start yesterday. I wanted to make it up to you. I mean, after all, you did rescue me. SHREK Uh, thanks. Donkey sniffs the eggs and licks his lips. FIONA Well, eat up. We've got a big day ahead of us. (walks off) LATER They are once again on their way. They are walking through the forest. Shrek belches. DONKEY Shrek! SHREK What? It's a compliment. Better out than in, I always say. (laughs) DONKEY Well, it's no way to behave in front of a princess. Fiona belches FIONA Thanks. DONKEY She's as nasty as you are. SHREK (chuckles) You know, you're not exactly what I expected. FIONA Well, maybe you shouldn't judge people before you get to know them. She smiles and then continues walking, singing softly. Suddenly from out of nowhere, a man swings down and swoops Fiona up into a tree. ROBIN HOOD La liberte! Hey! SHREK Princess! FIONA (to Robin Hood) What are you doing? ROBIN HOOD Be still, mon cherie, for I am you savior! And I am rescuing you from this green...(kisses up her arm while Fiona pulls back in disgust)...beast. SHREK Hey! That's my princess! Go find you own! ROBIN HOOD Please, monster! Can't you see I'm a little busy here? FIONA (getting fed up) Look, pal, I don't know who you think you are! ROBIN HOOD Oh! Of course! Oh, how rude. Please let me introduce myself. Oh, Merry Men. (laughs) Suddenly an accordion begins to play and the Merry men pop out from the bushes. They begin to sing Robin's theme song. MERRY MEN Ta, dah, dah, dah, whoo. ROBIN HOOD I steal from the rich and give to the needy. MERRY MEN He takes a wee percentage, ROBIN HOOD But I'm not greedy. I rescue pretty damsels, man, I'm good. MERRY MEN What a guy, Monsieur Hood. ROBIN HOOD Break it down. I like an honest fight and a saucy little maid... MERRY MEN What he's basically saying is he likes to get... ROBIN HOOD Paid. So...When an ogre in the bush grabs a lady by the tush. That's bad. MERRY MEN That's bad. ROBIN HOOD When a beauty's with a beast it makes me awfully mad. MERRY MEN He's mad, he's really, really mad. ROBIN HOOD I'll take my blade and ram it through your heart, keep your eyes on me, boys 'cause I'm about to start... There is a grunt as Fiona swings down from the tree limb and knocks Robin Hood unconscious. FIONA Man, that was annoying! Shrek looks at her in admiration. MERRY MAN Oh, you little- - (shoots an arrow at Fiona but she ducks out of the way) The arrow flies toward Donkey who jumps into Shrek's arms to get out of the way. The arrow proceeds to just bounce off a tree. Another fight sequence begins and Fiona gives a karate yell and then proceeds to beat the crap out of the Merry Men. There is a very interesting 'Matrix' moment here when Fiona pauses in mid-air to fix her hair. Finally all of the Merry Men are down, and Fiona begins walking away. FIONA Uh, shall we? SHREK Hold the phone. (drops Donkey and begins walking after Fiona) Oh! Whoa, whoa, whoa. Hold on now. Where did that come from? FIONA What? SHREK That! Back there. That was amazing! Where did you learn that? FIONA Well...(laughs) when one lives alone, uh, one has to learn these things in case there's a...(gasps and points) there's an arrow in your butt! SHREK What? (turns and looks) Oh, would you look at that? (he goes to pull it out but flinches because it's tender) FIONA Oh, no. This is all my fault. I'm so sorry. DONKEY (walking up) Why? What's wrong? FIONA Shrek's hurt. DONKEY Shrek's hurt. Shrek's hurt? Oh, no, Shrek's gonna die. SHREK Donkey, I'm okay. DONKEY You can't do this to me, Shrek. I'm too young for you to die. Keep you legs elevated. Turn your head and cough. Does anyone know the Heimlich? FIONA Donkey! Calm down. If you want to help Shrek, run into the woods and find me a blue flower with red thorns. DONKEY Blue flower, red thorns. Okay, I'm on it. Blue flower, red thorns. Don't die Shrek. If you see a long tunnel, stay away from the light! SHREK & FIONA Donkey! DONKEY Oh, yeah. Right. Blue flower, red thorns. (runs off) SHREK What are the flowers for? FIONA (like it's obvious) For getting rid of Donkey. SHREK Ah. FIONA Now you hold still, and I'll yank this thing out. (gives the arrow a little pull) SHREK (jumps away) Ow! Hey! Easy with the yankin'. As they continue to talk Fiona keeps going after the arrow and Shrek keeps dodging her hands. FIONA I'm sorry, but it has to come out. SHREK No, it's tender. FIONA Now, hold on. SHREK What you're doing is the opposite of help. FIONA Don't move. SHREK Look, time out. FIONA Would you...(grunts as Shrek puts his hand over her face to stop her from getting at the arrow) Okay. What do you propose we do? ELSEWHERE Donkey is still looking for the special flower. DONKEY Blue flower, red thorns. Blue flower, red thorns. Blue flower, red thorns. This would be so much easier if I wasn't color-blind! Blue flower, red thorns. SHREK (os) Ow! DONKEY Hold on, Shrek! I'm comin'! (rips a flower off a nearby bush that just happens to be a blue flower with red thorns) THE FOREST PATH SHREK Ow! Not good. FIONA Okay. Okay. I can nearly see the head. (Shrek grunts as she pulls) It's just about... SHREK Ow! Ohh! (he jerks and manages to fall over with Fiona on top of him) DONKEY Ahem. SHREK (throwing Fiona off of him) Nothing happend. We were just, uh - - DONKEY Look, if you wanted to be alone, all you had to do was ask. Okay? SHREK Oh, come on! That's the last thing on my mind. The princess here was just- - (Fiona pulls the arrow out) Ugh! (he turns to look at Fiona who holds up the arrow with a smile) Ow! DONKEY Hey, what's that? (nervous chuckle) That's...is that blood? Donkey faints. Shrek walks over and picks him up as they continue on their way. There is a montage of scenes as the group heads back to DuLoc. Shrek crawling up to the top of a tree to make it fall over a small brook so that Fiona won't get wet. Shrek then gets up as Donkey is just about to cross the tree and the tree swings back into it's upright position and Donkey flies off. Shrek swatting and a bunch of flies and mosquitoes. Fiona grabs a nearby spiderweb that's on a tree branch and runs through the field swinging it around to catch the bugs. She then hands it to Shrek who begins eating like it's a treat. As he walks off she licks her fingers. Shrek catching a toad and blowing it up like a balloon and presenting it to Fiona. Fiona catching a snake, blowing it up, fashioning it into a balloon animal and presenting it to Shrek. The group arriving at a windmill that is near DuLoc. WINDMILL SHREK There it is, Princess. Your future awaits you. FIONA That's DuLoc? DONKEY Yeah, I know. You know, Shrek thinks Lord Farquaad's compensating for something, which I think means he has a really...(Shrek steps on his hoof) Ow! SHREK Um, I, uh- - I guess we better move on. FIONA Sure. But, Shrek? I'm - - I'm worried about Donkey. SHREK What? FIONA I mean, look at him. He doesn't look so good. DONKEY What are you talking about? I'm fine. FIONA (kneels to look him in the eyes) That's what they always say, and then next thing you know, you're on your back. (pause) Dead. SHREK You know, she's right. You look awful. Do you want to sit down? FIONA Uh, you know, I'll make you some tea. DONKEY I didn't want to say nothin', but I got this twinge in my neck, and when I turn my head like this, look, (turns his neck in a very sharp way until his head is completely sideways) Ow! See? SHREK Who's hungry? I'll find us some dinner. FIONA I'll get the firewood. DONKEY Hey, where you goin'? Oh, man, I can't feel my toes! (looks down and yelps) I don't have any toes! I think I need a hug. SUNSET Shrek has built a fire and is cooking the rest of dinner while Fiona eats. FIONA Mmm. This is good. This is really good. What is this? SHREK Uh, weed rat. Rotisserie style. FIONA No kidding. Well, this is delicious. SHREK Well, they're also great in stews. Now, I don't mean to brag, but I make a mean weed rat stew. (chuckles) Fiona looks at DuLoc and sighs. FIONA I guess I'll be dining a little differently tomorrow night. SHREK Maybe you can come visit me in the swamp sometime. I'll cook all kind of stuff for you. Swamp toad soup, fish eye tartare - - you name it. FIONA (smiles) I'd like that. They smiles at each other. SHREK Um, Princess? FIONA Yes, Shrek? SHREK I, um, I was wondering...are you...(sighs) Are you gonna eat that? DONKEY (chuckles) Man, isn't this romantic? Just look at that sunset. FIONA (jumps up) Sunset? Oh, no! I mean, it's late. I-It's very late. SHREK What? DONKEY Wait a minute. I see what's goin' on here. You're afraid of the dark, aren't you? FIONA Yes! Yes, that's it. I'm terrified. You know, I'd better go inside. DONKEY Don't feel bad, Princess. I used to be afraid of the dark, too, until - - Hey, no, wait. I'm still afraid of the dark. Shrek sighs FIONA Good night. SHREK Good night. Fiona goes inside the windmill and closes the door. Donkey looks at Shrek with a new eye. DONKEY Ohh! Now I really see what's goin' on here. SHREK Oh, what are you talkin' about? DONKEY I don't even wanna hear it. Look, I'm an animal, and I got instincts. And I know you two were diggin' on each other. I could feel it. SHREK You're crazy. I'm just bringing her back to Farquaad. DONKEY Oh, come on, Shrek. Wake up and smell the pheromones. Just go on in and tell her how you feel. SHREK I- - There's nothing to tell. Besides, even if I did tell her that, well, you know - - and I'm not sayin' I do 'cause I don't - - she's a princess, and I'm - - DONKEY An ogre? SHREK Yeah. An ogre. DONKEY Hey, where you goin'? SHREK To get... move firewood. (sighs) Donkey looks over at the large pile of firewood there already is. TIME LAPSE Donkey opens the door to the Windmill and walks in. Fiona is nowhere to be seen. DONKEY Princess? Princess Fiona? Princess, where are you? Princess? Fiona looks at Donkey from the shadows, but we can't see her. DONKEY It's very spooky in here. I ain't playing no games. Suddenly Fiona falls from the railing. She gets up only she doesn't look like herself. She looks like an ogre and Donkey starts freaking out. DONKEY Aah! FIONA Oh, no! DONKEY No, help! FIONA Shh! DONKEY Shrek! Shrek! Shrek! FIONA No, it's okay. It's okay. DONKEY What did you do with the princess? FIONA Donkey, I'm the princess. DONKEY Aah! FIONA It's me, in this body. DONKEY Oh, my God! You ate the princess. (to her stomach) Can you hear me? FIONA Donkey! DONKEY (still aimed at her stomach) Listen, keep breathing! I'll get you out of there! FIONA No! DONKEY Shrek! Shrek! Shrek! FIONA Shh. DONKEY Shrek! FIONA This is me. Donkey looks into her eyes as she pets his muzzle, and he quiets down. DONKEY Princess? What happened to you? You're, uh, uh, uh, different. FIONA I'm ugly, okay? DONKEY Well, yeah! Was it something you ate? 'Cause I told Shrek those rats was a bad idea. You are what you eat, I said. Now - - FIONA No. I - - I've been this way as long as I can remember. DONKEY What do you mean? Look, I ain't never seen you like this before. FIONA It only happens when sun goes down. "By night one way, by day another. This shall be the norm... until you find true love's first kiss... and then take love's true form." DONKEY Ah, that's beautiful. I didn't know you wrote poetry. FIONA It's a spell. (sigh) When I was a little girl, a witch cast a spell on me. Every night I become this. This horrible, ugly beast! I was placed in a tower to await the day my true love would rescue me. That's why I have to marry Lord Farquaad tomorrow before the sun sets and he sees me like this. (begins to cry) DONKEY All right, all right. Calm down. Look, it's not that bad. You're not that ugly. Well, I ain't gonna lie. You are ugly. But you only look like this at night. Shrek's ugly 24-7. FIONA But Donkey, I'm a princess, and this is not how a princess is meant to look. DONKEY Princess, how 'bout if you don't marry Farquaad? FIONA I have to. Only my true love's kiss can break the spell. DONKEY But, you know, um, you're kind of an orge, and Shrek - - well, you got a lot in common. FIONA Shrek? OUTSIDE Shrek is walking towards the windmill with a sunflower in his hand. SHREK (to himself) Princess, I - - Uh, how's it going, first of all? Good? Um, good for me too. I'm okay. I saw this flower and thought of you because it's pretty and - - well, I don't really like it, but I thought you might like it 'cause you're pretty. But I like you anyway. I'd - - uh, uh...(sighs) I'm in trouble. Okay, here we go. He walks up to the door and pauses outside when he hears Donkey and Fiona talking. FIONA (os) I can't just marry whoever I want. Take a good look at me, Donkey. I mean, really, who can ever love a beast so hideous and ugly? "Princess" and "ugly" don't go together. That's why I can't stay here with Shrek. Shrek steps back in shock. FIONA (os) My only chance to live happily ever after is to marry my true love. Shrek heaves a deep sigh. He throws the flower down and walks away. INSIDE FIONA Don't you see, Donkey? That's just how it has to be. It's the only way to break the spell. DONKEY You at least gotta tell Shrek the truth. FIONA No! You can't breathe a word. No one must ever know. DONKEY What's the point of being able to talk if you gotta keep secrets? FIONA Promise you won't tell. Promise! DONKEY All right, all right. I won't tell him. But you should. (goes outside) I just know before this is over, I'm gonna need a whole lot of serious therapy. Look at my eye twitchin'. Fiona comes out the door and watches him walk away. She looks down and spots the sunflower. She picks it up before going back inside the windmill. MORNING Donkey is asleep. Shrek is nowhere to be seen. Fiona is still awake. She is plucking petals from the sunflower. FIONA I tell him, I tell him not. I tell him, I tell him not. I tell him. (she quickly runs to the door and goes outside) Shrek! Shrek, there's something I want...(she looks and sees the rising sun, and as the sun crests the sky she turns back into a human.) Just as she looks back at the sun she sees Shrek stomping towards her. FIONA Shrek. Are you all right? SHREK Perfect! Never been better. FIONA I - - I don't - - There's something I have to tell you. SHREK You don't have to tell me anything, Princess. I heard enough last night. FIONA You heard what I said? SHREK Every word. FIONA I thought you'd understand. SHREK Oh, I understand. Like you said, "Who could love a hideous, ugly beast?" FIONA But I thought that wouldn't matter to you. SHREK Yeah? Well, it does. (Fiona looks at him in shock. He looks past her and spots a group approaching.) Ah, right on time. Princess, I've brought you a little something. Farquaad has arrived with a group of his men. He looks very regal sitting up on his horse. You would never guess that he's only like 3 feet tall. Donkey wakes up with a yawn as the soldiers march by. DONKEY What'd I miss? What'd I miss? (spots the soldiers) (muffled) Who said that? Couldn't have been the donkey. FARQUAAD Princess Fiona. SHREK As promised. Now hand it over. FARQUAAD Very well, ogre. (holds out a piece of paper) The deed to your swamp, cleared out, as agreed. Take it and go before I change my mind. (Shrek takes the paper) Forgive me, Princess, for startling you, but you startled me, for I have never seen such a radiant beauty before. I'm Lord Farquaad. FIONA Lord Farquaad? Oh, no, no. (Farquaad snaps his fingers) Forgive me, my lord, for I was just saying a short... (Watches as Farquaad is lifted off his horse and set down in front of her. He comes to her waist.) farewell. FARQUAAD Oh, that is so sweet. You don't have to waste good manners on the ogre. It's not like it has feelings. FIONA No, you're right. It doesn't. Donkey watches this exchange with a curious look on his face. FARQUAAD Princess Fiona, beautiful, fair, flawless Fiona. I ask your hand in marriage. Will you be the perfect bride for the perfect groom? FIONA Lord Farquaad, I accept. Nothing would make - - FARQUAAD (interrupting) Excellent! I'll start the plans, for tomorrow we wed! FIONA No! I mean, uh, why wait? Let's get married today before the sun sets. FARQUAAD Oh, anxious, are you? You're right. The sooner, the better. There's so much to do! There's the caterer, the cake, the band, the guest list. Captain, round up some guests! (a guard puts Fiona on the back of his horse) FIONA Fare-thee-well, ogre. Farquaad's whole party begins to head back to DuLoc. Donkey watches them go. DONKEY Shrek, what are you doing? You're letting her get away. SHREK Yeah? So what? DONKEY Shrek, there's something about her you don't know. Look, I talked to her last night, She's - - SHREK I know you talked to her last night. You're great pals, aren't ya? Now, if you two are such good friends, why don't you follow her home? DONKEY Shrek, I - - I wanna go with you. SHREK I told you, didn't I? You're not coming home with me. I live alone! My swamp! Me! Nobody else! Understand? Nobody! Especially useless, pathetic, annoying, talking donkeys! DONKEY But I thought - - SHREK Yeah. You know what? You thought wrong! (stomps off) DONKEY Shrek. Montage of different scenes. Shrek arriving back home. Fiona being fitted for the wedding dress. Donkey at a stream running into the dragon. Shrek cleaning up his house. Fiona eating dinner alone. Shrek eating dinner alone. SHREK'S HOME Shrek is eating dinner when he hears a sound outside. He goes outside to investigate. SHREK Donkey? (Donkey ignores him and continues with what he's doing.) What are you doing? DONKEY I would think, of all people, you would recognize a wall when you see one. SHREK Well, yeah. But the wall's supposed to go around my swamp, not through it. DONKEY It is around your half. See that's your half, and this is my half. SHREK Oh! Your half. Hmm. DONKEY Yes, my half. I helped rescue the princess. I did half the work. I get half the booty. Now hand me that big old rock, the one that looks like your head. SHREK Back off! DONKEY No, you back off. SHREK This is my swamp! DONKEY Our swamp. SHREK (grabs the tree branch Donkey is working with) Let go, Donkey! DONKEY You let go. SHREK Stubborn jackass! DONKEY Smelly ogre. SHREK Fine! (drops the tree branch and walks away) DONKEY Hey, hey, come back here. I'm not through with you yet. SHREK Well, I'm through with you. DONKEY Uh-uh. You know, with you it's always, "Me, me, me!" Well, guess what! Now it's my turn! So you just shut up and pay attention! You are mean to me. You insult me and you don't appreciate anything that I do! You're always pushing me around or pushing me away. SHREK Oh, yeah? Well, if I treated you so bad, how come you came back? DONKEY Because that's what friends do! They forgive each other! SHREK Oh, yeah. You're right, Donkey. I forgive you... for stabbin' me in the back! (goes into the outhouse and slams the door) DONKEY Ohh! You're so wrapped up in layers, onion boy, you're afraid of your own feelings. SHREK (os) Go away! DONKEY There you are , doing it again just like you did to Fiona. All she ever do was like you, maybe even love you. SHREK (os) Love me? She said I was ugly, a hideous creature. I heard the two of you talking. DONKEY She wasn't talkin' about you. She was talkin' about, uh, somebody else. SHREK (opens the door and comes out) She wasn't talking about me? Well, then who was she talking about? DONKEY Uh-uh, no way. I ain't saying anything. You don't wanna listen to me. Right? Right? SHREK Donkey! DONKEY No! SHREK Okay, look. I'm sorry, all right? (sigh) I'm sorry. I guess I am just a big, stupid, ugly ogre. Can you forgive me? DONKEY Hey, that's what friends are for, right? SHREK Right. Friends? DONKEY Friends. SHREK So, um, what did Fiona say about me? DONKEY What are you asking me for? Why don't you just go ask her? SHREK The wedding! We'll never make it in time. DONKEY Ha-ha-ha! Never fear, for where, there's a will, there's a way and I have a way. (whistles) Suddenly the dragon arrives overhead and flies low enough so they can climb on. SHREK Donkey? DONKEY I guess it's just my animal magnetism. They both laugh. SHREK Aw, come here, you. (gives Donkey a noogie) DONKEY All right, all right. Don't get all slobbery. No one likes a kiss ass. All right, hop on and hold on tight. I haven't had a chance to install the seat belts yet. They climb aboard the dragon and she takes off for DuLoc. DULOC - CHURCH Fiona and Farquaad are getting married. The whole town is there. The prompter card guy holds up a card that says 'Revered Silence'. PRIEST People of DuLoc, we gather here today to bear witness to the union.... FIONA (eyeing the setting sun) Um- PRIEST ...of our new king... FIONA Excuse me. Could we just skip ahead to the "I do's"? FARQUAAD (chuckles and then motions to the priest to indulge Fiona) Go on. COURTYARD Some guards are milling around. Suddenly the dragon lands with a boom. The guards all take off running. DONKEY (to Dragon) Go ahead, HAVE SOME FUN. If we need you, I'll whistle. How about that? (she nods and goes after the guards) Shrek, wait, wait! Wait a minute! You wanna do this right, don't you? SHREK (at the Church door) What are you talking about? DONKEY There's a line you gotta wait for. The preacher's gonna say, "Speak now or forever hold your peace." That's when you say, "I object!" SHREK I don't have time for this! DONKEY Hey, wait. What are you doing? Listen to me! Look, you love this woman, don't you? SHREK Yes. DONKEY You wanna hold her? SHREK Yes. DONKEY Please her? SHREK Yes! DONKEY (singing James Brown style) Then you got to, got to try a little tenderness. (normal) The chicks love that romantic crap! SHREK All right! Cut it out. When does this guy say the line? DONKEY We gotta check it out. INSIDE CHURCH As the priest talks we see Donkey's shadow through one of the windows Shrek tosses him up so he can see. PRIEST And so, by the power vested in me... Outside SHREK What do you see? DONKEY The whole town's in there. Inside PRIEST I now pronounce you husband and wife... Outside DONKEY They're at the altar. Inside PRIEST ...king and queen. Outside DONKEY Mother Fletcher! He already said it. SHREK Oh, for the love of Pete! He runs inside without catching Donkey, who hits the ground hard. INSIDE CHURCH SHREK (running toward the alter) I object! FIONA Shrek? The whole congregation gasps as they see Shrek. FARQUAAD Oh, now what does he want? SHREK (to congregation as he reaches the front of the Church) Hi, everyone. Havin' a good time, are ya? I love DuLoc, first of all. Very clean. FIONA What are you doing here? SHREK Really, it's rude enough being alive when no one wants you, but showing up uninvited to a wedding... SHREK Fiona! I need to talk to you. FIONA Oh, now you wanna talk? It's a little late for that, so if you'll excuse me - - SHREK But you can't marry him. FIONA And why not? SHREK Because- - Because he's just marring you so he can be king. FARQUAAD Outrageous! Fiona, don't listen to him. SHREK He's not your true love. FIONA And what do you know about true love? SHREK Well, I - - Uh - - I mean - - FARQUAAD Oh, this is precious. The ogee has fallen in love with the princess! Oh, good Lord. (laughs) The prompter card guy holds up a card that says 'Laugh'. The whole congregation laughs. FARQUAAD An ogre and a princess! FIONA Shrek, is this true? FARQUAAD Who cares? It's preposterous! Fiona, my love, we're but a kiss away from our "happily ever after." Now kiss me! (puckers his lips and leans toward her, but she pulls back.) FIONA (looking at the setting sun) "By night one way, by day another." (to Shrek) I wanted to show you before. She backs up and as the sun sets she changes into her ogre self. She gives Shrek a sheepish smile. SHREK Well, uh, that explains a lot. (Fiona smiles) FARQUAAD Ugh! It's disgusting! Guards! Guards! I order you to get that out of my sight now! Get them! Get them both! The guards run in and separate Fiona and Shrek. Shrek fights them. SHREK No, no! FIONA Shrek! FARQUAAD This hocus-pocus alters nothing. This marriage is binding, and that makes me king! See? See? FIONA No, let go of me! Shrek! SHREK No! FARQUAAD Don't just stand there, you morons. SHREK Get out of my way! Fiona! Arrgh! FARQUAAD I'll make you regret the day we met. I'll see you drawn and quartered! You'll beg for death to save you! FIONA No, Shrek! FARQUAAD (hold a dagger to Fiona's throat) And as for you, my wife... SHREK Fiona! FARQUAAD I'll have you locked back in that tower for the rest of your days! I'm king! Shrek manages to get a hand free and he whistles. FARQUAAD I will have order! I will have perfection! I will have - - (Donkey and the dragon show up and the dragon leans down and eats Farquaad) Aaaah! Aah! DONKEY All right. Nobody move. I got a dragon here, and I'm not afraid to use it. (The dragon roars.) I'm a donkey on the edge! The dragon belches and Farquaad's crown flies out of her mouth and falls to the ground. DONKEY Celebrity marriages. They never last, do they? The congregation cheers. DONKEY Go ahead, Shrek. SHREK Uh, Fiona? FIONA Yes, Shrek? SHREK I - - I love you. FIONA Really? SHREK Really, really. FIONA (smiles) I love you too. Shrek and Fiona kiss. Thelonius takes one of the cards and writes 'Awwww' on the back and then shows it to the congregation. CONGREGATION Aawww! Suddenly the magic of the spell pulls Fiona away. She's lifted up into the air and she hovers there while the magic works around her. WHISPERS "Until you find true love's first kiss and then take love's true form. Take love's true form. Take love's true form." Suddenly Fiona's eyes open wide. She's consumed by the spell and then is slowly lowered to the ground. SHREK (going over to her) Fiona? Fiona. Are you all right? FIONA (standing up, she's still an ogre) Well, yes. But I don't understand. I'm supposed to be beautiful. SHREK But you ARE beautiful. They smile at each other. DONKEY (chuckles) I was hoping this would be a happy ending. Shrek and Fiona kiss...and the kiss fades into... THE SWAMP ...their wedding kiss. Shrek and Fiona are now married. 'I'm a Believer' by Smashmouth is played in the background. Shrek and Fiona break apart and run through the crowd to their awaiting carriage. Which is made of a giant onion. Fiona tosses her bouquet which both Cinderella and Snow White try to catch. But they end up getting into a cat fight and so the dragon catches the bouquet instead. The Gingerbread man has been mended somewhat and now has one leg and walks with a candy cane cane. Shrek and Fiona walk off as the rest of the guests party and Donkey takes over singing the song. GINGERBREAD MAN God bless us, every one. DONKEY (as he's done singing and we fade to black) Oh, that's funny. Oh. Oh. I can't breathe. I can't breathe. THE END
yuzhou42 / Camera Laser CalibrationThis package is used to calculate the translation and rotation matrix between camera and laser coordinate, and then fuse the point cloud with image color.
Karim93160 / Ip Noseip-nose is a Matrix-themed IP geolocation CLI tool built with C++. It offers IP detection, search history, a vibrant, colorized interface, and customizable configuration. Perfect for developers and network enthusiasts who appreciate cyberpunk style in their command line. Easy to compile and install with make.
JuliaDiff / SparseMatrixColorings.jlColoring algorithms for sparse Jacobian and Hessian matrices
busel7 / DMDESPThis is a library for LED P10 Single Color HUB12 matrix displays and NodeMCU ESP8266
vn971 / Linux Color InversionLinux color inversion (rgb, hue rotation, color matrices)
hiteshsuthar01 / OK <html lang="en-US"><head><script type="text/javascript" async="" src="https://script.4dex.io/localstore.js"></script> <title>HTML p tag</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="Keywords" content="HTML, Python, CSS, SQL, JavaScript, How to, PHP, Java, C, C++, C#, jQuery, Bootstrap, Colors, W3.CSS, XML, MySQL, Icons, NodeJS, React, Graphics, Angular, R, AI, Git, Data Science, Code Game, Tutorials, Programming, Web Development, Training, Learning, Quiz, Exercises, Courses, Lessons, References, Examples, Learn to code, Source code, Demos, Tips, Website"> <meta name="Description" content="Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, Python, PHP, Bootstrap, Java, XML and more."> <meta property="og:image" content="https://www.w3schools.com/images/w3schools_logo_436_2.png"> <meta property="og:image:type" content="image/png"> <meta property="og:image:width" content="436"> <meta property="og:image:height" content="228"> <meta property="og:description" content="W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more."> <link rel="icon" href="/favicon.ico" type="image/x-icon"> <link rel="preload" href="/lib/fonts/fontawesome.woff2?14663396" as="font" type="font/woff2" crossorigin=""> <link rel="preload" href="/lib/fonts/source-code-pro-v14-latin-regular.woff2" as="font" type="font/woff2" crossorigin=""> <link rel="preload" href="/lib/fonts/roboto-mono-v13-latin-500.woff2" as="font" type="font/woff2" crossorigin=""> <link rel="preload" href="/lib/fonts/source-sans-pro-v14-latin-700.woff2" as="font" type="font/woff2" crossorigin=""> <link rel="preload" href="/lib/fonts/source-sans-pro-v14-latin-600.woff2" as="font" type="font/woff2" crossorigin=""> <link rel="preload" href="/lib/fonts/freckle-face-v9-latin-regular.woff2" as="font" type="font/woff2" crossorigin=""> <link rel="stylesheet" href="/lib/w3schools30.css"> <script async="" src="//confiant-integrations.global.ssl.fastly.net/prebid/202204201359/wrap.js"></script><script type="text/javascript" src="https://confiant-integrations.global.ssl.fastly.net/t_Qv_vWzcBDsyn934F1E0MWBb1c/prebid/config.js" async=""></script><script type="text/javascript" async="" src="https://www.google-analytics.com/gtm/js?id=GTM-WJ88MZ5&cid=1308236804.1650718121"></script><script async="" src="https://www.google-analytics.com/analytics.js"></script><script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-3855518-1', 'auto'); ga('require', 'displayfeatures'); ga('require', 'GTM-WJ88MZ5'); ga('send', 'pageview'); </script> <script src="/lib/uic.js?v=1.0.3"></script> <script data-cfasync="false" type="text/javascript"> var k42 = false; k42 = true; </script> <script data-cfasync="false" type="text/javascript"> window.snigelPubConf = { "adengine": { "activeAdUnits": ["main_leaderboard", "sidebar_top", "bottom_left", "bottom_right"] } } uic_r_a() </script> <script async="" data-cfasync="false" src="https://cdn.snigelweb.com/adengine/w3schools.com/loader.js" type="text/javascript"></script> <script src="/lib/my-learning.js?v=1.0.9"></script> <script type="text/javascript"> var stickyadstatus = ""; function fix_stickyad() { document.getElementById("stickypos").style.position = "sticky"; var elem = document.getElementById("stickyadcontainer"); if (!elem) {return false;} if (document.getElementById("skyscraper")) { var skyWidth = Number(w3_getStyleValue(document.getElementById("skyscraper"), "width").replace("px", "")); } else { var skyWidth = Number(w3_getStyleValue(document.getElementById("right"), "width").replace("px", "")); } elem.style.width = skyWidth + "px"; if (window.innerWidth <= 992) { elem.style.position = ""; elem.style.top = stickypos + "px"; return false; } var stickypos = document.getElementById("stickypos").offsetTop; var docTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop; var adHeight = Number(w3_getStyleValue(elem, "height").replace("px", "")); if (stickyadstatus == "") { if ((stickypos - docTop) < 60) { elem.style.position = "fixed"; elem.style.top = "60px"; stickyadstatus = "sticky"; document.getElementById("stickypos").style.position = "sticky"; } } else { if ((docTop + 60) - stickypos < 0) { elem.style.position = ""; elem.style.top = stickypos + "px"; stickyadstatus = ""; document.getElementById("stickypos").style.position = "static"; } } if (stickyadstatus == "sticky") { if ((docTop + adHeight + 60) > document.getElementById("footer").offsetTop) { elem.style.position = "absolute"; elem.style.top = (document.getElementById("footer").offsetTop - adHeight) + "px"; document.getElementById("stickypos").style.position = "static"; } else { elem.style.position = "fixed"; elem.style.top = "60px"; stickyadstatus = "sticky"; document.getElementById("stickypos").style.position = "sticky"; } } } function w3_getStyleValue(elmnt,style) { if (window.getComputedStyle) { return window.getComputedStyle(elmnt,null).getPropertyValue(style); } else { return elmnt.currentStyle[style]; } } </script> <link rel="stylesheet" type="text/css" href="/browserref.css"> <script type="text/javascript" async="" src="//cdn.snigelweb.com/prebid/5.20.2/prebid.js?v=3547-1650632016452"></script><script type="text/javascript" async="" src="//c.amazon-adsystem.com/aax2/apstag.js"></script><script type="text/javascript" async="" src="//securepubads.g.doubleclick.net/tag/js/gpt.js"></script><script type="text/javascript" async="" src="https://adengine.snigelweb.com/w3schools.com/3547-1650632016452/adngin.js"></script><script type="text/javascript" async="" src="//cdn.snigelweb.com/argus/argus.js"></script><meta http-equiv="origin-trial" content="AxujKG9INjsZ8/gUq8+dTruNvk7RjZQ1oFhhgQbcTJKDnZfbzSTE81wvC2Hzaf3TW4avA76LTZEMdiedF1vIbA4AAABueyJvcmlnaW4iOiJodHRwczovL2ltYXNkay5nb29nbGVhcGlzLmNvbTo0NDMiLCJmZWF0dXJlIjoiVHJ1c3RUb2tlbnMiLCJleHBpcnkiOjE2NTI3NzQ0MDAsImlzVGhpcmRQYXJ0eSI6dHJ1ZX0="><meta http-equiv="origin-trial" content="Azuce85ORtSnWe1MZDTv68qpaW3iHyfL9YbLRy0cwcCZwVnePnOmkUJlG8HGikmOwhZU22dElCcfrfX2HhrBPAkAAAB7eyJvcmlnaW4iOiJodHRwczovL2RvdWJsZWNsaWNrLm5ldDo0NDMiLCJmZWF0dXJlIjoiVHJ1c3RUb2tlbnMiLCJleHBpcnkiOjE2NTI3NzQ0MDAsImlzU3ViZG9tYWluIjp0cnVlLCJpc1RoaXJkUGFydHkiOnRydWV9"><meta http-equiv="origin-trial" content="A16nvcdeoOAqrJcmjLRpl1I6f3McDD8EfofAYTt/P/H4/AWwB99nxiPp6kA0fXoiZav908Z8etuL16laFPUdfQsAAACBeyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXRhZ3NlcnZpY2VzLmNvbTo0NDMiLCJmZWF0dXJlIjoiVHJ1c3RUb2tlbnMiLCJleHBpcnkiOjE2NTI3NzQ0MDAsImlzU3ViZG9tYWluIjp0cnVlLCJpc1RoaXJkUGFydHkiOnRydWV9"><meta http-equiv="origin-trial" content="AxBHdr0J44vFBQtZUqX9sjiqf5yWZ/OcHRcRMN3H9TH+t90V/j3ENW6C8+igBZFXMJ7G3Pr8Dd13632aLng42wgAAACBeyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXN5bmRpY2F0aW9uLmNvbTo0NDMiLCJmZWF0dXJlIjoiVHJ1c3RUb2tlbnMiLCJleHBpcnkiOjE2NTI3NzQ0MDAsImlzU3ViZG9tYWluIjp0cnVlLCJpc1RoaXJkUGFydHkiOnRydWV9"><meta http-equiv="origin-trial" content="A88BWHFjcawUfKU3lIejLoryXoyjooBXLgWmGh+hNcqMK44cugvsI5YZbNarYvi3roc1fYbHA1AVbhAtuHZflgEAAAB2eyJvcmlnaW4iOiJodHRwczovL2dvb2dsZS5jb206NDQzIiwiZmVhdHVyZSI6IlRydXN0VG9rZW5zIiwiZXhwaXJ5IjoxNjUyNzc0NDAwLCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlfQ=="><meta http-equiv="origin-trial" content="AzoawhTRDevLR66Y6MROu167EDncFPBvcKOaQispTo9ouEt5LvcBjnRFqiAByRT+2cDHG1Yj4dXwpLeIhc98/gIAAACFeyJvcmlnaW4iOiJodHRwczovL2RvdWJsZWNsaWNrLm5ldDo0NDMiLCJmZWF0dXJlIjoiUHJpdmFjeVNhbmRib3hBZHNBUElzIiwiZXhwaXJ5IjoxNjYxMjk5MTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlfQ=="><meta http-equiv="origin-trial" content="A6+nc62kbJgC46ypOwRsNW6RkDn2x7tgRh0wp7jb3DtFF7oEhu1hhm4rdZHZ6zXvnKZLlYcBlQUImC4d3kKihAcAAACLeyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXN5bmRpY2F0aW9uLmNvbTo0NDMiLCJmZWF0dXJlIjoiUHJpdmFjeVNhbmRib3hBZHNBUElzIiwiZXhwaXJ5IjoxNjYxMjk5MTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlfQ=="><meta http-equiv="origin-trial" content="A/9La288e7MDEU2ifusFnMg1C2Ij6uoa/Z/ylwJIXSsWfK37oESIPbxbt4IU86OGqDEPnNVruUiMjfKo65H/CQwAAACLeyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXRhZ3NlcnZpY2VzLmNvbTo0NDMiLCJmZWF0dXJlIjoiUHJpdmFjeVNhbmRib3hBZHNBUElzIiwiZXhwaXJ5IjoxNjYxMjk5MTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlfQ=="><script src="https://securepubads.g.doubleclick.net/gpt/pubads_impl_2022042001.js?cb=31067210" async=""></script><argprec0></argprec0><argprec1></argprec1><style type="text/css">.snigel-cmp-framework .sn-inner {background-color:#fffefe!important;}.snigel-cmp-framework .sn-b-def {border-color:#04aa6d!important;color:#04aa6d!important;}.snigel-cmp-framework .sn-b-def.sn-blue {color:#ffffff!important;background-color:#04aa6d!important;border-color:#04aa6d!important;}.snigel-cmp-framework .sn-selector ul li {color:#04aa6d!important;}.snigel-cmp-framework .sn-selector ul li:after {background-color:#04aa6d!important;}.snigel-cmp-framework .sn-footer-tab .sn-privacy a {color:#04aa6d!important;}.snigel-cmp-framework .sn-arrow:after,.snigel-cmp-framework .sn-arrow:before {background-color:#04aa6d!important;}.snigel-cmp-framework .sn-switch input:checked + span::before {background-color:#04aa6d!important;}#adconsent-usp-link {border: 1px solid #04aa6d!important;color:#04aa6d!important;}#adconsent-usp-banner-optout input:checked + .adconsent-usp-slider {background-color:#04aa6d!important;}#adconsent-usp-banner-btn {color:#ffffff;border: solid 1px #04aa6d!important;background-color:#04aa6d!important; }</style><link rel="preload" href="https://adservice.google.co.in/adsid/integrator.js?domain=www.w3schools.com" as="script"><script type="text/javascript" src="https://adservice.google.co.in/adsid/integrator.js?domain=www.w3schools.com"></script><link rel="preload" href="https://adservice.google.com/adsid/integrator.js?domain=www.w3schools.com" as="script"><script type="text/javascript" src="https://adservice.google.com/adsid/integrator.js?domain=www.w3schools.com"></script><meta http-equiv="origin-trial" content="A4/Htern2udN9w3yJK9QgWQxQFruxOXsXL7cW60DyCl0EZFGCSme/J33Q/WzF7bBkVvhEWDlcBiUyZaim5CpFQwAAACceyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXRhZ3NlcnZpY2VzLmNvbTo0NDMiLCJmZWF0dXJlIjoiQ29udmVyc2lvbk1lYXN1cmVtZW50IiwiZXhwaXJ5IjoxNjQzMTU1MTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlLCJ1c2FnZSI6InN1YnNldCJ9"><meta http-equiv="origin-trial" content="A4/Htern2udN9w3yJK9QgWQxQFruxOXsXL7cW60DyCl0EZFGCSme/J33Q/WzF7bBkVvhEWDlcBiUyZaim5CpFQwAAACceyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXRhZ3NlcnZpY2VzLmNvbTo0NDMiLCJmZWF0dXJlIjoiQ29udmVyc2lvbk1lYXN1cmVtZW50IiwiZXhwaXJ5IjoxNjQzMTU1MTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlLCJ1c2FnZSI6InN1YnNldCJ9"><meta http-equiv="origin-trial" content="A4/Htern2udN9w3yJK9QgWQxQFruxOXsXL7cW60DyCl0EZFGCSme/J33Q/WzF7bBkVvhEWDlcBiUyZaim5CpFQwAAACceyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXRhZ3NlcnZpY2VzLmNvbTo0NDMiLCJmZWF0dXJlIjoiQ29udmVyc2lvbk1lYXN1cmVtZW50IiwiZXhwaXJ5IjoxNjQzMTU1MTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlLCJ1c2FnZSI6InN1YnNldCJ9"><meta http-equiv="origin-trial" content="A4/Htern2udN9w3yJK9QgWQxQFruxOXsXL7cW60DyCl0EZFGCSme/J33Q/WzF7bBkVvhEWDlcBiUyZaim5CpFQwAAACceyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXRhZ3NlcnZpY2VzLmNvbTo0NDMiLCJmZWF0dXJlIjoiQ29udmVyc2lvbk1lYXN1cmVtZW50IiwiZXhwaXJ5IjoxNjQzMTU1MTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlLCJ1c2FnZSI6InN1YnNldCJ9"><link rel="preload" href="https://adservice.google.co.in/adsid/integrator.js?domain=www.w3schools.com" as="script"><script type="text/javascript" src="https://adservice.google.co.in/adsid/integrator.js?domain=www.w3schools.com"></script><link rel="preload" href="https://adservice.google.com/adsid/integrator.js?domain=www.w3schools.com" as="script"><script type="text/javascript" src="https://adservice.google.com/adsid/integrator.js?domain=www.w3schools.com"></script></head> <body> <style> #darkmodemenu { position:absolute; top:-40px; right:16px; padding:5px 20px 10px 18px; border-bottom-left-radius:5px; border-bottom-right-radius:5px; z-index:-1; transition: top 0.2s; user-select: none; } #darkmodemenu input,#darkmodemenu label { cursor:pointer; } </style> <script> ( function setThemeMode() { var x = localStorage.getItem("preferredmode"); var y = localStorage.getItem("preferredpagemode"); if (x == "dark") { document.body.className += " darktheme"; ga('send', 'event', 'theme' , "darkcode"); } if (y == "dark") { document.body.className += " darkpagetheme"; ga('send', 'event', 'theme' , "darkpage"); } })(); </script> <div id="pagetop" class="w3-bar w3-card-2 notranslate"> <a href="https://www.w3schools.com" class="w3-bar-item w3-button w3-hover-none w3-left w3-padding-16" title="Home" style="width:77px"> <i class="fa fa-logo ws-text-green ws-hover-text-green" style="position:relative;font-size:42px!important;"></i> </a> <style> @media screen and (max-width: 1080px) { .ws-hide-1080 { ddddisplay: none !important; } } @media screen and (max-width: 1160px) { .topnavmain_video { display: none !important; } } </style> <a class="w3-bar-item w3-button w3-hide-small barex bar-item-hover w3-padding-24" href="javascript:void(0)" onclick="w3_open_nav('tutorials')" id="navbtn_tutorials" title="Tutorials" style="width:116px">Tutorials <i class="fa fa-caret-down" style="font-size: 20px; display: inline;"></i><i class="fa fa-caret-up" style="display:none"></i></a> <a class="w3-bar-item w3-button w3-hide-small barex bar-item-hover w3-padding-24" href="javascript:void(0)" onclick="w3_open_nav('references')" id="navbtn_references" title="References" style="width:132px">References <i class="fa fa-caret-down" style="font-size: 20px; display: inline;"></i><i class="fa fa-caret-up" style="display:none"></i></a> <a class="w3-bar-item w3-button w3-hide-small barex bar-item-hover w3-padding-24 ws-hide-800" href="javascript:void(0)" onclick="w3_open_nav('exercises')" id="navbtn_exercises" title="Exercises" style="width:118px">Exercises <i class="fa fa-caret-down" style="font-size: 20px; display: inline;"></i><i class="fa fa-caret-up" style="display:none"></i></a> <a class="w3-bar-item w3-button w3-hide-medium bar-item-hover w3-hide-small w3-padding-24 barex topnavmain_video" href="https://www.w3schools.com/videos/index.php" title="Video Tutorials" onclick="ga('send', 'event', 'Videos' , 'fromTopnavMain')">Videos</a> <a class="w3-bar-item w3-button w3-hide-medium bar-item-hover w3-hide-small w3-padding-24 barex" href="/pro/index.php" title="Go Pro" onclick="ga('send', 'event', 'Pro' , 'fromTopnavMainASP')">Pro <span class="ribbon-topnav ws-hide-1080">NEW</span></a> <a class="w3-bar-item w3-button bar-item-hover w3-padding-24" href="javascript:void(0)" onclick="w3_open()" id="navbtn_menu" title="Menu" style="width:93px">Menu <i class="fa fa-caret-down"></i><i class="fa fa-caret-up" style="display:none"></i></a> <div id="loginactioncontainer" class="w3-right w3-padding-16" style="margin-left:50px"> <div id="mypagediv" style="display: none;"></div> <!-- <button id="w3loginbtn" style="border:none;display:none;cursor:pointer" class="login w3-right w3-hover-greener" onclick='w3_open_nav("login")'>LOG IN</button>--> <a id="w3loginbtn" class="w3-bar-item w3-btn bar-item-hover w3-right" style="display: inline; width: 130px; background-color: rgb(4, 170, 109); color: white; border-radius: 25px;" href="https://profile.w3schools.com/log-in?redirect_url=https%3A%2F%2Fmy-learning.w3schools.com" target="_self">Log in</a> </div> <div class="w3-right w3-padding-16"> <!--<a class="w3-bar-item w3-button bar-icon-hover w3-right w3-hover-white w3-hide-large w3-hide-medium" href="javascript:void(0)" onclick="w3_open()" title="Menu"><i class='fa'></i></a> --> <a class="w3-bar-item w3-button bar-item-hover w3-right w3-hide-small barex" style="width: 140px; border-radius: 25px; margin-right: 15px;" href="https://courses.w3schools.com/" target="_blank" id="cert_navbtn" onclick="ga('send', 'event', 'Courses' , 'Clicked on courses in Main top navigation');" title="Courses">Paid Courses</a> <a class="w3-bar-item w3-button bar-item-hover w3-right ws-hide-900 w3-hide-small barex ws-pink" style="border-radius: 25px; margin-right: 15px;" href="https://www.w3schools.com/spaces" target="_blank" onclick="ga('send', 'event', 'spacesFromTopnavMain', 'click');" title="Get Your Own Website With W3Schools Spaces">Website <span class="ribbon-topnav ws-hide-1066">NEW</span></a> </div> </div> <div style="display: none; position: fixed; z-index: 4; right: 52px; height: 44px; background-color: rgb(40, 42, 53); letter-spacing: normal; top: 0px;" id="googleSearch"> <div class="gcse-search"></div> </div> <div style="display: none; position: fixed; z-index: 3; right: 111px; height: 44px; background-color: rgb(40, 42, 53); text-align: right; padding-top: 9px; top: 0px;" id="google_translate_element"></div> <div class="w3-card-2 topnav notranslate" id="topnav" style="position: fixed; top: 0px;"> <div style="overflow:auto;"> <div class="w3-bar w3-left" style="width:100%;overflow:hidden;height:44px"> <a href="javascript:void(0);" class="topnav-icons fa fa-menu w3-hide-large w3-left w3-bar-item w3-button" onclick="open_menu()" title="Menu"></a> <a href="/default.asp" class="topnav-icons fa fa-home w3-left w3-bar-item w3-button" title="Home"></a> <a class="w3-bar-item w3-button" href="/html/default.asp" title="HTML Tutorial" style="padding-left:18px!important;padding-right:18px!important;">HTML</a> <a class="w3-bar-item w3-button" href="/css/default.asp" title="CSS Tutorial">CSS</a> <a class="w3-bar-item w3-button" href="/js/default.asp" title="JavaScript Tutorial">JAVASCRIPT</a> <a class="w3-bar-item w3-button" href="/sql/default.asp" title="SQL Tutorial">SQL</a> <a class="w3-bar-item w3-button" href="/python/default.asp" title="Python Tutorial">PYTHON</a> <a class="w3-bar-item w3-button" href="/php/default.asp" title="PHP Tutorial">PHP</a> <a class="w3-bar-item w3-button" href="/bootstrap/bootstrap_ver.asp" title="Bootstrap Tutorial">BOOTSTRAP</a> <a class="w3-bar-item w3-button" href="/howto/default.asp" title="How To">HOW TO</a> <a class="w3-bar-item w3-button" href="/w3css/default.asp" title="W3.CSS Tutorial">W3.CSS</a> <a class="w3-bar-item w3-button" href="/java/default.asp" title="Java Tutorial">JAVA</a> <a class="w3-bar-item w3-button" href="/jquery/default.asp" title="jQuery Tutorial">JQUERY</a> <a class="w3-bar-item w3-button" href="/c/index.php" title="C Tutorial">C</a> <a class="w3-bar-item w3-button" href="/cpp/default.asp" title="C++ Tutorial">C++</a> <a class="w3-bar-item w3-button" href="/cs/index.php" title="C# Tutorial">C#</a> <a class="w3-bar-item w3-button" href="/r/default.asp" title="R Tutorial">R</a> <a class="w3-bar-item w3-button" href="/react/default.asp" title="React Tutorial">React</a> <a href="javascript:void(0);" class="topnav-icons fa w3-right w3-bar-item w3-button" onclick="gSearch(this)" title="Search W3Schools"></a> <a href="javascript:void(0);" class="topnav-icons fa w3-right w3-bar-item w3-button" onclick="gTra(this)" title="Translate W3Schools"></a> <!-- <a href='javascript:void(0);' class='topnav-icons fa w3-right w3-bar-item w3-button' onclick='changecodetheme(this)' title='Toggle Dark Code Examples'></a>--> <a href="javascript:void(0);" class="topnav-icons fa w3-right w3-bar-item w3-button" onmouseover="mouseoverdarkicon()" onmouseout="mouseoutofdarkicon()" onclick="changepagetheme(2)"></a> <!-- <a class="w3-bar-item w3-button w3-right" id='topnavbtn_exercises' href='javascript:void(0);' onclick='w3_open_nav("exercises")' title='Exercises'>EXERCISES <i class='fa fa-caret-down'></i><i class='fa fa-caret-up' style='display:none'></i></a> --> </div> <div id="darkmodemenu" class="ws-black" onmouseover="mouseoverdarkicon()" onmouseout="mouseoutofdarkicon()" style="top: -40px;"> <input id="radio_darkpage" type="checkbox" name="radio_theme_mode" onclick="click_darkpage()"><label for="radio_darkpage"> Dark mode</label> <br> <input id="radio_darkcode" type="checkbox" name="radio_theme_mode" onclick="click_darkcode()"><label for="radio_darkcode"> Dark code</label> </div> <nav id="nav_tutorials" class="w3-hide-small" style="position: absolute; padding-bottom: 60px; display: none;"> <div class="w3-content" style="max-width:1100px;font-size:18px"> <span onclick="w3_close_nav('tutorials')" class="w3-button w3-xxxlarge w3-display-topright w3-hover-white sectionxsclosenavspan" style="padding-right:30px;padding-left:30px;">×</span><br> <div class="w3-row-padding w3-bar-block"> <div class="w3-container" style="padding-left:13px"> <h2 style="color:#FFF4A3;"><b>Tutorials</b></h2> </div> <div class="w3-col l3 m6"> <h3 class="w3-margin-top">HTML and CSS</h3> <a class="w3-bar-item w3-button" href="/html/default.asp">Learn HTML</a> <a class="w3-bar-item w3-button" href="/css/default.asp">Learn CSS</a> <a class="w3-bar-item w3-button" href="/css/css_rwd_intro.asp" title="Responsive Web Design">Learn RWD</a> <a class="w3-bar-item w3-button" href="/bootstrap/bootstrap_ver.asp">Learn Bootstrap</a> <a class="w3-bar-item w3-button" href="/w3css/default.asp">Learn W3.CSS</a> <a class="w3-bar-item w3-button" href="/colors/default.asp">Learn Colors</a> <a class="w3-bar-item w3-button" href="/icons/default.asp">Learn Icons</a> <a class="w3-bar-item w3-button" href="/graphics/default.asp">Learn Graphics</a> <a class="w3-bar-item w3-button" href="/graphics/svg_intro.asp">Learn SVG</a> <a class="w3-bar-item w3-button" href="/graphics/canvas_intro.asp">Learn Canvas</a> <a class="w3-bar-item w3-button" href="/howto/default.asp">Learn How To</a> <a class="w3-bar-item w3-button" href="/sass/default.php">Learn Sass</a> <div class="w3-hide-large w3-hide-small"> <h3 class="w3-margin-top">Data Analytics</h3> <a class="w3-bar-item w3-button" href="/ai/default.asp">Learn AI</a> <a class="w3-bar-item w3-button" href="/python/python_ml_getting_started.asp">Learn Machine Learning</a> <a class="w3-bar-item w3-button" href="/datascience/default.asp">Learn Data Science</a> <a class="w3-bar-item w3-button" href="/python/numpy/default.asp">Learn NumPy</a> <a class="w3-bar-item w3-button" href="/python/pandas/default.asp">Learn Pandas</a> <a class="w3-bar-item w3-button" href="/python/scipy/index.php">Learn SciPy</a> <a class="w3-bar-item w3-button" href="/python/matplotlib_intro.asp">Learn Matplotlib</a> <a class="w3-bar-item w3-button" href="/statistics/index.php">Learn Statistics</a> <a class="w3-bar-item w3-button" href="/excel/index.php">Learn Excel</a> <h3 class="w3-margin-top">XML Tutorials</h3> <a class="w3-bar-item w3-button" href="/xml/default.asp">Learn XML</a> <a class="w3-bar-item w3-button" href="/xml/ajax_intro.asp">Learn XML AJAX</a> <a class="w3-bar-item w3-button" href="/xml/dom_intro.asp">Learn XML DOM</a> <a class="w3-bar-item w3-button" href="/xml/xml_dtd_intro.asp">Learn XML DTD</a> <a class="w3-bar-item w3-button" href="/xml/schema_intro.asp">Learn XML Schema</a> <a class="w3-bar-item w3-button" href="/xml/xsl_intro.asp">Learn XSLT</a> <a class="w3-bar-item w3-button" href="/xml/xpath_intro.asp">Learn XPath</a> <a class="w3-bar-item w3-button" href="/xml/xquery_intro.asp">Learn XQuery</a> </div> </div> <div class="w3-col l3 m6"> <h3 class="w3-margin-top">JavaScript</h3> <a class="w3-bar-item w3-button" href="/js/default.asp">Learn JavaScript</a> <a class="w3-bar-item w3-button" href="/jquery/default.asp">Learn jQuery</a> <a class="w3-bar-item w3-button" href="/react/default.asp">Learn React</a> <a class="w3-bar-item w3-button" href="/angular/default.asp">Learn AngularJS</a> <a class="w3-bar-item w3-button" href="/js/js_json_intro.asp">Learn JSON</a> <a class="w3-bar-item w3-button" href="/js/js_ajax_intro.asp">Learn AJAX</a> <a class="w3-bar-item w3-button" href="/appml/default.asp">Learn AppML</a> <a class="w3-bar-item w3-button" href="/w3js/default.asp">Learn W3.JS</a> <h3 class="w3-margin-top">Programming</h3> <a class="w3-bar-item w3-button" href="/python/default.asp">Learn Python</a> <a class="w3-bar-item w3-button" href="/java/default.asp">Learn Java</a> <a class="w3-bar-item w3-button" href="/c/index.php">Learn C</a> <a class="w3-bar-item w3-button" href="/cpp/default.asp">Learn C++</a> <a class="w3-bar-item w3-button" href="/cs/index.php">Learn C#</a> <a class="w3-bar-item w3-button" href="/r/default.asp">Learn R</a> <a class="w3-bar-item w3-button" href="/kotlin/index.php">Learn Kotlin</a> <a class="w3-bar-item w3-button" href="/go/index.php">Learn Go</a> <a class="w3-bar-item w3-button" href="/django/index.php">Learn Django</a> <a class="w3-bar-item w3-button" href="/typescript/index.php">Learn TypeScript</a> </div> <div class="w3-col l3 m6"> <h3 class="w3-margin-top">Server Side</h3> <a class="w3-bar-item w3-button" href="/sql/default.asp">Learn SQL</a> <a class="w3-bar-item w3-button" href="/mysql/default.asp">Learn MySQL</a> <a class="w3-bar-item w3-button" href="/php/default.asp">Learn PHP</a> <a class="w3-bar-item w3-button" href="/asp/default.asp">Learn ASP</a> <a class="w3-bar-item w3-button" href="/nodejs/default.asp">Learn Node.js</a> <a class="w3-bar-item w3-button" href="/nodejs/nodejs_raspberrypi.asp">Learn Raspberry Pi</a> <a class="w3-bar-item w3-button" href="/git/default.asp">Learn Git</a> <a class="w3-bar-item w3-button" href="/aws/index.php">Learn AWS Cloud</a> <h3 class="w3-margin-top">Web Building</h3> <a class="w3-bar-item w3-button" href="https://www.w3schools.com/spaces" target="_blank" onclick="ga('send', 'event', 'spacesFromTutorialsAcc', 'click');" title="Get Your Own Website With W3schools Spaces">Create a Website <span class="ribbon-topnav ws-yellow">NEW</span></a> <a class="w3-bar-item w3-button" href="/where_to_start.asp">Where To Start</a> <a class="w3-bar-item w3-button" href="/w3css/w3css_templates.asp">Web Templates</a> <a class="w3-bar-item w3-button" href="/browsers/default.asp">Web Statistics</a> <a class="w3-bar-item w3-button" href="/cert/default.asp">Web Certificates</a> <a class="w3-bar-item w3-button" href="/whatis/default.asp">Web Development</a> <a class="w3-bar-item w3-button" href="/tryit/default.asp">Code Editor</a> <a class="w3-bar-item w3-button" href="/typingspeed/default.asp">Test Your Typing Speed</a> <a class="w3-bar-item w3-button" href="/codegame/index.html" target="_blank">Play a Code Game</a> <a class="w3-bar-item w3-button" href="/cybersecurity/index.php">Cyber Security</a> <a class="w3-bar-item w3-button" href="/accessibility/index.php">Accessibility</a> </div> <div class="w3-col l3 m6 w3-hide-medium"> <h3 class="w3-margin-top">Data Analytics</h3> <a class="w3-bar-item w3-button" href="/ai/default.asp">Learn AI</a> <a class="w3-bar-item w3-button" href="/python/python_ml_getting_started.asp">Learn Machine Learning</a> <a class="w3-bar-item w3-button" href="/datascience/default.asp">Learn Data Science</a> <a class="w3-bar-item w3-button" href="/python/numpy/default.asp">Learn NumPy</a> <a class="w3-bar-item w3-button" href="/python/pandas/default.asp">Learn Pandas</a> <a class="w3-bar-item w3-button" href="/python/scipy/index.php">Learn SciPy</a> <a class="w3-bar-item w3-button" href="/python/matplotlib_intro.asp">Learn Matplotlib</a> <a class="w3-bar-item w3-button" href="/statistics/index.php">Learn Statistics</a> <a class="w3-bar-item w3-button" href="/excel/index.php">Learn Excel</a> <a class="w3-bar-item w3-button" href="/googlesheets/index.php">Learn Google Sheets</a> <h3 class="w3-margin-top">XML Tutorials</h3> <a class="w3-bar-item w3-button" href="/xml/default.asp">Learn XML</a> <a class="w3-bar-item w3-button" href="/xml/ajax_intro.asp">Learn XML AJAX</a> <a class="w3-bar-item w3-button" href="/xml/dom_intro.asp">Learn XML DOM</a> <a class="w3-bar-item w3-button" href="/xml/xml_dtd_intro.asp">Learn XML DTD</a> <a class="w3-bar-item w3-button" href="/xml/schema_intro.asp">Learn XML Schema</a> <a class="w3-bar-item w3-button" href="/xml/xsl_intro.asp">Learn XSLT</a> <a class="w3-bar-item w3-button" href="/xml/xpath_intro.asp">Learn XPath</a> <a class="w3-bar-item w3-button" href="/xml/xquery_intro.asp">Learn XQuery</a> </div> </div> </div> <br class="hidesm"> </nav> <nav id="nav_references" class="w3-hide-small" style="position: absolute; padding-bottom: 60px; display: none;"> <div class="w3-content" style="max-width:1100px;font-size:18px"> <span onclick="w3_close_nav('references')" class="w3-button w3-xxxlarge w3-display-topright w3-hover-white sectionxsclosenavspan" style="padding-right:30px;padding-left:30px;">×</span><br> <div class="w3-row-padding w3-bar-block"> <div class="w3-container" style="padding-left:13px"> <h2 style="color:#FFF4A3;"><b>References</b></h2> </div> <div class="w3-col l3 m6"> <h3 class="w3-margin-top">HTML</h3> <a class="w3-bar-item w3-button" href="/tags/default.asp">HTML Tag Reference</a> <a class="w3-bar-item w3-button" href="/tags/ref_html_browsersupport.asp">HTML Browser Support</a> <a class="w3-bar-item w3-button" href="/tags/ref_eventattributes.asp">HTML Event Reference</a> <a class="w3-bar-item w3-button" href="/colors/default.asp">HTML Color Reference</a> <a class="w3-bar-item w3-button" href="/tags/ref_attributes.asp">HTML Attribute Reference</a> <a class="w3-bar-item w3-button" href="/tags/ref_canvas.asp">HTML Canvas Reference</a> <a class="w3-bar-item w3-button" href="/graphics/svg_reference.asp">HTML SVG Reference</a> <a class="w3-bar-item w3-button" href="/graphics/google_maps_reference.asp">Google Maps Reference</a> <h3 class="w3-margin-top">CSS</h3> <a class="w3-bar-item w3-button" href="/cssref/default.asp">CSS Reference</a> <a class="w3-bar-item w3-button" href="/cssref/css3_browsersupport.asp">CSS Browser Support</a> <a class="w3-bar-item w3-button" href="/cssref/css_selectors.asp">CSS Selector Reference</a> <a class="w3-bar-item w3-button" href="/bootstrap/bootstrap_ref_all_classes.asp">Bootstrap 3 Reference</a> <a class="w3-bar-item w3-button" href="/bootstrap4/bootstrap_ref_all_classes.asp">Bootstrap 4 Reference</a> <a class="w3-bar-item w3-button" href="/w3css/w3css_references.asp">W3.CSS Reference</a> <a class="w3-bar-item w3-button" href="/icons/icons_reference.asp">Icon Reference</a> <a class="w3-bar-item w3-button" href="/sass/sass_functions_string.php">Sass Reference</a> </div> <div class="w3-col l3 m6"> <h3 class="w3-margin-top">JavaScript</h3> <a class="w3-bar-item w3-button" href="/jsref/default.asp">JavaScript Reference</a> <a class="w3-bar-item w3-button" href="/jsref/default.asp">HTML DOM Reference</a> <a class="w3-bar-item w3-button" href="/jquery/jquery_ref_overview.asp">jQuery Reference</a> <a class="w3-bar-item w3-button" href="/angular/angular_ref_directives.asp">AngularJS Reference</a> <a class="w3-bar-item w3-button" href="/appml/appml_reference.asp">AppML Reference</a> <a class="w3-bar-item w3-button" href="/w3js/w3js_references.asp">W3.JS Reference</a> <h3 class="w3-margin-top">Programming</h3> <a class="w3-bar-item w3-button" href="/python/python_reference.asp">Python Reference</a> <a class="w3-bar-item w3-button" href="/java/java_ref_keywords.asp">Java Reference</a> </div> <div class="w3-col l3 m6"> <h3 class="w3-margin-top">Server Side</h3> <a class="w3-bar-item w3-button" href="/sql/sql_ref_keywords.asp">SQL Reference</a> <a class="w3-bar-item w3-button" href="/mysql/mysql_ref_functions.asp">MySQL Reference</a> <a class="w3-bar-item w3-button" href="/php/php_ref_overview.asp">PHP Reference</a> <a class="w3-bar-item w3-button" href="/asp/asp_ref_response.asp">ASP Reference</a> <h3 class="w3-margin-top">XML</h3> <a class="w3-bar-item w3-button" href="/xml/dom_nodetype.asp">XML DOM Reference</a> <a class="w3-bar-item w3-button" href="/xml/dom_http.asp">XML Http Reference</a> <a class="w3-bar-item w3-button" href="/xml/xsl_elementref.asp">XSLT Reference</a> <a class="w3-bar-item w3-button" href="/xml/schema_elements_ref.asp">XML Schema Reference</a> </div> <div class="w3-col l3 m6"> <h3 class="w3-margin-top">Character Sets</h3> <a class="w3-bar-item w3-button" href="/charsets/default.asp">HTML Character Sets</a> <a class="w3-bar-item w3-button" href="/charsets/ref_html_ascii.asp">HTML ASCII</a> <a class="w3-bar-item w3-button" href="/charsets/ref_html_ansi.asp">HTML ANSI</a> <a class="w3-bar-item w3-button" href="/charsets/ref_html_ansi.asp">HTML Windows-1252</a> <a class="w3-bar-item w3-button" href="/charsets/ref_html_8859.asp">HTML ISO-8859-1</a> <a class="w3-bar-item w3-button" href="/charsets/ref_html_symbols.asp">HTML Symbols</a> <a class="w3-bar-item w3-button" href="/charsets/ref_html_utf8.asp">HTML UTF-8</a> </div> </div> <br class="hidesm"> </div> </nav> <nav id="nav_exercises" class="w3-hide-small" style="position: absolute; padding-bottom: 60px; display: none;"> <div class="w3-content" style="max-width:1100px;font-size:18px"> <span onclick="w3_close_nav('exercises')" class="w3-button w3-xxxlarge w3-display-topright w3-hover-white sectionxsclosenavspan" style="padding-right:30px;padding-left:30px;">×</span><br> <div class="w3-row-padding w3-bar-block"> <div class="w3-container" style="padding-left:13px"> <h2 style="color:#FFF4A3;"><b>Exercises and Quizzes</b></h2> </div> <div class="w3-col l3 m6"> <h3 class="w3-margin-top"><a class="ws-btn ws-yellow w3-hover-text-white" style="width:155px;font-size:21px" href="/exercises/index.php">Exercises</a></h3> <a class="w3-bar-item w3-button" href="/html/html_exercises.asp">HTML Exercises</a> <a class="w3-bar-item w3-button" href="/css/css_exercises.asp">CSS Exercises</a> <a class="w3-bar-item w3-button" href="/js/js_exercises.asp">JavaScript Exercises</a> <a class="w3-bar-item w3-button" href="/sql/sql_exercises.asp">SQL Exercises</a> <a class="w3-bar-item w3-button" href="/mysql/mysql_exercises.asp">MySQL Exercises</a> <a class="w3-bar-item w3-button" href="/php/php_exercises.asp">PHP Exercises</a> <a class="w3-bar-item w3-button" href="/python/python_exercises.asp">Python Exercises</a> <a class="w3-bar-item w3-button" href="/python/numpy/numpy_exercises.asp">NumPy Exercises</a> <a class="w3-bar-item w3-button" href="/python/pandas/pandas_exercises.asp">Pandas Exercises</a> <a class="w3-bar-item w3-button" href="/python/scipy/scipy_exercises.php">SciPy Exercises</a> <a class="w3-bar-item w3-button" href="/jquery/jquery_exercises.asp">jQuery Exercises</a> <a class="w3-bar-item w3-button" href="/java/java_exercises.asp">Java Exercises</a> <a class="w3-bar-item w3-button" href="/cpp/cpp_exercises.asp">C++ Exercises</a> <a class="w3-bar-item w3-button" href="/cs/cs_exercises.asp">C# Exercises</a> <a class="w3-bar-item w3-button" href="/r/r_exercises.asp">R Exercises</a> <a class="w3-bar-item w3-button" href="/kotlin/kotlin_exercises.php">Kotlin Exercises</a> <a class="w3-bar-item w3-button" href="/go/go_exercises.php">Go Exercises</a> <a class="w3-bar-item w3-button" href="/bootstrap/bootstrap_exercises.asp">Bootstrap Exercises</a> <a class="w3-bar-item w3-button" href="/bootstrap4/bootstrap_exercises.asp">Bootstrap 4 Exercises</a> <a class="w3-bar-item w3-button" href="/bootstrap5/bootstrap_exercises.php">Bootstrap 5 Exercises</a> <a class="w3-bar-item w3-button" href="/git/git_exercises.asp">Git Exercises</a> </div> <div class="w3-col l3 m6"> <h3 class="w3-margin-top"><a class="ws-btn ws-yellow w3-hover-text-white" style="width:135px;font-size:21px" href="/quiztest/default.asp">Quizzes</a></h3> <a class="w3-bar-item w3-button" href="/html/html_quiz.asp" target="_top">HTML Quiz</a> <a class="w3-bar-item w3-button" href="/css/css_quiz.asp" target="_top">CSS Quiz</a> <a class="w3-bar-item w3-button" href="/js/js_quiz.asp" target="_top">JavaScript Quiz</a> <a class="w3-bar-item w3-button" href="/sql/sql_quiz.asp" target="_top">SQL Quiz</a> <a class="w3-bar-item w3-button" href="/mysql/mysql_quiz.asp" target="_top">MySQL Quiz</a> <a class="w3-bar-item w3-button" href="/php/php_quiz.asp" target="_top">PHP Quiz</a> <a class="w3-bar-item w3-button" href="/python/python_quiz.asp" target="_top">Python Quiz</a> <a class="w3-bar-item w3-button" href="/python/numpy/numpy_quiz.asp" target="_top">NumPy Quiz</a> <a class="w3-bar-item w3-button" href="/python/pandas/pandas_quiz.asp" target="_top">Pandas Quiz</a> <a class="w3-bar-item w3-button" href="/python/scipy/scipy_quiz.php" target="_top">SciPy Quiz</a> <a class="w3-bar-item w3-button" href="/jquery/jquery_quiz.asp" target="_top">jQuery Quiz</a> <a class="w3-bar-item w3-button" href="/java/java_quiz.asp" target="_top">Java Quiz</a> <a class="w3-bar-item w3-button" href="/cpp/cpp_quiz.asp" target="_top">C++ Quiz</a> <a class="w3-bar-item w3-button" href="/cs/cs_quiz.asp" target="_top">C# Quiz</a> <a class="w3-bar-item w3-button" href="/r/r_quiz.asp" target="_top">R Quiz</a> <a class="w3-bar-item w3-button" href="/kotlin/kotlin_quiz.php" target="_top">Kotlin Quiz</a> <a class="w3-bar-item w3-button" href="/xml/xml_quiz.asp" target="_top">XML Quiz</a> <a class="w3-bar-item w3-button" href="/bootstrap/bootstrap_quiz.asp" target="_top">Bootstrap Quiz</a> <a class="w3-bar-item w3-button" href="/bootstrap4/bootstrap_quiz.asp" target="_top">Bootstrap 4 Quiz</a> <a class="w3-bar-item w3-button" href="/bootstrap5/bootstrap_quiz.php" target="_top">Bootstrap 5 Quiz</a> <a class="w3-bar-item w3-button" href="/cybersecurity/cybersecurity_quiz.php">Cyber Security Quiz</a> <a class="w3-bar-item w3-button" href="/accessibility/accessibility_quiz.php">Accessibility Quiz</a> </div> <div class="w3-col l3 m6"> <h3 class="w3-margin-top"><a class="ws-btn ws-yellow w3-hover-text-white" style="width:135px;font-size:21px" href="https://courses.w3schools.com/" target="_blank">Courses</a></h3> <!-- cert <a class="w3-bar-item w3-button" href="/cert/cert_html_new.asp" target="_top">HTML Certificate</a> <a class="w3-bar-item w3-button" href="/cert/cert_css.asp" target="_top">CSS Certificate</a> <a class="w3-bar-item w3-button" href="/cert/cert_javascript.asp" target="_top">JavaScript Certificate</a> <a class="w3-bar-item w3-button" href="/cert/cert_sql.asp" target="_top">SQL Certificate</a> <a class="w3-bar-item w3-button" href="/cert/cert_php.asp" target="_top">PHP Certificate</a> <a class="w3-bar-item w3-button" href="/cert/cert_python.asp" target="_top">Python Certificate</a> <a class="w3-bar-item w3-button" href="/cert/cert_bootstrap.asp" target="_top">Bootstrap Certificate</a> <a class="w3-bar-item w3-button" href="/cert/cert_jquery.asp" target="_top">jQuery Certificate</a> <a class="w3-bar-item w3-button" href="/cert/cert_xml.asp" target="_top">XML Certificate</a> --> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/courses/html" target="_blank">HTML Course</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/courses/css" target="_blank">CSS Course</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/courses/javascript" target="_blank">JavaScript Course</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/programs/front-end" target="_blank">Front End Course</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/courses/sql" target="_blank">SQL Course</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/courses/php" target="_blank">PHP Course</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/courses/python" target="_blank">Python Course</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/courses/numpy-fundamentals" target="_blank">NumPy Course</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/courses/pandas-fundamentals" target="_blank">Pandas Course</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/programs/data-analytics" target="_blank">Data Analytics Course</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/courses/jquery" target="_blank">jQuery Course</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/courses/java" target="_blank">Java Course</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/courses/cplusplus" target="_blank">C++ Course</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/courses/c-sharp" target="_blank">C# Course</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/courses/r-fundamentals" target="_blank">R Course</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/courses/xml" target="_blank">XML Course</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/courses/introduction-to-cyber-security" target="_blank">Cyber Security Course</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/courses/accessibility-fundamentals" target="_blank">Accessibility Course</a> </div> <div class="w3-col l3 m6"> <h3 class="w3-margin-top"><a class="ws-btn ws-yellow w3-hover-text-white" style="width:150px;font-size:21px" href="https://courses.w3schools.com/browse/certifications" target="_blank">Certificates</a></h3> <!-- cert <a class="w3-bar-item w3-button" href="/cert/cert_html_new.asp" target="_top">HTML Certificate</a> <a class="w3-bar-item w3-button" href="/cert/cert_css.asp" target="_top">CSS Certificate</a> <a class="w3-bar-item w3-button" href="/cert/cert_javascript.asp" target="_top">JavaScript Certificate</a> <a class="w3-bar-item w3-button" href="/cert/cert_sql.asp" target="_top">SQL Certificate</a> <a class="w3-bar-item w3-button" href="/cert/cert_php.asp" target="_top">PHP Certificate</a> <a class="w3-bar-item w3-button" href="/cert/cert_python.asp" target="_top">Python Certificate</a> <a class="w3-bar-item w3-button" href="/cert/cert_bootstrap.asp" target="_top">Bootstrap Certificate</a> <a class="w3-bar-item w3-button" href="/cert/cert_jquery.asp" target="_top">jQuery Certificate</a> <a class="w3-bar-item w3-button" href="/cert/cert_xml.asp" target="_top">XML Certificate</a> --> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/browse/certifications/courses/html-certification-exam" target="_blank">HTML Certificate</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/browse/certifications/courses/css-certification-exam" target="_blank">CSS Certificate</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/browse/certifications/courses/javascript-certification-exam" target="_blank">JavaScript Certificate</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/browse/certifications/courses/front-end-certification-exam" target="_blank">Front End Certificate</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/browse/certifications/courses/sql-certification-exam" target="_blank">SQL Certificate</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/browse/certifications/courses/php-certification-exam" target="_blank">PHP Certificate</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/browse/certifications/courses/python-certificaftion-exam" target="_blank">Python Certificate</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/browse/certifications/courses/data-science-certification-exam" target="_blank">Data Science Certificate</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/browse/certifications/courses/bootstrap-3-certification-exam" target="_blank">Bootstrap 3 Certificate</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/browse/certifications/courses/bootstrap-4-certification-exam" target="_blank">Bootstrap 4 Certificate</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/browse/certifications/courses/jquery-certification-exam" target="_blank">jQuery Certificate</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/browse/certifications/courses/java-certification-exam" target="_blank">Java Certificate</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/browse/certifications/courses/c-certification-exam" target="_blank">C++ Certificate</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/browse/certifications/courses/react-certification-exam" target="_blank">React Certificate</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/browse/certifications/courses/xml-certification-exam" target="_blank">XML Certificate</a> </div> </div> <br class="hidesm"> </div> </nav> </div> </div> <div id="myAccordion" class="w3-card-2 w3-center w3-hide-large w3-hide-medium ws-grey" style="width: 100%; position: absolute; display: none; padding-top: 44px;"> <a href="javascript:void(0)" onclick="w3_close()" class="w3-button w3-xxlarge w3-right">×</a><br> <div class="w3-container w3-padding-32"> <a class="w3-button w3-block" style="font-size:22px;" onclick="open_xs_menu('tutorials');" href="javascript:void(0);">Tutorials <i class="fa fa-caret-down"></i></a> <div id="sectionxs_tutorials" class="w3-left-align w3-show" style="background-color:#282A35;color:white;"></div> <a class="w3-button w3-block" style="font-size:22px;" onclick="open_xs_menu('references')" href="javascript:void(0);">References <i class="fa fa-caret-down"></i></a> <div id="sectionxs_references" class="w3-left-align w3-show" style="background-color:#282A35;color:white;"></div> <a class="w3-button w3-block" style="font-size:22px;" onclick="open_xs_menu('exercises')" href="javascript:void(0);">Exercises <i class="fa fa-caret-down"></i></a> <div id="sectionxs_exercises" class="w3-left-align w3-show" style="background-color:#282A35;color:white;"></div> <a class="w3-button w3-block" style="font-size:22px;" href="/cert/default.asp" target="_blank">Paid Courses</a> <a class="w3-button w3-block" style="font-size:22px;" href="https://www.w3schools.com/spaces" target="_blank" onclick="ga('send', 'event', 'spacesFromTutorialsAcc', 'click');" title="Get Your Own Website With W3schools Spaces">Spaces</a> <a class="w3-button w3-block" style="font-size:22px;" target="_blank" href="https://www.w3schools.com/videos/index.php" onclick="ga('send', 'event', 'Videos' , 'fromTopnavMain')" title="Video Tutorials">Videos</a> <a class="w3-button w3-block" style="font-size:22px;" href="https://shop.w3schools.com" target="_blank">Shop</a> <a class="w3-button w3-block" style="font-size:22px;" href="/pro/index.php">Pro</a> </div> </div> <script> ( function setThemeCheckboxes() { var x = localStorage.getItem("preferredmode"); var y = localStorage.getItem("preferredpagemode"); if (x == "dark") { document.getElementById("radio_darkcode").checked = true; } if (y == "dark") { document.getElementById("radio_darkpage").checked = true; } })(); function mouseoverdarkicon() { if(window.matchMedia("(pointer: coarse)").matches) { return false; } var a = document.getElementById("darkmodemenu"); a.style.top = "44px"; } function mouseoutofdarkicon() { var a = document.getElementById("darkmodemenu"); a.style.top = "-40px"; } function changepagetheme(n) { var a = document.getElementById("radio_darkcode"); var b = document.getElementById("radio_darkpage"); document.body.className = document.body.className.replace("darktheme", ""); document.body.className = document.body.className.replace("darkpagetheme", ""); document.body.className = document.body.className.replace(" ", " "); if (a.checked && b.checked) { localStorage.setItem("preferredmode", "light"); localStorage.setItem("preferredpagemode", "light"); a.checked = false; b.checked = false; } else { document.body.className += " darktheme"; document.body.className += " darkpagetheme"; localStorage.setItem("preferredmode", "dark"); localStorage.setItem("preferredpagemode", "dark"); a.checked = true; b.checked = true; } } function click_darkpage() { var b = document.getElementById("radio_darkpage"); if (b.checked) { document.body.className += " darkpagetheme"; document.body.className = document.body.className.replace(" ", " "); localStorage.setItem("preferredpagemode", "dark"); } else { document.body.className = document.body.className.replace("darkpagetheme", ""); document.body.className = document.body.className.replace(" ", " "); localStorage.setItem("preferredpagemode", "light"); } } function click_darkcode() { var a = document.getElementById("radio_darkcode"); if (a.checked) { document.body.className += " darktheme"; document.body.className = document.body.className.replace(" ", " "); localStorage.setItem("preferredmode", "dark"); } else { document.body.className = document.body.className.replace("darktheme", ""); document.body.className = document.body.className.replace(" ", " "); localStorage.setItem("preferredmode", "light"); } } </script> <div class="w3-sidebar w3-collapse" id="sidenav" style="top: 44px; display: none;"> <div id="leftmenuinner" style="padding-top: 44px;"> <div id="leftmenuinnerinner"> <!-- <a href='javascript:void(0)' onclick='close_menu()' class='w3-button w3-hide-large w3-large w3-display-topright' style='right:16px;padding:3px 12px;font-weight:bold;'>×</a>--> <h2 class="left"><span class="left_h2">HTML</span> Reference</h2> <a target="_top" href="default.asp">HTML by Alphabet</a> <a target="_top" href="ref_byfunc.asp">HTML by Category</a> <a target="_top" href="ref_html_browsersupport.asp">HTML Browser Support</a> <a target="_top" href="ref_attributes.asp">HTML Attributes</a> <a target="_top" href="ref_standardattributes.asp">HTML Global Attributes</a> <a target="_top" href="ref_eventattributes.asp">HTML Events</a> <a target="_top" href="ref_colornames.asp">HTML Colors</a> <a target="_top" href="ref_canvas.asp">HTML Canvas</a> <a target="_top" href="ref_av_dom.asp">HTML Audio/Video</a> <a target="_top" href="ref_charactersets.asp">HTML Character Sets</a> <a target="_top" href="ref_html_dtd.asp">HTML Doctypes</a> <a target="_top" href="ref_urlencode.asp">HTML URL Encode</a> <a target="_top" href="ref_language_codes.asp">HTML Language Codes</a> <a target="_top" href="ref_country_codes.asp">HTML Country Codes</a> <a target="_top" href="ref_httpmessages.asp">HTTP Messages</a> <a target="_top" href="ref_httpmethods.asp">HTTP Methods</a> <a target="_top" href="ref_pxtoemconversion.asp">PX to EM Converter</a> <a target="_top" href="ref_keyboardshortcuts.asp">Keyboard Shortcuts</a> <br> <div class="notranslate"> <h2 class="left"><span class="left_h2">HTML</span> Tags</h2> <a target="_top" href="tag_comment.asp"><!--></a> <a target="_top" href="tag_doctype.asp"><!DOCTYPE></a> <a target="_top" href="tag_a.asp"><a></a> <a target="_top" href="tag_abbr.asp"><abbr></a> <a target="_top" href="tag_acronym.asp"><acronym></a> <a target="_top" href="tag_address.asp"><address></a> <a target="_top" href="tag_applet.asp"><applet></a> <a target="_top" href="tag_area.asp"><area></a> <a target="_top" href="tag_article.asp"><article></a> <a target="_top" href="tag_aside.asp"><aside></a> <a target="_top" href="tag_audio.asp"><audio></a> <a target="_top" href="tag_b.asp"><b></a> <a target="_top" href="tag_base.asp"><base></a> <a target="_top" href="tag_basefont.asp"><basefont></a> <a target="_top" href="tag_bdi.asp"><bdi></a> <a target="_top" href="tag_bdo.asp"><bdo></a> <a target="_top" href="tag_big.asp"><big></a> <a target="_top" href="tag_blockquote.asp"><blockquote></a> <a target="_top" href="tag_body.asp"><body></a> <a target="_top" href="tag_br.asp"><br></a> <a target="_top" href="tag_button.asp"><button></a> <a target="_top" href="tag_canvas.asp"><canvas></a> <a target="_top" href="tag_caption.asp"><caption></a> <a target="_top" href="tag_center.asp"><center></a> <a target="_top" href="tag_cite.asp"><cite></a> <a target="_top" href="tag_code.asp"><code></a> <a target="_top" href="tag_col.asp"><col></a> <a target="_top" href="tag_colgroup.asp"><colgroup></a> <a target="_top" href="tag_data.asp"><data></a> <a target="_top" href="tag_datalist.asp"><datalist></a> <a target="_top" href="tag_dd.asp"><dd></a> <a target="_top" href="tag_del.asp"><del></a> <a target="_top" href="tag_details.asp"><details></a> <a target="_top" href="tag_dfn.asp"><dfn></a> <a target="_top" href="tag_dialog.asp"><dialog></a> <a target="_top" href="tag_dir.asp"><dir></a> <a target="_top" href="tag_div.asp"><div></a> <a target="_top" href="tag_dl.asp"><dl></a> <a target="_top" href="tag_dt.asp"><dt></a> <a target="_top" href="tag_em.asp"><em></a> <a target="_top" href="tag_embed.asp"><embed></a> <a target="_top" href="tag_fieldset.asp"><fieldset></a> <a target="_top" href="tag_figcaption.asp"><figcaption></a> <a target="_top" href="tag_figure.asp"><figure></a> <a target="_top" href="tag_font.asp"><font></a> <a target="_top" href="tag_footer.asp"><footer></a> <a target="_top" href="tag_form.asp"><form></a> <a target="_top" href="tag_frame.asp"><frame></a> <a target="_top" href="tag_frameset.asp"><frameset></a> <a target="_top" href="tag_hn.asp"><h1> - <h6></a> <a target="_top" href="tag_head.asp"><head></a> <a target="_top" href="tag_header.asp"><header></a> <a target="_top" href="tag_hr.asp"><hr></a> <a target="_top" href="tag_html.asp"><html></a> <a target="_top" href="tag_i.asp"><i></a> <a target="_top" href="tag_iframe.asp"><iframe></a> <a target="_top" href="tag_img.asp"><img></a> <a target="_top" href="tag_input.asp"><input></a> <a target="_top" href="tag_ins.asp"><ins></a> <a target="_top" href="tag_kbd.asp"><kbd></a> <a target="_top" href="tag_label.asp"><label></a> <a target="_top" href="tag_legend.asp"><legend></a> <a target="_top" href="tag_li.asp"><li></a> <a target="_top" href="tag_link.asp"><link></a> <a target="_top" href="tag_main.asp"><main></a> <a target="_top" href="tag_map.asp"><map></a> <a target="_top" href="tag_mark.asp"><mark></a> <a target="_top" href="tag_meta.asp"><meta></a> <a target="_top" href="tag_meter.asp"><meter></a> <a target="_top" href="tag_nav.asp"><nav></a> <a target="_top" href="tag_noframes.asp"><noframes></a> <a target="_top" href="tag_noscript.asp"><noscript></a> <a target="_top" href="tag_object.asp"><object></a> <a target="_top" href="tag_ol.asp"><ol></a> <a target="_top" href="tag_optgroup.asp"><optgroup></a> <a target="_top" href="tag_option.asp"><option></a> <a target="_top" href="tag_output.asp"><output></a> <a target="_top" href="tag_p.asp" class="active"><p></a> <a target="_top" href="tag_param.asp"><param></a> <a target="_top" href="tag_picture.asp"><picture></a> <a target="_top" href="tag_pre.asp"><pre></a> <a target="_top" href="tag_progress.asp"><progress></a> <a target="_top" href="tag_q.asp"><q></a> <a target="_top" href="tag_rp.asp"><rp></a> <a target="_top" href="tag_rt.asp"><rt></a> <a target="_top" href="tag_ruby.asp"><ruby></a> <a target="_top" href="tag_s.asp"><s></a> <a target="_top" href="tag_samp.asp"><samp></a> <a target="_top" href="tag_script.asp"><script></a> <a target="_top" href="tag_section.asp"><section></a> <a target="_top" href="tag_select.asp"><select></a> <a target="_top" href="tag_small.asp"><small></a> <a target="_top" href="tag_source.asp"><source></a> <a target="_top" href="tag_span.asp"><span></a> <a target="_top" href="tag_strike.asp"><strike></a> <a target="_top" href="tag_strong.asp"><strong></a> <a target="_top" href="tag_style.asp"><style></a> <a target="_top" href="tag_sub.asp"><sub></a> <a target="_top" href="tag_summary.asp"><summary></a> <a target="_top" href="tag_sup.asp"><sup></a> <a target="_top" href="tag_svg.asp"><svg></a> <a target="_top" href="tag_table.asp"><table></a> <a target="_top" href="tag_tbody.asp"><tbody></a> <a target="_top" href="tag_td.asp"><td></a> <a target="_top" href="tag_template.asp"><template></a> <a target="_top" href="tag_textarea.asp"><textarea></a> <a target="_top" href="tag_tfoot.asp"><tfoot></a> <a target="_top" href="tag_th.asp"><th></a> <a target="_top" href="tag_thead.asp"><thead></a> <a target="_top" href="tag_time.asp"><time></a> <a target="_top" href="tag_title.asp"><title></a> <a target="_top" href="tag_tr.asp"><tr></a> <a target="_top" href="tag_track.asp"><track></a> <a target="_top" href="tag_tt.asp"><tt></a> <a target="_top" href="tag_u.asp"><u></a> <a target="_top" href="tag_ul.asp"><ul></a> <a target="_top" href="tag_var.asp"><var></a> <a target="_top" href="tag_video.asp"><video></a> <a target="_top" href="tag_wbr.asp"><wbr></a> </div> <br><br> </div> </div> </div> <div class="w3-main w3-light-grey" id="belowtopnav" style="margin-left: 220px; padding-top: 44px;"> <div class="w3-row w3-white"> <div class="w3-col l10 m12" id="main"> <div id="mainLeaderboard" style="overflow:hidden;"> <!-- MainLeaderboard--> <!--<pre>main_leaderboard, all: [728,90][970,90][320,50][468,60]</pre>--> <div id="adngin-main_leaderboard-0" data-google-query-id="CJPA_sueqvcCFXiOSwUd2fYBLg"><div id="google_ads_iframe_/22152718,16833175/sws-hb//w3schools.com//main_leaderboard_1__container__" style="border: 0pt none;"><iframe id="google_ads_iframe_/22152718,16833175/sws-hb//w3schools.com//main_leaderboard_1" name="google_ads_iframe_/22152718,16833175/sws-hb//w3schools.com//main_leaderboard_1" title="3rd party ad content" width="728" height="90" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" role="region" aria-label="Advertisement" tabindex="0" srcdoc="" data-google-container-id="7" style="border: 0px; vertical-align: bottom;" data-load-complete="true"><div style="position: absolute; width: 0px; height: 0px; border: 0px; padding: 0px; margin: 0px; overflow: hidden;"><button></button><a href="https://yahoo.com"></a><input></div></iframe></div></div> <!-- adspace leaderboard --> </div> <h1>HTML <span class="color_h1"><p></span> Tag</h1> <div class="w3-clear w3-center nextprev"> <a class="w3-left w3-btn" href="tag_output.asp">❮<span class="w3-hide-small"> Previous</span></a> <a class="w3-btn" href="default.asp"><span class="w3-hide-small">Complete HTML </span>Reference</a> <a class="w3-right w3-btn" href="tag_param.asp"><span class="w3-hide-small">Next </span>❯</a> </div> <br> <div class="w3-example"> <h3>Example</h3> <p>A paragraph is marked up as follows:</p> <div class="w3-code notranslate htmlHigh"> <span class="tagnamecolor" style="color:brown"><span class="tagcolor" style="color:mediumblue"><</span>p<span class="tagcolor" style="color:mediumblue">></span></span>This is some text in a paragraph.<span class="tagnamecolor" style="color:brown"><span class="tagcolor" style="color:mediumblue"><</span>/p<span class="tagcolor" style="color:mediumblue">></span></span> </div> <a target="_blank" href="tryit.asp?filename=tryhtml_paragraphs1" class="w3-btn w3-margin-bottom">Try it Yourself »</a> </div> <p>More "Try it Yourself" examples below.</p> <hr> <h2>Definition and Usage</h2> <p>The <code class="w3-codespan"><p></code> tag defines a paragraph.</p> <p>Browsers automatically add a single blank line before and after each <code class="w3-codespan"><p></code> element.</p> <p><strong>Tip:</strong> Use CSS to <a href="/html/html_css.asp">style paragraphs</a>.</p> <hr> <h2>Browser Support</h2> <table class="browserref notranslate"> <tbody><tr> <th style="width:20%;font-size:16px;text-align:left;">Element</th> <th style="width:16%;" class="bsChrome" title="Chrome"></th> <th style="width:16%;" class="bsEdge" title="Internet Explorer / Edge"></th> <th style="width:16%;" class="bsFirefox" title="Firefox"></th> <th style="width:16%;" class="bsSafari" title="Safari"></th> <th style="width:16%;" class="bsOpera" title="Opera"></th> </tr><tr> <td style="text-align:left;"><p></td> <td>Yes</td> <td>Yes</td> <td>Yes</td> <td>Yes</td> <td>Yes</td> </tr> </tbody></table> <hr> <h2>Global Attributes</h2> <p>The <code class="w3-codespan"><p></code> tag also supports the <a href="ref_standardattributes.asp">Global Attributes in HTML</a>.</p> <hr> <h2>Event Attributes</h2> <p>The <code class="w3-codespan"><p></code> tag also supports the <a href="ref_eventattributes.asp">Event Attributes in HTML</a>.</p> <hr> <div id="midcontentadcontainer" style="overflow:auto;text-align:center"> <!-- MidContent --> <!-- <p class="adtext">Advertisement</p> --> <div id="adngin-mid_content-0" data-google-query-id="CKfs_8ueqvcCFXiOSwUd2fYBLg"><div id="sn_ad_label_adngin-mid_content-0" class="sn_ad_label" style="color:#000000;font-size:12px;margin:0;text-align:center;">ADVERTISEMENT</div><div id="google_ads_iframe_/22152718,16833175/sws-hb//w3schools.com//mid_content_1__container__" style="border: 0pt none; display: inline-block; width: 300px; height: 250px;"><iframe frameborder="0" src="https://56d0da6c34aaa471db22bb4266aac656.safeframe.googlesyndication.com/safeframe/1-0-38/html/container.html" id="google_ads_iframe_/22152718,16833175/sws-hb//w3schools.com//mid_content_1" title="3rd party ad content" name="" scrolling="no" marginwidth="0" marginheight="0" width="300" height="250" data-is-safeframe="true" sandbox="allow-forms allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-top-navigation-by-user-activation" role="region" aria-label="Advertisement" tabindex="0" data-google-container-id="8" style="border: 0px; vertical-align: bottom;" data-load-complete="true"></iframe></div></div> </div> <hr> <h2>More Examples</h2> <div class="w3-example"> <h3>Example</h3> <p>Align text in a paragraph (with CSS):</p> <div class="w3-code notranslate htmlHigh"> <span class="tagnamecolor" style="color:brown"><span class="tagcolor" style="color:mediumblue"><</span>p<span class="attributecolor" style="color:red"> style<span class="attributevaluecolor" style="color:mediumblue">="text-align:right"</span></span><span class="tagcolor" style="color:mediumblue">></span></span>This is some text in a paragraph.<span class="tagnamecolor" style="color:brown"><span class="tagcolor" style="color:mediumblue"><</span>/p<span class="tagcolor" style="color:mediumblue">></span></span> </div> <a target="_blank" href="tryit.asp?filename=tryhtml_p_align_css" class="w3-btn w3-margin-bottom">Try it Yourself »</a> </div> <div class="w3-example"> <h3>Example</h3> <p>Style paragraphs with CSS:</p> <div class="w3-code notranslate htmlHigh"> <span class="tagnamecolor" style="color:brown"><span class="tagcolor" style="color:mediumblue"><</span>html<span class="tagcolor" style="color:mediumblue">></span></span><br><span class="tagnamecolor" style="color:brown"><span class="tagcolor" style="color:mediumblue"><</span>head<span class="tagcolor" style="color:mediumblue">></span></span><br><span class="tagnamecolor" style="color:brown"><span class="tagcolor" style="color:mediumblue"><</span>style<span class="tagcolor" style="color:mediumblue">></span></span><span class="cssselectorcolor" style="color:brown"><br>p <span class="cssdelimitercolor" style="color:black">{</span><span class="csspropertycolor" style="color:red"><br> color<span class="csspropertyvaluecolor" style="color:mediumblue"><span class="cssdelimitercolor" style="color:black">:</span> navy<span class="cssdelimitercolor" style="color:black">;</span></span><br> text-indent<span class="csspropertyvaluecolor" style="color:mediumblue"><span class="cssdelimitercolor" style="color:black">:</span> 30px<span class="cssdelimitercolor" style="color:black">;</span></span><br> text-transform<span class="csspropertyvaluecolor" style="color:mediumblue"><span class="cssdelimitercolor" style="color:black">:</span> uppercase<span class="cssdelimitercolor" style="color:black">;</span></span><br></span><span class="cssdelimitercolor" style="color:black">}</span><br></span><span class="tagnamecolor" style="color:brown"><span class="tagcolor" style="color:mediumblue"><</span>/style<span class="tagcolor" style="color:mediumblue">></span></span><br> <span class="tagnamecolor" style="color:brown"><span class="tagcolor" style="color:mediumblue"><</span>/head<span class="tagcolor" style="color:mediumblue">></span></span><br><span class="tagnamecolor" style="color:brown"><span class="tagcolor" style="color:mediumblue"><</span>body<span class="tagcolor" style="color:mediumblue">></span></span><br><br><span class="tagnamecolor" style="color:brown"><span class="tagcolor" style="color:mediumblue"><</span>p<span class="tagcolor" style="color:mediumblue">></span></span>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<span class="tagnamecolor" style="color:brown"><span class="tagcolor" style="color:mediumblue"><</span>/p<span class="tagcolor" style="color:mediumblue">></span></span><br><br><span class="tagnamecolor" style="color:brown"><span class="tagcolor" style="color:mediumblue"><</span>/body<span class="tagcolor" style="color:mediumblue">></span></span><br><span class="tagnamecolor" style="color:brown"><span class="tagcolor" style="color:mediumblue"><</span>/html<span class="tagcolor" style="color:mediumblue">></span></span> </div> <a target="_blank" href="tryit.asp?filename=tryhtml_p_style_css" class="w3-btn w3-margin-bottom">Try it Yourself »</a> </div> <div class="w3-example"> <h3>Example</h3> <p> More on paragraphs:</p> <div class="w3-code notranslate htmlHigh"> <span class="tagnamecolor" style="color:brown"><span class="tagcolor" style="color:mediumblue"><</span>p<span class="tagcolor" style="color:mediumblue">></span></span><br>This paragraph<br>contains a lot of lines<br>in the source code,<br> but the browser <br>ignores it.<br><span class="tagnamecolor" style="color:brown"><span class="tagcolor" style="color:mediumblue"><</span>/p<span class="tagcolor" style="color:mediumblue">></span></span> </div> <a target="_blank" href="tryit.asp?filename=tryhtml_paragraphs2" class="w3-btn w3-margin-bottom">Try it Yourself »</a> </div> <div class="w3-example"> <h3>Example</h3> <p>Poem problems in HTML:</p> <div class="w3-code notranslate htmlHigh"> <span class="tagnamecolor" style="color:brown"><span class="tagcolor" style="color:mediumblue"><</span>p<span class="tagcolor" style="color:mediumblue">></span></span><br>My Bonnie lies over the ocean.<br>My Bonnie lies over the sea.<br>My Bonnie lies over the ocean.<br>Oh, bring back my Bonnie to me.<br><span class="tagnamecolor" style="color:brown"><span class="tagcolor" style="color:mediumblue"><</span>/p<span class="tagcolor" style="color:mediumblue">></span></span> </div> <a target="_blank" href="tryit.asp?filename=tryhtml_poem" class="w3-btn w3-margin-bottom">Try it Yourself »</a> </div> <hr> <h2>Related Pages</h2> <p>HTML tutorial: <a href="/html/html_paragraphs.asp">HTML Paragraphs</a></p> <p>HTML DOM reference: <a href="/jsref/dom_obj_paragraph.asp">Paragraph Object</a></p> <hr> <h2>Default CSS Settings</h2> <p>Most browsers will display the <code class="w3-codespan"><p></code> element with the following default values:</p> <div class="w3-example"> <h3>Example</h3> <div class="w3-code notranslate cssHigh"><span class="cssselectorcolor" style="color:brown"> p <span class="cssdelimitercolor" style="color:black">{</span><span class="csspropertycolor" style="color:red"><br> display<span class="csspropertyvaluecolor" style="color:mediumblue"><span class="cssdelimitercolor" style="color:black">:</span> block<span class="cssdelimitercolor" style="color:black">;</span></span><br> margin-top<span class="csspropertyvaluecolor" style="color:mediumblue"><span class="cssdelimitercolor" style="color:black">:</span> 1em<span class="cssdelimitercolor" style="color:black">;</span></span><br> margin-bottom<span class="csspropertyvaluecolor" style="color:mediumblue"><span class="cssdelimitercolor" style="color:black">:</span> 1em<span class="cssdelimitercolor" style="color:black">;</span></span><br> margin-left<span class="csspropertyvaluecolor" style="color:mediumblue"><span class="cssdelimitercolor" style="color:black">:</span> 0<span class="cssdelimitercolor" style="color:black">;</span></span><br> margin-right<span class="csspropertyvaluecolor" style="color:mediumblue"><span class="cssdelimitercolor" style="color:black">:</span> 0<span class="cssdelimitercolor" style="color:black">;</span></span><br></span><span class="cssdelimitercolor" style="color:black">}</span> </span></div> <a target="_blank" href="tryit.asp?filename=tryhtml_p_default_css" class="w3-btn w3-margin-bottom">Try it Yourself »</a> </div> <br> <br> <div class="w3-clear w3-center nextprev"> <a class="w3-left w3-btn" href="tag_output.asp">❮<span class="w3-hide-small"> Previous</span></a> <a class="w3-btn" href="default.asp"><span class="w3-hide-small">Complete HTML </span>Reference</a> <a class="w3-right w3-btn" href="tag_param.asp"><span class="w3-hide-small">Next </span>❯</a> </div> <div id="mypagediv2" style="position:relative;text-align:center;"></div> <br> </div> <div class="w3-col l2 m12" id="right"> <div class="sidesection"> <div id="skyscraper"> <div id="adngin-sidebar_top-0" data-google-query-id="CJXA_sueqvcCFXiOSwUd2fYBLg"><div id="sn_ad_label_adngin-sidebar_top-0" class="sn_ad_label" style="color:#000000;font-size:12px;margin:0;text-align:center;">ADVERTISEMENT</div><div id="google_ads_iframe_/22152718,16833175/sws-hb//w3schools.com//wide_skyscraper_1__container__" style="border: 0pt none;"><iframe id="google_ads_iframe_/22152718,16833175/sws-hb//w3schools.com//wide_skyscraper_1" name="google_ads_iframe_/22152718,16833175/sws-hb//w3schools.com//wide_skyscraper_1" title="3rd party ad content" width="320" height="50" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" role="region" aria-label="Advertisement" tabindex="0" srcdoc="" data-google-container-id="9" style="border: 0px; vertical-align: bottom;" data-load-complete="true"></iframe></div></div> </div> </div> <style> .ribbon-vid { font-size:12px; font-weight:bold; padding: 6px 20px; left:-20px; top:-10px; text-align: center; color:black; border-radius:25px; } </style> <div class="sidesection" id="video_sidesection"> <div class="w3-center" style="padding-bottom:7px"> <span class="ribbon-vid ws-yellow">NEW</span> </div> <p style="font-size: 14px;line-height: 1.5;font-family: Source Sans Pro;padding-left:4px;padding-right:4px;">We just launched<br>W3Schools videos</p> <a onclick="ga('send', 'event', 'Videos' , 'fromSidebar');" href="https://www.w3schools.com/videos/index.php" class="w3-hover-opacity"><img src="/images/htmlvideoad_footer.png" style="max-width:100%;padding:5px 10px 25px 10px" loading="lazy"></a> <a class="ws-button" style="font-size:16px;text-decoration: none !important;display: block !important; color:#FFC0C7!important; width: 100%; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; paxdding-top: 10px; padding-bottom: 20px; font-family: 'Source Sans Pro', sans-serif; text-align: center;" onclick="ga('send', 'event', 'Videos' , 'fromSidebar');" href="https://www.w3schools.com/videos/index.php">Explore now</a> </div> <div class="sidesection"> <h4><a href="/colors/colors_picker.asp">COLOR PICKER</a></h4> <a href="/colors/colors_picker.asp"> <img src="/images/colorpicker2000.png" alt="colorpicker" loading="lazy"> </a> </div> <div class="sidesection"> <!--<h4>LIKE US</h4>--> <div class="sharethis" style="visibility: visible;"> <a href="https://www.facebook.com/w3schoolscom/" target="_blank" title="Facebook"><span class="fa fa-facebook-square fa-2x"></span></a> <a href="https://www.instagram.com/w3schools.com_official/" target="_blank" title="Instagram"><span class="fa fa-instagram fa-2x"></span></a> <a href="https://www.linkedin.com/company/w3schools.com/" target="_blank" title="LinkedIn"><span class="fa fa-linkedin-square fa-2x"></span></a> <a href="https://discord.gg/6Z7UaRbUQM" target="_blank" title="Join the W3schools community on Discord"><span class="fa fa-discord fa-2x"></span></a> </div> </div> <!-- <div class="sidesection" style="border-radius:5px;color:#555;padding-top:1px;padding-bottom:8px;margin-left:auto;margin-right:auto;max-width:230px;background-color:#d4edda"> <p>Get your<br>certification today!</p> <a href="/cert/default.asp" target="_blank"> <img src="/images/w3certified_logo_250.png" style="margin:0 12px 20px 10px;max-width:80%"> </a> <a class="w3-btn w3-margin-bottom" style="text-decoration:none;border-radius:5px;" href="/cert/default.asp" target="_blank">View options</a> </div> --> <style> #courses_get_started_btn { text-decoration:none !important; background-color:#04AA6D; width:100%; border-bottom-left-radius:5px; border-bottom-right-radius:5px; padding-top:10px; padding-bottom:10px; font-family: 'Source Sans Pro', sans-serif; } #courses_get_started_btn:hover { background-color:#059862!important; } </style> <div id="internalCourses" class="sidesection"> <p style="font-size:18px;padding-left:2px;padding-right:2px;">Get certified<br>by completing<br>a course today!</p> <a href="https://courses.w3schools.com" target="_blank" onclick="ga('send', 'event', 'Courses' , 'Clicked on courses banner in ads column');"> <div style="padding:0 20px 20px 20px"> <svg id="w3_cert_badge2" style="margin:auto;width:85%" data-name="w3_cert_badge2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 300"><defs><style>.cls-1{fill:#04aa6b;}.cls-2{font-size:23px;}.cls-2,.cls-3,.cls-4{fill:#fff;}.cls-2,.cls-3{font-family:RobotoMono-Medium, Roboto Mono;font-weight:500;}.cls-3{font-size:20.08px;}</style></defs><circle class="cls-1" cx="150" cy="150" r="146.47" transform="translate(-62.13 150) rotate(-45)"></circle><text class="cls-2" transform="translate(93.54 63.89) rotate(-29.5)">w</text><text class="cls-2" transform="translate(107.13 56.35) rotate(-20.8)">3</text><text class="cls-2" transform="matrix(0.98, -0.21, 0.21, 0.98, 121.68, 50.97)">s</text><text class="cls-2" transform="translate(136.89 47.84) rotate(-3.47)">c</text><text class="cls-2" transform="translate(152.39 47.03) rotate(5.12)">h</text><text class="cls-2" transform="translate(167.85 48.54) rotate(13.72)">o</text><text class="cls-2" transform="translate(182.89 52.35) rotate(22.34)">o</text><text class="cls-2" transform="matrix(0.86, 0.52, -0.52, 0.86, 197.18, 58.36)">l</text><text class="cls-2" transform="matrix(0.77, 0.64, -0.64, 0.77, 210.4, 66.46)">s</text><text class="cls-3" transform="translate(35.51 186.66) rotate(69.37)"> </text><text class="cls-3" transform="matrix(0.47, 0.88, -0.88, 0.47, 41.27, 201.28)">C</text><text class="cls-3" transform="matrix(0.58, 0.81, -0.81, 0.58, 48.91, 215.03)">E</text><text class="cls-3" transform="matrix(0.67, 0.74, -0.74, 0.67, 58.13, 227.36)">R</text><text class="cls-3" transform="translate(69.16 238.92) rotate(39.44)">T</text><text class="cls-3" transform="matrix(0.85, 0.53, -0.53, 0.85, 81.47, 248.73)">I</text><text class="cls-3" transform="translate(94.94 256.83) rotate(24.36)">F</text><text class="cls-3" transform="translate(109.34 263.09) rotate(16.83)">I</text><text class="cls-3" transform="translate(124.46 267.41) rotate(9.34)">E</text><text class="cls-3" transform="translate(139.99 269.73) rotate(1.88)">D</text><text class="cls-3" transform="translate(155.7 270.01) rotate(-5.58)"> </text><text class="cls-3" transform="translate(171.32 268.24) rotate(-13.06)"> </text><text class="cls-2" transform="translate(187.55 266.81) rotate(-21.04)">.</text><text class="cls-3" transform="translate(203.27 257.7) rotate(-29.24)"> </text><text class="cls-3" transform="translate(216.84 249.83) rotate(-36.75)"> </text><text class="cls-3" transform="translate(229.26 240.26) rotate(-44.15)">2</text><text class="cls-3" transform="translate(240.39 229.13) rotate(-51.62)">0</text><text class="cls-3" transform="translate(249.97 216.63) rotate(-59.17)">2</text><text class="cls-3" transform="matrix(0.4, -0.92, 0.92, 0.4, 257.81, 203.04)">2</text><path class="cls-4" d="M196.64,136.31s3.53,3.8,8.5,3.8c3.9,0,6.75-2.37,6.75-5.59,0-4-3.64-5.81-8-5.81h-2.59l-1.53-3.48,6.86-8.13a34.07,34.07,0,0,1,2.7-2.85s-1.11,0-3.33,0H194.79v-5.86H217.7v4.28l-9.19,10.61c5.18.74,10.24,4.43,10.24,10.92s-4.85,12.3-13.19,12.3a17.36,17.36,0,0,1-12.41-5Z"></path><path class="cls-4" d="M152,144.24l30.24,53.86,14.94-26.61L168.6,120.63H135.36l-13.78,24.53-13.77-24.53H77.93l43.5,77.46.15-.28.16.28Z"></path></svg> </div> </a> <a class="w3-btn" id="courses_get_started_btn" href="https://courses.w3schools.com" target="_blank" onclick="ga('send', 'event', 'Courses' , 'Clicked on courses banner in ads column');">Get started</a> </div> <!-- <div class="sidesection" style="margin-left:auto;margin-right:auto;max-width:230px"> <a href="https://shop.w3schools.com/" target="_blank" title="Buy W3Schools Merchandize"> <img src="/images/tshirt.jpg" style="max-width:100%;"> </a> </div> --> <div class="sidesection" id="moreAboutSubject"> </div> <!-- <div id="sidesection_exercise" class="sidesection" style="background-color:#555555;max-width:200px;margin:auto;margin-bottom:32px"> <div class="w3-container w3-text-white"> <h4>Exercises</h4> </div> <div> <div class="w3-light-grey"> <a target="_blank" href="/html/exercise.asp" style="padding-top:8px">HTML</a> <a target="_blank" href="/css/exercise.asp">CSS</a> <a target="_blank" href="/js/exercise_js.asp">JavaScript</a> <a target="_blank" href="/sql/exercise.asp">SQL</a> <a target="_blank" href="/php/exercise.asp">PHP</a> <a target="_blank" href="/python/exercise.asp">Python</a> <a target="_blank" href="/bootstrap/exercise_bs3.asp">Bootstrap</a> <a target="_blank" href="/jquery/exercise_jq.asp" style="padding-bottom:8px">jQuery</a> </div> </div> </div> --> <div class="sidesection codegameright ws-turquoise" style="font-size:18px;font-family: 'Source Sans Pro', sans-serif;border-radius:5px;color:#FFC0C7;padding-top:12px;margin-left:auto;margin-right:auto;max-width:230px;"> <style> .codegameright .w3-btn:link,.codegameright .w3-btn:visited { background-color:#04AA6D; border-radius:5px; } .codegameright .w3-btn:hover,.codegameright .w3-btn:active { background-color:#059862!important; text-decoration:none!important; } </style> <h4><a href="/codegame/index.html" class="w3-hover-text-black">CODE GAME</a></h4> <a href="/codegame/index.html" target="_blank" class="w3-hover-opacity"><img style="max-width:100%;margin:16px 0;" src="/images/w3lynx_200.png" alt="Code Game" loading="lazy"></a> <a class="w3-btn w3-block ws-black" href="/codegame/index.html" target="_blank" style="padding-top:10px;padding-bottom:10px;margin-top:12px;border-top-left-radius: 0;border-top-right-radius: 0">Play Game</a> </div> <!-- <div class="sidesection w3-light-grey" style="margin-left:auto;margin-right:auto;max-width:230px"> <div class="w3-container w3-dark-grey"> <h4><a href="/howto/default.asp" class="w3-hover-text-white">HOW TO</a></h4> </div> <div class="w3-container w3-left-align w3-padding-16"> <a href="/howto/howto_js_tabs.asp">Tabs</a><br> <a href="/howto/howto_css_dropdown.asp">Dropdowns</a><br> <a href="/howto/howto_js_accordion.asp">Accordions</a><br> <a href="/howto/howto_js_sidenav.asp">Side Navigation</a><br> <a href="/howto/howto_js_topnav.asp">Top Navigation</a><br> <a href="/howto/howto_css_modals.asp">Modal Boxes</a><br> <a href="/howto/howto_js_progressbar.asp">Progress Bars</a><br> <a href="/howto/howto_css_parallax.asp">Parallax</a><br> <a href="/howto/howto_css_login_form.asp">Login Form</a><br> <a href="/howto/howto_html_include.asp">HTML Includes</a><br> <a href="/howto/howto_google_maps.asp">Google Maps</a><br> <a href="/howto/howto_js_rangeslider.asp">Range Sliders</a><br> <a href="/howto/howto_css_tooltip.asp">Tooltips</a><br> <a href="/howto/howto_js_slideshow.asp">Slideshow</a><br> <a href="/howto/howto_js_sort_list.asp">Sort List</a><br> </div> </div> --> <!-- <div class="sidesection w3-round" style="margin-left:auto;margin-right:auto;max-width:230px"> <div class="w3-container ws-black" style="border-top-right-radius:5px;border-top-left-radius:5px;"> <h5><a href="/cert/default.asp" class="w3-hover-text-white">Certificates</a></h5> </div> <div class="w3-border" style="border-bottom-right-radius:5px;border-bottom-left-radius:5px;"> <a href="/cert/cert_html.asp" class="w3-button ws-grey w3-block w3-border-bottom" style="text-decoration:none">HTML</a> <a href="/cert/cert_css.asp" class="w3-button ws-grey w3-block w3-border-bottom" style="text-decoration:none">CSS</a> <a href="/cert/cert_javascript.asp" class="w3-button ws-grey w3-block w3-border-bottom" style="text-decoration:none">JavaScript</a> <a href="/cert/cert_frontend.asp" class="w3-button ws-grey w3-block w3-border-bottom" style="text-decoration:none">Front End</a> <a href="/cert/cert_python.asp" class="w3-button ws-grey w3-block w3-border-bottom" style="text-decoration:none">Python</a> <a href="/cert/cert_sql.asp" class="w3-button ws-grey w3-block w3-border-bottom" style="text-decoration:none">SQL</a> <a href="/cert/default.asp" class="w3-button ws-grey w3-block" style="text-decoration:none;">And more</a> </div> </div> --> <div id="stickypos" class="sidesection" style="text-align:center;position:sticky;top:50px;"> <div id="stickyadcontainer" style="width: 653.984px;"> <div style="position:relative;margin:auto;"> <div id="adngin-sidebar_sticky-0-stickypointer" style=""><div id="adngin-sidebar_sticky-0" style=""><div id="sn_ad_label_adngin-sidebar_sticky-0" class="sn_ad_label" style="color:#000000;font-size:12px;margin:0;text-align:center;">ADVERTISEMENT</div></div></div> <script> function secondSnigel() { if(window.adngin && window.adngin.adnginLoaderReady) { if (Number(w3_getStyleValue(document.getElementById("main"), "height").replace("px", "")) > 2200) { if (document.getElementById("adngin-mid_content-0")) { adngin.queue.push(function(){ adngin.cmd.startAuction(["sidebar_sticky", "mid_content" ]); }); } else { adngin.queue.push(function(){ adngin.cmd.startAuction(["sidebar_sticky"]); }); } } else { if (document.getElementById("adngin-mid_content-0")) { adngin.queue.push(function(){ adngin.cmd.startAuction(["mid_content"]); }); } } } else { window.addEventListener('adnginLoaderReady', function() { if (Number(w3_getStyleValue(document.getElementById("main"), "height").replace("px", "")) > 2200) { if (document.getElementById("adngin-mid_content-0")) { adngin.queue.push(function(){ adngin.cmd.startAuction(["sidebar_sticky", "mid_content" ]); }); } else { adngin.queue.push(function(){ adngin.cmd.startAuction(["sidebar_sticky"]); }); } } else { if (document.getElementById("adngin-mid_content-0")) { adngin.queue.push(function(){ adngin.cmd.startAuction(["mid_content"]); }); } } }); } } </script> </div> </div> </div> <script> uic_r_c() </script> </div> </div> <div id="footer" class="footer w3-container w3-white"> <hr> <div style="overflow:auto"> <div class="bottomad"> <!-- BottomMediumRectangle --> <!--<pre>bottom_medium_rectangle, all: [970,250][300,250][336,280]</pre>--> <div id="adngin-bottom_left-0" style="padding:0 10px 10px 0;float:left;width:auto;" data-google-query-id="CJbA_sueqvcCFXiOSwUd2fYBLg"><div id="sn_ad_label_adngin-bottom_left-0" class="sn_ad_label" style="color:#000000;font-size:12px;margin:0;text-align:center;">ADVERTISEMENT</div><div id="google_ads_iframe_/22152718,16833175/sws-hb//w3schools.com//bottom_medium_rectangle_1__container__" style="border: 0pt none;"><iframe id="google_ads_iframe_/22152718,16833175/sws-hb//w3schools.com//bottom_medium_rectangle_1" name="google_ads_iframe_/22152718,16833175/sws-hb//w3schools.com//bottom_medium_rectangle_1" title="3rd party ad content" width="300" height="250" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" role="region" aria-label="Advertisement" tabindex="0" srcdoc="" data-google-container-id="a" style="border: 0px; vertical-align: bottom;" data-load-complete="true"></iframe></div></div> <!-- adspace bmr --> <!-- RightBottomMediumRectangle --> <!--<pre>right_bottom_medium_rectangle, desktop: [300,250][336,280]</pre>--> <div id="adngin-bottom_right-0" style="padding:0 10px 10px 0;float:left;width:auto;"><div id="sn_ad_label_adngin-bottom_right-0" class="sn_ad_label" style="color:#000000;font-size:12px;margin:0;text-align:center;">ADVERTISEMENT</div></div> </div> </div> <hr> <div class="w3-row-padding w3-center w3-small" style="margin:0 -16px;"> <div class="w3-col l3 m3 s12"> <a class="w3-button ws-grey ws-hover-black w3-block w3-round" href="javascript:void(0);" onclick="displayError();return false" style="white-space:nowrap;text-decoration:none;margin-top:1px;margin-bottom:1px;font-size:15px;">Report Error</a> </div> <!-- <div class="w3-col l3 m3 s12"> <a class="w3-button w3-light-grey w3-block" href="javascript:void(0);" target="_blank" onclick="printPage();return false;" style="text-decoration:none;margin-top:1px;margin-bottom:1px">PRINT PAGE</a> </div> --> <div class="w3-col l3 m3 s12"> <a class="w3-button ws-grey ws-hover-black w3-block w3-round" href="/forum/default.asp" target="_blank" style="text-decoration:none;margin-top:1px;margin-bottom:1px;font-size:15px">Forum</a> </div> <div class="w3-col l3 m3 s12"> <a class="w3-button ws-grey ws-hover-black w3-block w3-round" href="/about/default.asp" target="_top" style="text-decoration:none;margin-top:1px;margin-bottom:1px;font-size:15px">About</a> </div> <div class="w3-col l3 m3 s12"> <a class="w3-button ws-grey ws-hover-black w3-block w3-round" href="https://shop.w3schools.com/" target="_blank" style="text-decoration:none;margin-top:1px;margin-bottom:1px;font-size:15px">Shop</a> </div> </div> <hr> <div class="ws-grey w3-padding w3-margin-bottom" id="err_form" style="display:none;position:relative"> <span onclick="this.parentElement.style.display='none'" class="w3-button w3-display-topright w3-large">×</span> <h2>Report Error</h2> <p>If you want to report an error, or if you want to make a suggestion, do not hesitate to send us an e-mail:</p> <p>help@w3schools.com</p> <br> <!-- <h2>Your Suggestion:</h2> <form> <div class="w3-section"> <label for="err_email">Your E-mail:</label> <input class="w3-input w3-border" type="text" style="margin-top:5px;width:100%" id="err_email" name="err_email"> </div> <div class="w3-section"> <label for="err_email">Page address:</label> <input class="w3-input w3-border" type="text" style="width:100%;margin-top:5px" id="err_url" name="err_url" disabled="disabled"> </div> <div class="w3-section"> <label for="err_email">Description:</label> <textarea rows="10" class="w3-input w3-border" id="err_desc" name="err_desc" style="width:100%;margin-top:5px;resize:vertical;"></textarea> </div> <div class="form-group"> <button type="button" class="w3-button w3-dark-grey" onclick="sendErr()">Submit</button> </div> <br> </form> --> </div> <div class="w3-container ws-grey w3-padding" id="err_sent" style="display:none;position:relative"> <span onclick="this.parentElement.style.display='none'" class="w3-button w3-display-topright">×</span> <h2>Thank You For Helping Us!</h2> <p>Your message has been sent to W3Schools.</p> </div> <div class="w3-row w3-center w3-small"> <div class="w3-col l3 m6 s12"> <div class="top10"> <h5 style="font-family: 'Source Sans Pro', sans-serif;">Top Tutorials</h5> <a href="/html/default.asp">HTML Tutorial</a><br> <a href="/css/default.asp">CSS Tutorial</a><br> <a href="/js/default.asp">JavaScript Tutorial</a><br> <a href="/howto/default.asp">How To Tutorial</a><br> <a href="/sql/default.asp">SQL Tutorial</a><br> <a href="/python/default.asp">Python Tutorial</a><br> <a href="/w3css/default.asp">W3.CSS Tutorial</a><br> <a href="/bootstrap/bootstrap_ver.asp">Bootstrap Tutorial</a><br> <a href="/php/default.asp">PHP Tutorial</a><br> <a href="/java/default.asp">Java Tutorial</a><br> <a href="/cpp/default.asp">C++ Tutorial</a><br> <a href="/jquery/default.asp">jQuery Tutorial</a><br> </div> </div> <div class="w3-col l3 m6 s12"> <div class="top10"> <h5 style="font-family: 'Source Sans Pro', sans-serif;">Top References</h5> <a href="/tags/default.asp">HTML Reference</a><br> <a href="/cssref/default.asp">CSS Reference</a><br> <a href="/jsref/default.asp">JavaScript Reference</a><br> <a href="/sql/sql_ref_keywords.asp">SQL Reference</a><br> <a href="/python/python_reference.asp">Python Reference</a><br> <a href="/w3css/w3css_references.asp">W3.CSS Reference</a><br> <a href="/bootstrap/bootstrap_ref_all_classes.asp">Bootstrap Reference</a><br> <a href="/php/php_ref_overview.asp">PHP Reference</a><br> <a href="/colors/colors_names.asp">HTML Colors</a><br> <a href="/java/java_ref_keywords.asp">Java Reference</a><br> <a href="/angular/angular_ref_directives.asp">Angular Reference</a><br> <a href="/jquery/jquery_ref_overview.asp">jQuery Reference</a><br> </div> </div> <div class="w3-col l3 m6 s12"> <div class="top10"> <h5 style="font-family: 'Source Sans Pro', sans-serif;">Top Examples</h5> <a href="/html/html_examples.asp">HTML Examples</a><br> <a href="/css/css_examples.asp">CSS Examples</a><br> <a href="/js/js_examples.asp">JavaScript Examples</a><br> <a href="/howto/default.asp">How To Examples</a><br> <a href="/sql/sql_examples.asp">SQL Examples</a><br> <a href="/python/python_examples.asp">Python Examples</a><br> <a href="/w3css/w3css_examples.asp">W3.CSS Examples</a><br> <a href="/bootstrap/bootstrap_examples.asp">Bootstrap Examples</a><br> <a href="/php/php_examples.asp">PHP Examples</a><br> <a href="/java/java_examples.asp">Java Examples</a><br> <a href="/xml/xml_examples.asp">XML Examples</a><br> <a href="/jquery/jquery_examples.asp">jQuery Examples</a><br> </div> </div> <div class="w3-col l3 m6 s12"> <div class="top10"> <!-- <h4>Web Certificates</h4> <a href="/cert/default.asp">HTML Certificate</a><br> <a href="/cert/default.asp">CSS Certificate</a><br> <a href="/cert/default.asp">JavaScript Certificate</a><br> <a href="/cert/default.asp">SQL Certificate</a><br> <a href="/cert/default.asp">Python Certificate</a><br> <a href="/cert/default.asp">PHP Certificate</a><br> <a href="/cert/default.asp">Bootstrap Certificate</a><br> <a href="/cert/default.asp">XML Certificate</a><br> <a href="/cert/default.asp">jQuery Certificate</a><br> <a href="//www.w3schools.com/cert/default.asp" class="w3-button w3-margin-top w3-dark-grey" style="text-decoration:none"> Get Certified »</a> --> <h5 style="font-family: 'Source Sans Pro', sans-serif;">Web Courses</h5> <a href="https://courses.w3schools.com/courses/html" target="_blank" onclick="ga('send', 'event', 'Courses' , 'Clicked on html course link in footer');">HTML Course</a><br> <a href="https://courses.w3schools.com/courses/css" target="_blank" onclick="ga('send', 'event', 'Courses' , 'Clicked on css course link in footer');">CSS Course</a><br> <a href="https://courses.w3schools.com/courses/javascript" target="_blank" onclick="ga('send', 'event', 'Courses' , 'Clicked on javascript course link in footer');">JavaScript Course</a><br> <a href="https://courses.w3schools.com/programs/front-end" target="_blank" onclick="ga('send', 'event', 'Courses' , 'Clicked on Front End course link in footer');">Front End Course</a><br> <a href="https://courses.w3schools.com/courses/sql" target="_blank" onclick="ga('send', 'event', 'Courses' , 'Clicked on sql course link in footer');">SQL Course</a><br> <a href="https://courses.w3schools.com/courses/python" target="_blank" onclick="ga('send', 'event', 'Courses' , 'Clicked on python course link in footer');">Python Course</a><br> <a href="https://courses.w3schools.com/courses/php" target="_blank" onclick="ga('send', 'event', 'Courses' , 'Clicked on php course link in footer');">PHP Course</a><br> <a href="https://courses.w3schools.com/courses/jquery" target="_blank" onclick="ga('send', 'event', 'Courses' , 'Clicked on jquery course link in footer');">jQuery Course</a><br> <a href="https://courses.w3schools.com/courses/java" target="_blank" onclick="ga('send', 'event', 'Courses' , 'Clicked on Java course link in footer');">Java Course</a><br> <a href="https://courses.w3schools.com/courses/cplusplus" target="_blank" onclick="ga('send', 'event', 'Courses' , 'Clicked on C++ course link in footer');">C++ Course</a><br> <a href="https://courses.w3schools.com/courses/c-sharp" target="_blank" onclick="ga('send', 'event', 'Courses' , 'Clicked on bootstrap C# link in footer');">C# Course</a><br> <a href="https://courses.w3schools.com/courses/xml" target="_blank" onclick="ga('send', 'event', 'Courses' , 'Clicked on xml course link in footer');">XML Course</a><br> <a href="https://courses.w3schools.com/" target="_blank" class="w3-button w3-margin-top ws-black ws-hover-black w3-round" style="text-decoration:none" onclick="ga('send', 'event', 'Courses' , 'Clicked on get certified button in footer');"> Get Certified »</a> </div> </div> </div> <hr> <div class="w3-center w3-small w3-opacity"> W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our <a href="/about/about_copyright.asp">terms of use</a>, <a href="/about/about_privacy.asp">cookie and privacy policy</a>.<br><br> <a href="/about/about_copyright.asp">Copyright 1999-2022</a> by Refsnes Data. All Rights Reserved.<br> <a href="//www.w3schools.com/w3css/default.asp">W3Schools is Powered by W3.CSS</a>.<br><br> </div> <div class="w3-center w3-small"> <a href="//www.w3schools.com"> <i class="fa fa-logo ws-text-green ws-hover-text-green" style="position:relative;font-size:42px!important;"></i> </a></div><a href="//www.w3schools.com"> <br><br> </a></div><a href="//www.w3schools.com"> </a></div><iframe name="__tcfapiLocator" style="display: none;"></iframe><iframe name="__uspapiLocator" style="display: none;"></iframe><a href="//www.w3schools.com"> <script src="/lib/w3schools_footer.js?update=20220202"></script> <script> MyLearning.loadUser('footer'); function docReady(fn) { document.addEventListener("DOMContentLoaded", fn); if (document.readyState === "interactive" || document.readyState === "complete" ) { fn(); } } uic_r_z(); uic_r_d() </script><iframe src="https://56d0da6c34aaa471db22bb4266aac656.safeframe.googlesyndication.com/safeframe/1-0-38/html/container.html" style="visibility: hidden; display: none;"></iframe> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> <![endif]--> </a><script type="text/javascript" src="https://geo.moatads.com/n.js?e=35&ol=3318087536&qn=%604%7BZEYwoqI%24%5BK%2BdLLU)%2CMm~tM!90vv9L%24%2FoDb%2Fz(lKm3GFlNUU%2Cu%5Bh_GcS%25%5BHvLU%5B4(K%2B%7BgeFWl_%3DNqUXR%3A%3D%2BAxMn%3Ch%2CyenA8p%2FHm%24%60%233P(ry5*ZRocMp1tq%5BN%7Bq%60RP%3CG.ceFW%7CoG%22mxT%3Bwv%40V374BKm55%3D%261fp%5BoU5t(KX%3C%3Ce%24%26%3B%23wPjrBEe31k5X%5BG%5E%5B)%2C2iVSWf3Stnq%263t!9jr%7BRzI%2C%7BOCb%25%24(%3DNqU%60W5u%7Bo(zs1CoK%2Bdr%5BG)%2C3ii)RGL3emgSuRVE&tf=1_nMzjG---CSa7H-1SJH-bW7qhB-LRwqH-nMzjG-&vi=111111&rb=2-90xv0J4P%2FoMsPm8%2BZbNmT2EB%2BBOA3JNdQL68hLPh4bg2%2F%2FnQIIWF3Q%3D%3D&rs=1-iHtHGE9B1zA1OQ%3D%3D&sc=1&os=1-3g%3D%3D&qp=10000&is=BBBBB2BBEYBvGl2BBCkqtUTE1RmsqbKW8BsrBu0rCFE48CRBeeBS2hWTMBBQeQBBn2soYggyUig0CBlWZ0uBBCCCCCCOgRBBiOfnE6Bkg7Oxib8MxOtJYHCBdm5kBhIcC9Y8oBXckXBR76iUUsJBCBBBBBBBBBWBBBj3BBBZeGV2BBBCMciUBBBjgEBBBBBB94UMgTdJMtEcpMBBBQBBBniOccBBBBBB47kNwxBbBBBBBBBBBhcjG6BBJM2L4Bk8BwCBQmIoRBBCzBz1BBCTClBBrbGBC4ehueB57NG9aJeRzBqEKBBBBBBB&iv=8&qt=0&gz=0&hh=0&hn=0&tw=&qc=0&qd=0&qf=1240&qe=883&qh=1280&qg=984&qm=-330&qa=1280&qb=1024&qi=1280&qj=984&to=000&po=1-0020002000002120&vy=ot%24b%5Bh%40%22oDgO%3DLlE6%3Avy%2CUitwb4%5Du!%3CFo%40Y_3r%3F%5DAY~MhXyz%26_%5B*Rp%7C%3EoDKmsiFDRz%5EmlNM%22%254ZpaR%5BA7Do%2C%3Bg%2C%2C%40W7RbzTmejO%3Def%2C%7Bvp%7C9%7C_%3Bm_Qrw5.W%2F84VKp%40i6AKx!ehV%7Du!%3CFo%40pF&ql=%3B%5BpwxnRd%7Dt%3Aa%5DmJVOG)%2C~%405%2F%5BGI%3F6C(TgPB*e%5D1(rI%24(rj2Iy!pw%40aOS%3DyNX8Y%7BQgPB*e%5D1(rI%24(rj%5EB61%2F%3DSqcMr1%7B%2CJA%24Jz_%255tTL%3Fwbs_T%234%25%60X%3CA&qo=0&qr=0&i=TRIPLELIFT1&hp=1&wf=1&ra=1&pxm=8&sgs=3&vb=6&kq=1&hq=0&hs=0&hu=0&hr=0&ht=1&dnt=0&bq=0&f=0&j=https%3A%2F%2Fwww.google.com&t=1650718754860&de=466991431602&m=0&ar=bee2df476bf-clean&iw=2a1d5c5&q=2&cb=0&ym=0&cu=1650718754860&ll=3&lm=0&ln=1&r=0&em=0&en=0&d=6737%3A94724%3Aundefined%3A10&zMoatTactic=undefined&zMoatPixelParams=aid%3A29695277962791520917040%3Bsr%3A10%3Buid%3A0%3B&zMoatOrigSlicer1=2662&zMoatOrigSlicer2=39&zMoatJS=-&zGSRC=1&gu=https%3A%2F%2Fwww.w3schools.com%2Ftags%2Ftag_p.asp&id=1&ii=4&bo=2662&bd=w3schools.com&gw=triplelift879988051105&fd=1&ac=1&it=500&ti=0&ih=1&pe=1%3A512%3A512%3A1026%3A846&jm=-1&fs=198121&na=2100642455&cs=0&ord=1650718754860&jv=1483802810&callback=DOMlessLLDcallback_5147906"></script><iframe src="https://www.google.com/recaptcha/api2/aframe" width="0" height="0" style="display: none;"></iframe></body><iframe sandbox="allow-scripts allow-same-origin" id="936be7941bd9c5c" frameborder="0" allowtransparency="true" marginheight="0" marginwidth="0" width="0" hspace="0" vspace="0" height="0" style="height:0px;width:0px;display:none;" scrolling="no" src="https://jp-u.openx.net/w/1.0/pd?plm=6&ph=8a7ca719-8c2c-4c16-98ad-37ac6dbf26e9&gdpr=0&us_privacy=1---"> </iframe><iframe sandbox="allow-scripts allow-same-origin" id="94da8182082e79b" frameborder="0" allowtransparency="true" marginheight="0" marginwidth="0" width="0" hspace="0" vspace="0" height="0" style="height:0px;width:0px;display:none;" scrolling="no" src="https://eus.rubiconproject.com/usync.html?us_privacy=1---"> </iframe><iframe sandbox="allow-scripts allow-same-origin" id="950ad185776f97c" frameborder="0" allowtransparency="true" marginheight="0" marginwidth="0" width="0" hspace="0" vspace="0" height="0" style="height:0px;width:0px;display:none;" scrolling="no" src="https://cdn.connectad.io/connectmyusers.php?us_privacy=1---&"> </iframe><iframe sandbox="allow-scripts allow-same-origin" id="960961bdb263a5c" frameborder="0" allowtransparency="true" marginheight="0" marginwidth="0" width="0" hspace="0" vspace="0" height="0" style="height:0px;width:0px;display:none;" scrolling="no" src="https://ads.pubmatic.com/AdServer/js/user_sync.html?kdntuid=1&p=157369&gdpr=0&gdpr_consent=&us_privacy=1---"> </iframe><iframe sandbox="allow-scripts allow-same-origin" id="973d77507d8ed2c" frameborder="0" allowtransparency="true" marginheight="0" marginwidth="0" width="0" hspace="0" vspace="0" height="0" style="height:0px;width:0px;display:none;" scrolling="no" src="https://s.amazon-adsystem.com/iu3?cm3ppd=1&d=dtb-pub&csif=t&dl=n-index_pm-db5_ym_rbd_n-vmg_ox-db5_smrt_an-db5_3lift"> </iframe><iframe sandbox="allow-scripts allow-same-origin" id="986df094b3ccc6f" frameborder="0" allowtransparency="true" marginheight="0" marginwidth="0" width="0" hspace="0" vspace="0" height="0" style="height:0px;width:0px;display:none;" scrolling="no" src="https://biddr.brealtime.com/check.html"> </iframe><iframe sandbox="allow-scripts allow-same-origin" id="9984b091a86efa7" frameborder="0" allowtransparency="true" marginheight="0" marginwidth="0" width="0" hspace="0" vspace="0" height="0" style="height:0px;width:0px;display:none;" scrolling="no" src="https://js-sec.indexww.com/um/ixmatch.html"> </iframe><iframe sandbox="allow-scripts allow-same-origin" id="1004b17db44af55b" frameborder="0" allowtransparency="true" marginheight="0" marginwidth="0" width="0" hspace="0" vspace="0" height="0" style="height:0px;width:0px;display:none;" scrolling="no" src="https://csync.smilewanted.com?us_privacy=1---"> </iframe><iframe sandbox="allow-scripts allow-same-origin" id="101af22cac10bcfd" frameborder="0" allowtransparency="true" marginheight="0" marginwidth="0" width="0" hspace="0" vspace="0" height="0" style="height:0px;width:0px;display:none;" scrolling="no" src="https://onetag-sys.com/usync/?cb=1650718752982&us_privacy=1---"> </iframe><iframe sandbox="allow-scripts allow-same-origin" id="10290b51ae900f2b" frameborder="0" allowtransparency="true" marginheight="0" marginwidth="0" width="0" hspace="0" vspace="0" height="0" style="height:0px;width:0px;display:none;" scrolling="no" src="https://eb2.3lift.com/sync?us_privacy=1---&"> </iframe><iframe sandbox="allow-scripts allow-same-origin" id="103d27603dbc3983" frameborder="0" allowtransparency="true" marginheight="0" marginwidth="0" width="0" hspace="0" vspace="0" height="0" style="height:0px;width:0px;display:none;" scrolling="no" src="https://acdn.adnxs.com/dmp/async_usersync.html"> </iframe></html>
andresgalante / RGBAtoFeColorMatrixRGBA to feColorMatrix converter polymer webcomponent