CSC 122 Lecture Note
CSC 122 Lecture Note
<body>
</body>
</html>
Example explained
The <!DOCTYPE html> declaration defines that this document is an HTML5 document
The <html> element is the root element of an HTML page
The <head> element contains meta information about the HTML page
The <title> element specifies a title for the HTML page (which is shown in the browser's title bar
or in the page's tab)
The <body> element defines the document's body, and is a container for all the visible contents,
such as headings, paragraphs, images, hyperlinks, tables, lists, etc.
The <h1> element defines a large heading
The <p> element defines a paragraph
What is an HTML Element?
Example
The HTML <form> Elements
The HTML <form> element are elements that can be found
inside an html form. It can contain one or more of the
following form elements:
<input>
<label>
<select>
<textarea>
<button>
<option>
HTML Tables
HTML tables allow web developers to arrange data into rows
and columns.
A table in HTML consists of table cells inside rows and columns.
Example
HTML Styles - CSS
What is CSS?
With CSS, you can control the color, font, the size of text, the spacing
between elements, how elements are positioned and laid out, what
background images or background colors are to be used, different
displays for different devices and screen sizes, and much more!
Using CSS
The element selector selects HTML elements based on the element name.
Example
Here, all <p> elements on the page will be center-aligned, with a red text color:
p{
text-align: center;
color: red;
}
h2 {
text-align: center;
color: red;
}
p{
text-align: center;
color: red;
}
It will be better to group the selectors, to minimize the code.
To group selectors, separate each selector with a comma.
Example
In this example we have grouped the selectors from the code
above:
h1, h2, p {
text-align: center;
color: red;
}
Introduction to JavaScript
•Automatically
•Using var
•Using let
•Using const
The object data type can contain both built-in objects, and user defined objects:
objects, arrays, dates, maps, sets, intarrays, floatarrays, promises, and more.
Examples of Datatype in JS
Group Project
Design a simple registration form with the knowledge gain from the study of HTML
and CSS.
Your form should contain the following input fields; Full name, Username, Email,
Ensure the has a label at the top of every input field, and the state must be a select
option.
Validate the form using javascript to accept only email that ends with @nsuk.edu.ng