
The Apress logo.
This Apress imprint is published by the registered company APress Media, LLC, part of Springer Nature.
The registered company address is: 1 New York Plaza, New York, NY 10004, U.S.A.
The aim of this book is to provide a first course in the use of HTML and CSS.
It provides a foundation for those who wish to develop their own websites, and because the book is intended to be a primer, it allows the beginner to become comfortable with basic HTML and CSS coding.
As it is a first course, no previous experience of computer programming is assumed.
Throughout the book, we’ll explore HTML and CSS with worked examples and lab exercises for you to complete yourself. We’ll also introduce JavaScript and how it can be used to add interactivity to a website, as well as using content management systems such as WordPress. For this purpose, we’ve included all the source code for this book in the following repository: https://github.com/Apress/The-Absolute-Beginner-s-Guide-to-HTML-and-CSS
With over 20 years of experience in the computer industry, Kevin Wilson has made a career out of technology and is showing others how to use it. After earning a master’s degree in computer science, software engineering, and multimedia systems, Kevin has held various positions in the IT industry including graphic and web design, digital film and photography, programming and software engineering, developing and managing corporate networks, building computer systems, and IT support. He currently teaches computer science at college and works as an IT trainer in England while researching for his Ph.D.
is a product owner and engineer living in the UK. He graduated from UCL in 2015. With many years of experience, he has developed and run many successful projects both independently and in large companies. He produces a popular software engineering blog called fjolt.com and posts regular newsletters about the latest developments and trends in JavaScript and web development.
Originally developed in the early 1990s by Tim Berners-Lee, HTML stands for HyperText Markup Language and is a language used to lay out and format documents for the World Wide Web that are designed to be displayed in a web browser. In other words, the HTML code describes the structure of a web page. HTML can be used with other technologies such as Cascading Style Sheets (CSS) to style and format the document and scripting languages such as JavaScript to provide functionality and interactive elements.
Understand the World Wide Web.
Create and customize your own websites: You can create a website or customize an existing web template if you know HTML.
Become a web developer: If you want to start a career as a professional web developer, HTML and CSS are essential skills.
Web pages are all linked together using clickable text or images, called hyperlinks. This is known as hypertext and enables you to create multiple pages on a website that allow the user to browse through the pages by clicking these hyperlinks.
Hyperlinks can also link to pages and resources hosted on other websites.
The links can be embedded into the body of a paragraph as an underlined word or as an image or icon. This is called hypertext.

A set of screenshots. 3 screenshots of the understanding computer hardware, Microsoft fundamentals, and absolute beginners python. The understanding computer hardware points to a linked page screenshot. The linked page screenshot includes home, about us, courses, shop, and contact us options, instructor name, categories, review, and duration.
Hypertext Document
A website and its pages are stored or hosted on a web server. Web servers are computers usually running Windows Server or, more commonly, some flavor of the Linux operating system such as CentOS. Running on these machines is a piece of software called a web server. This is usually Apache, IIS, or NGINX (pronounced “Engine X”).

An illustration of the U R L structure illustrates as follows. Protocol h t t p s. Two forward slashes. Subdomain, w w w. Dot. Second level domain, ellumitech academy. Dot. Top-level domain, com. Forward slash. Path or web page
Anatomy of a URL
Let’s break the URL down into its different parts.
https:// stands for hypertext transfer protocol secured and is the protocol the web browser is using to connect to the server. This is known as the scheme.
You might find other schemes such as ftp:// if you are connecting to an FTP site.
www is the name of the server hosting the service or subdomain, in this case www for the World Wide Web, and usually points to your public_html or htdocs directory on the web server.
ellumitechacademy is the domain name or organization’s name and is unique to that organization. This is known as a second-level domain.
.com is the type of site. It can be .co.x for country-specific companies (e.g., .co.uk), .org for nonprofit organizations, or .gov for government organizations. These are known as top-level domain names and are designed to identify the types of companies represented on the Web.

A screenshot of the file explorer. The quick access, this P C with h t docs, courses, h t m l, and downloads options are on the left. The main screen has the name, date modified, and type of the 2 folders, course, and downloads.
Directory Structure on a Web Server
Websites are built inside directories on a web server. The index file is the default page displayed if no other page is specified when a visitor enters the URL into their web browser. This index file could be index.html, index.php, or index.py depending on which language you’re using to develop your site. For now, we’ll use index.html.

A block diagram of the directory structure. The h t docs include courses and downloads. Each folder labels index dot h t m l.
Directory Structure

Two webpage screenshots of the index of courses. 1. The screen reads an index of courses and a name, size, date, and mime type. 2. The screen reads forbidden, and you dont have permission to access, courses on this server. Both screenshots has 2 line text at the bottom. Powered by abyss web server X 1, copyright Aprelium 2001 to 2022.
Web Server Directory Listing

A photograph of the website is displayed on the screen of a laptop and a mobile phone. An illustration of the elluminet press website screen on a laptop and a mobile phone. A persons hand holds a mobile phone.
Website on Different Devices
HTML5 also introduces some new tags to handle page structure such as <section>, <head>, <nav>, <aside>, and <footer> and some tags to handle media such as <audio> or <video>.
We’ll take a look at some of the new HTML5 features later in this guide.
Cascading Style Sheets (CSS) are used to define and customize the styles and layout for your web pages. This means you can create style sheets to alter the design, layout, and responsiveness to different screen sizes on various devices from computers to smartphones.
In CSS, selectors declare which part of the HTML markup a style applies. The selector could be an H1 heading style, a body tag, or a paragraph tag.

A schematic illustration of the H T M L tag or selector you want to style. It includes h 1, hash para, dot class, and p. The declaration box near the illustration denotes color, background color, font family, font size, text align, border style, and border width inside the curly braces.
Anatomy of a CSS Selector
This is a better way since it allows you to change the styles in one place rather than in each HTML page you create.
We’ll take a closer look at CSS later in Chapter 4 of this book.
A dedicated hosting service, where a server located at your school or is provided for your use. This can be used for development and in some cases a live website depending on the service.
Setting up a personalized web server on your own computer: This is only good for testing and development and is not intended to host a live website.
Managed hosting service or web host, which is a service managed by a web hosting provider: This is what you would use to host a live website that is available publicly.
In this guide, we are going to use a personal web server. This will help you set up a development environment you can use on your computer to test your website without having it accessible on the Internet.

An illustration of 2 cropped screenshots of Abyss web server X 1 and P H P for windows. Both pages include the details and links to download and language files.
Download Web Page

A screenshot of the personal edition download. The latest version of Abyss Web Server X 1 version 2.16.4 has 3 options of download Abyss Web Server X 1 for Windows, macOS, and Linux.
Download Abyss Web Server Page
Open your downloads directory, then double-click the software package you just downloaded. Click “Agree” on the license agreement page.

A screenshot of the Abyss Web Server X 1 setup and installation option. The components to install list various components and highlights the Abyss web server 64-bit options. The cancel, back, and next buttons are at the bottom, where the next button highlights with a dark shade.
Web Server Installation

A screenshot of the Abyss Web Server X 1 setup and installation option for a directory to install the web page. It includes the destination folder text box and the browse button beside the text box. The cancel, back, and next buttons are at the bottom, where the next button highlights with a dark shade.
Choose a Directory to Install the Web Server

A screenshot displays the Windows screen of the computer. The menu lists Abyss web server, adobe creative cloud, adobe photoshop, calculator, calendar, camera, productivity, and explore. The power button, settings, image, and notepad icons are on the left.
Start Menu

A screenshot of the language webpage. The options for Abyss Web Server, console configuration, and language are at the top. The options to choose English or Francais are at the bottom.
Configuration Wizard

A screenshot of the access credentials webpage. The options for Abyss Web Server, console configuration, and access credentials are at the top. It includes the text box to enter login, password, and password again. The ok and cancel buttons are at the bottom.
Login Details

A screenshot of the sign-in dialogue box. It has an input text box for username and password. The sign-in and cancel buttons are at the bottom. The sign-in button highlight with a dark shade.
Enter Your Credentials
We’ve configured the server so it doesn’t automatically start when you log in to Windows, as this could be a security risk. It is best to only run the web server when you need it to test your website.
Once the web server has been installed, you’ll need to start the web server before you can do anything.

A screenshot displays the Windows screen of the computer. The menu lists Abyss web server, adobe creative cloud, adobe photoshop, calculator, calendar, camera, productivity, and explore. The Abyss web server X 1 option highlights with a light shade. The power button, settings, image, and notepad icons are on the left.
Start Abyss Web Server

A screenshot of the computer window. Hidden icons are at the bottom right of the window has 4 options. A right arrow points to the Abyss web server icon, which is circular in shape.
Abyss Web Server in the System Area
You can save your web pages to Abyss Web Server on your local machine, or you can use FTP to upload them to a web host if you have that facility setup. In this guide, we’ll save our pages to Abyss Web Server on the local machine.

A screenshot of the h t docs in file explorer. The menu bar has 4 options, file, home, share, and view are at the top. The file option has the name, date modified, type, and size of 2 documents. Local disk c, Abyss web server, h t docs option on the left are points with left arrows.
Abyss Web Server Pages
If you are using a web host somewhere else, you’ll need to use an FTP client to connect to the server to upload your files. You’ll need to obtain your username and password and the address of the web server from your hosting provider.

A screenshot of the T K-FileZilla. The menu bar includes file, edit, view, transfer, and server options. The file options include site manager, new and close tab, export, import, show files currently being edited, and exit.
Site Manager Using FileZilla

A screenshot of the site manager. The select entry block has my site with a new site option. On the right, there are 4 options. The general option has a text box and dropdown options for protocol, host, encryption, logon type, user, and password. A right arrow points new site option. The connect, ok, and cancel buttons are at the bottom.
FTP and Login Process
Click connect to begin.
Once a connection to the server is established, you’ll land on the home screen.

A screenshot of the T K-FileZilla. The screen includes a menu bar, toolbar, and main screen. The main screen highlights the local and remote sites. The local site has a public h t m l folder and the text at the bottom reads the local folder on your computer. The remote site reads folder on web server.
Files on the Local Computer and Web Server

A screenshot of the upload and download files list. It lists the file name, size, type, and last modified. The file name screenshot dot P N G selects and has popup options. The popup menu includes upload, add files to queue, open, edit, create directory, create directory and enter it, refresh, delete, and rename.
Upload and Download Files
Finding the right tool is a matter of personal preference and depends on the type of application you are going to develop. There are many different tools available. You could use an IDE which is an integrated development environment such as Adobe Dreamweaver, Brackets, or VS Code.
An IDE is a software application that consists of a source code editor with syntax highlighting to make code easier to read, as well as built-in tools to help you develop your code and a debugger to help you find errors. These are all integrated into one application, hence the name integrated development environment.

A screenshot of the Adobe Dreamweaver I D E screen. The code is under the text, Welcome to our site. The menu bar includes file, edit, view, insert, tools, window, and help options at the top. The options of code, split, and design are at the center. The page properties are at the bottom.
Adobe Dreamweaver IDE

A screenshot of the index dot h t m l h t docs-Visual studio code screen. The code is on the left. The preview index dot h t m l on the right displays the Welcome to Anna's Kitchen webpage.
VS Code IDE

Two screenshots of the index dot h t m l, h t docs, and webpage screens. The 31-line code is on the h t m l screen. The Welcome to Annas Kitchen webpage is on the Annas Kitchen website.
Brackets App with Browser Preview
You can use any of these tools to write your code. Some of these IDEs can be quite complex, so while you are learning, I suggest you stick with Notepad and write the code manually so you can understand the structure and meaning without distractions.

Two screenshots of the index dot h t m l-Notepad and webpage screens. The 24-line code is on the Notepad screen. The Welcome to Annas Kitchen webpage is on the Annas Kitchen website.
Notepad Code Editor and Browser Preview
In this demo, we’re going to explore how web servers work.

A schematic illustration depicts the link between a web server and the C P U of a machine. A desktop exhibits Apache G U I page.
Machine with Web Server Installed

A screenshot of the folders root. The folders are access-logs, e t c, public f t p, public h t m l, index dot h t m l, and resources. The folders public h t m l, index dot h t m l, and resources highlight with a rectangular box, and a left arrow points to the index dot h t m l folder.
Document Root
IP address: 192.168.0.100
Port: 80
Document root: /var/www/public_html

A schematic illustration of the laptop client accessing a web server. A laptop connects to the rectangular box, which has 5 ports. Then connects to the desktop with C P U. The desktop exhibits an apache G U I page.
Client Accessing a Web Server

A screenshot of a new tab on a web server. The I P address 192.168.0.100 is at the top of the screen.
IP Address

An illustration of the laptop client 192.168.0.14 connected to the server 192.168.0.100 using I P address 192.168.0.100 through port 80.
Web Server Connected

An illustration of the connection of the server 192.168.0.100 to the laptop client 192.168.0.14 through port 54079.
Connection Assigned Port Number

An illustration of the sockets on the laptop client 192.168.0.14 and the server 192.168.0.100. The socket on the laptop is 192.168.0.14.54079. The socket on the server is 192.168.0.100.80.
Socket
Once a connection is established, the web server reads the index HTML file in the public_html directory and sends the code in this file to the laptop (client).
The browser on the laptop (client) then reads the HTML code and creates the web page you see on your screen.
You may have noticed that when visiting a website, you don’t type in a string of numbers, you type in a domain name. The problem is computers don’t understand domain names, only IP addresses, so we need to convert them.
In order to do this, we need to add another server to the mix called a DNS server. This server converts our memorable domain names into IP addresses.

An illustration of the connection of client laptop, server, and D N S server. The laptop sent the I P address 192.168.0.100 to the server 192.168.0.100 and elluminetpress dot com to the D N S server. The response from server 192.168.0.100 to the laptop is index dot h t m l. The response from the D N S server to the laptop is 192.168.0.100.
Computer Connecting to the Web Server
Your computer (i.e., the laptop) then uses this IP address to connect to the web server as before.
Set up your personal web server on your computer or get access to a web host to host your HTML files.
Choose a text editor to edit your code, for example, Notepad.
What is hypertext?
What is a URL?
What is HTML?
What is CSS?
What is a web server?
What is the purpose of an index.html file?
What is an IP address?
What is the purpose of a DNS server?
Web pages are all linked together using clickable text or images, called hyperlinks.
VS Code
Dreamweaver
Brackets
Text editor (Notepad, TextEdit, etc.)
A website and its pages are stored or hosted on a web server.
A DNS server translates domain names into IP addresses.
An IP address is a unique address that identifies a device on the Internet.
In this chapter, we’ll take a look at the basics of an HTML document.
Document type declaration at the top
Document header
Body

An illustration of the H t m l structure. The first line reads, open-angle bracket exclamatory sign doctype h t m l close-angle bracket. The open and close head and body tags are inside the h t m l tag. The tags enclose with an angular bracket. The close tag has a forward slash.
Structure of an HTML Document
At the top on the first line, we have the document type declaration.
Underneath, we have the first <html> element. This defines the start of the HTML page.
Inside the <html> elements, we have the <head> element. This contains information about the page as well as the document title.
Underneath, we have the <body> element. This is where the main body of the document is defined. This is the bit you see in your browser window.
Finally, we need to close the <html> element. This marks the end of the document.

A screenshot of a basic h t m l code. The details of the set of lines are within the bubble chat speak box. Line 1 detail reads tell the browser what type of document to expect. Open and close HTML tag detail reads the start and close of the HTML page. The head tag detail reads header information about the page, keywords, and title. The body tag detail reads, part of the page see in the browser window.
Blank HTML Document
<!DOCTYPE html> specifies what type of document the web browser can expect, in this case, HTML5.
<html lang=“en”> to specify English
<html lang=“es”> to specify Spanish
<html lang=“fr”> to specify French
<html lang=“de”> to specify German
<title>: This is where we insert the page name as it will appear at the top of the browser window or tab.
<style>: This is where you define embedded style information for an HTML document using CSS. See Chapter 4.
<link>: Link to an external style sheet. See Chapter 4.
<script>: This is used to define client-side scripts, such as JavaScript. See Chapter 8.
<meta>: This is where information about the document is stored – character encoding, name, description, etc. See the “Metadata” section later in this chapter.
The <body> element contains all the elements and is where the main content is written to display on the web page.
<!-- … -->
These elements specify a comment for the developer’s benefit and are ignored by the browser. Comments are useful to document your code and explain its function.
Technically, an HTML element consists of a start tag, the element’s attributes, the visible bit or the content, and an end tag. The HTML tag is used to mark the start or end of an element.
Let’s take a closer look at how HTML elements are constructed. Elements start with an opening tag and end with a closing tag. The tags themselves start and end with angle brackets < >.

An illustration of the difference between the opening and closing tag. The opening tag reads, open-angle bracket, a, close-angle bracket which labels opening bracket, element I D, and closing bracket. The opening tag reads, open-angle bracket, forward slash, a, close-angle bracket, which labels opening bracket, forward slash indicates closing tag, element I D, and closing bracket.
HTML Opening and Closing Tags
The bit visible to the user goes in between the two tags.

A h t m l tag reads as follows. Open-angle bracket a h r e f = double quote about dot h t m l double quote close-angle bracket. Element I D, a. Attribute, h ref. Attribute value, about dot h t m l.
HTML Tag Structure
The name is the attribute you want to set. For example, the anchor <a> element contains an attribute named “href,” which indicates the address of the page you want to link to.
The value is what you want the attribute to be set to and is always contained within quotation marks. In this example, the page we want to link to is called “about.html”.

A structure of an H T M L element depicts About Us. The structure consists of an opening tag, visible content, and a closing tag. The opening tag consists of element I D, attribute, and attribute value.
An HTML Element
The element starts with an opening angle bracket <, followed by the element ID of the element we want to use, in this case, the “a” for anchor. After that, we add any attributes as we can see in Figure 2-5.
Attributes contain additional pieces of information. Attributes take the form of an opening tag, and additional info is placed inside. For example, in the HTML tag earlier, “href” is an attribute, and “about.html” is the value of the attribute.
We close the opening tag with an angle bracket >.
After the opening tag, we add the visible bit that the user will see on the web page “About Us.”

A screenshot of the c h 0 2 dot h t m l-Notepad and web browser. The h ref code is on the notepad screen. A webpage has a link line about us. The about us line leads to the about us browser page.
Anchor Element
The image source (src) is an attribute of the opening <img> tag. Notice that the <img> element doesn’t have a closing tag. This is known as an empty, self-closing, or void element.
Metadata is additional information about an HTML document. The meta elements can be used to describe properties of the HTML document, such as author, date, and content descriptions. Metadata is used by browsers to determine how to display content and by search engines such as Bing or Google to work out what a web page is about.
The meta element has various attributes such as charset and name.
A meta charset specifies the character encoding for the HTML document which is usually UTF-8.
A meta name specifies names for the metadata such as a content description that appears in search engine results of the page, keywords that identify the content, and author of the page.
Open a new text file and save it as ch02.html.
Write the basic structure of an HTML document.
What is an HTML tag?
What is an HTML element?
What’s the difference between an HTML tag and an HTML element?
What is metadata?
What is the <head> section for in an HTML document? What other elements can you include?
An HTML element consists of a start tag, the element’s attributes, the visible bit or the content, and an end tag. The HTML tag is used to mark the start or end of an element.
<!DOCTYPE html> specifies what type of document the web browser can expect, in this case, HTML5.
Head elements contain information about the page as well as the document title. These also contain other elements such as title to specify a page title for the browser window, style to include CSS styles, script to include any JavaScripts, and meta to include metadata.
The body elements contain the main body of the document. This is the bit you see in your browser window.
In this chapter, we are going to build a very simple home page for our restaurant website using common text formatting elements, and we’ll add some images, links, tables, and lists.
This will provide you with a foundation and basic structure of a web page using HTML, which you can build on later.
We’ll walk through the process from a blank HTML document, then build the home page using the HTML elements.
We’ll also look at how to use the style attributes of each HTML element. You can apply styles directly in the HTML code each time you want to use the style such as fonts, text color, and page color. This, however, is a bit cumbersome and becomes very difficult to maintain in the long run, especially in larger projects where there is a lot of code. A much better way is to use a style sheet or CSS to set fonts, text color, and page color. This allows you to define all your styles once and in one place, usually in a styles.css file. You can then call the CSS file from within your HTML code, which we’ll look at in the next chapter.
For now, let’s concentrate on HTML code.
For the exercises in this chapter, we will be using Notepad and a web browser. We’ll be saving our HTML files into the htdocs folder on our personal web server we installed in Chapter 1.

A screenshot of the index dot h t m l-Notepad screen. A 9-line H T M L code h t m l, head and body tags. The head tag with title and body tag with heading 1 highlight separately with an open square bracket.
HTML Document Outline

A screenshot of the index dot h t m l-Notepad screen. The menu bar has file, edit, and view options. The options such as new, new window, open, save, save as, page setup, print, and exit under the file option. 2 left arrows point to the file and save as options.
Save As in Notepad

A screenshot of the save as screen. The folders abyss web server, a d n, console, doc, h t docs, k c store, lang, log, perflogs, and program files are displayed under local disk C on the left of the screen. 3 left arrows point to the local disk C, abyss web server, and h t docs. The save and cancel buttons are at the bottom.
Save in Abyss Web Server

A screenshot of the Save As type screen. The screen displays the file name index dot h t m l, save as type, and encoding. The options to hide folders, save, and cancel are at the bottom of the screen.
Save in Abyss Web Server
index.html is the file we want to view. To view any other HTML files you create, just substitute this file name.
Arrange your windows side by side; put Notepad on the left and your web browser next to it on the right as they are on the opposite page. You may need to resize your windows.
Every time you make any changes to your file in Notepad, you’ll need to save the file, then click the refresh icon in your web browser.
Let’s get started.

Two screenshots of the index dot h t m l Notepad and the webpage. The index dot h t m l notepad has 8 lines of h t m l code. The webpage title reads Annas kitchen and the body read reads welcome to annas kitchen.
Title and Body Text
HTML elements label the pieces of your web page, such as headings, text formatting with bold or italic, paragraphs, images, links, and tables.
Let’s have a look at some simple formatting elements.
HTML elements begin and end with an HTML tag and usually come in pairs, and you’ll need to surround the piece of text or word using the start and end tags.

Two screenshots of the index dot h t m l Notepad and the webpage. The index dot h t m l notepad has 11 lines of h t m l code. The webpage includes Annas kitchen title, heading, subheading, bold text, and paragraph.
HTML Text Editor
In the illustration in Figure 3-6, the HTML document is open in a text editor on the left. The same document is open in a web browser on the right, and you can see the effect that each element has on the text, as indicated by the red arrows.
Browsers do not display the HTML elements but use them to format the content of the page according to their function.

Two screenshots of the index dot h t m l Notepad and the webpage. The index dot h t m l notepad has 11 lines of h t m l code, and a paragraph tag highlights a line inside a bold tag. The webpage of the Annas kitchen has a title, heading, subheading, bold text, and a paragraph with a single bold line text.
Bold Text
The text “beef, turkey, pork and marmalade-glazed gammon.” appears in bold or strong text.
You can also make text italic or emphasized. The <i> tag marks text in an alternate voice, and the content inside is usually displayed in italic type. The <em> tag marks text as emphasized, and the content inside is usually displayed in italic type.

Two screenshots of the index dot h t m l Notepad and the webpage. The index dot h t m l notepad has 11 lines of h t m l code, and a paragraph tag highlights a line inside an italic tag. The webpage of the Annas kitchen has a title, heading, subheading, bold text, and a paragraph with a single bold line text.
Italics

A screenshot of the index dot h t m l Notepad. A 10-line h t m l code includes a head tag with a title tag, and a body tag with heading 1, heading 2, and paragraph tags.
Use of Tags

A screenshot of Annas kitchen webpage. The title reads, welcome to Anna's kitchen. The subheading reads, the home of the roast. A paragraph of 5-line text is at the bottom of the subheading. 2 lines text is in bold and italic formats.
Tags in Use
The heading has been rendered using <H1>, and the tag line has been rendered in bold text using <b>.
Also, we have created a paragraph using the <p> tags. This tag splits the text into neatly spaced paragraphs.

Two screenshots of the index dot h t m l- Notepad and a webpage screen. A 10-line h t m l code is in a notepad and highlights the body tag of the background color as orange. The Annas kitchen webpage has a title, heading, subheading, and paragraph. The background color points with an arrow.
Background Color

Two screenshots of the index dot h t m l- Notepad and a webpage screen. A 10-line h t m l code is in a notepad and highlights the paragraph tag of the background color as yellow. The Annas kitchen webpage has a title, heading, subheading, and paragraph. The paragraph background color points with an arrow.
Background Color of Objects

Two screenshots of the index dot h t m l- Notepad and a webpage screen. A 10-line h t m l code is in a notepad and highlights the heading 1 tag inside the body tag. The heading 1 tag has a text color yellow. The Annas kitchen webpage has a title, heading, subheading, and paragraph. The text color points with an arrow.
Text Color Change

Two screenshots of the index dot h t m l- Notepad and a webpage screen. A 10-line h t m l code is in a notepad and highlights the heading 2 tag inside the body tag. The heading 2 tag has a text font Helvetica. The Annas kitchen webpage has a title, heading, subheading, and paragraph. The text color points with an arrow.
Changing the Font
The font on the subheading has changed to Helvetica.
You can choose from a variety of fonts. Not all of them are supported by all browsers but most of them are.
You can also make use of Google Fonts.

A table with 3 columns and 12 rows. The column headers are character, description, and H T M L entity.
Commonly Used Characters
Use the src attribute to specify the file name and location of the image. It is advised to keep images in a separate folder called “img,” “images,” or sometimes “assets.” This helps to keep all your files organized. In this guide, we’ll save our images into the “img” folder on our web server.

Two screenshots of the index dot h t m l- Notepad and a webpage screen. An 11-line h t m l code is in a notepad. The ninth line has an image source link. The Annas kitchen webpage has a title, heading, subheading, paragraph, and image. The image points with an arrow.
Adding an Image

A photograph of a closeup of different food, such as doughnuts, grilled meat, and chopped veggies, on a table. The height and width of the photograph mark with a double-sided arrow.
Image Size
By default, the image will be displayed according to the saved width and height of the actual image (Figure 3-17), but you can override this.

A photograph of a closeup of different food, such as doughnuts, grilled meat, and chopped veggies, on a table. The height is 220 pixels, and the width is 500 pixels of the photograph mark with a double-sided arrow.
Image Resizing
If you look at the image in Figure 3-18, it is a bit small and could do with expanding to the length of the page.
This will widen the image and automatically adjust the length to prevent the image from being stretched.

A screenshot of the index dot h t m l- Notepad and a webpage screen. An 11-line h t m l code is in a notepad. The ninth line of the image tag has an image source link with a width of 500 pixels. The welcome to annas kitchen webpage has a title, heading, subheading, paragraph, and image. The image points with an arrow.
Adjusting the Image Size
Images can be aligned to the left or to the right of the page just like text paragraphs using the alignment attribute.
In the preceding example, when we added the image to the web page, we just added it to the bottom of the page. The image is by default aligned to the left of the page.
You can align the images with your paragraphs on your page. This makes a much neater article to read.
To do this, you will need to nest the <img> element inside your paragraph <p> tag. This is simpler than it sounds.

A screenshot of the index dot h t m l- Notepad and a webpage screen. An 11-line h t m l code is in a notepad, and highlights align as right inside the paragraph tag. The welcome to annas kitchen webpage has a title, heading, subheading, and paragraph, and the image is on the left of the text. The image points with an arrow.
Making the Image Fit
Also, to make the image fit, you’ll need to resize it using the width attribute on your <img> element. The width of our page is 540px, so roughly half that length would be sufficient. So set the width attribute to 250. Have a look at the highlighted line in the Notepad document earlier.
What happens if you change the align attribute to “left” or “middle”?

Two screenshots of the index dot h t m l- Notepad and a webpage screen. A 10-line h t m l code is in a notepad and highlights the body tag with a background image link. The Annas kitchen webpage has a title, heading, subheading, paragraph, and image. The background image is a table with a tomato and other veggies.
Image Added to the Background
Notice the image is too big for the screen.

Two screenshots of the index dot h t m l- Notepad and a webpage screen. A 10-line h t m l code is in a notepad and highlights the body tag of a background image link and its size. The Annas kitchen webpage has a title, heading, subheading, paragraph, and image. The background image is a table with tomatoes and other veggies.
Image Repeated in Background

Two screenshots of the index dot h t m l- Notepad and a webpage screen. A 10-line h t m l code is in a notepad and highlights the body tag of a background image link, its size, and no repeat for the background image. The Annas kitchen webpage has a title, heading, subheading, paragraph, and image. The background image is a table with tomatoes and other veggies.
Background Image Appears Once

A screenshot of the table tag code. A 10-line t m l code has t r and t d code for 2 rows and 2 columns. Row 1 has a dish and price. Row 2 has a carvery roast and $12.99. Each column values are inside the t d tags. Each row values are inside the t r tags.
Creating a Table

Two screenshots of the index dot h t m l- Notepad and a webpage screen. A 12-line h t m l code is in a notepad and highlights the table tag with a list of t r and t d tags. The Annas kitchen webpage has a title, heading, subheading, paragraph, image, and price list. The price list point with an arrow.
Table on the Web Page
Links can be added to your website using the anchor tags <a>...</a>. You can link to another website, another page, a document, or something to download.

Two screenshots of the index dot h t m l- Notepad and a webpage screen. A 15-line h t m l code is in a notepad and highlights the paragraph tag of h ref of menu h t m l with text view our menu. The Annas kitchen webpage has a title, heading, subheading, paragraph, image, and price list. The link text, view our menu point with an arrow.
Linking the Menu
You can see the link in the web page on the right-hand side has blue underlined text. This indicates a link.
You can also link to specific files such as images, documents, or downloads.

A screenshot of the uploads. The file, home, share, and view options are at the top. Under file option, there is a menu p d f on the right panel. The left panel has a local disk, abyss web server, h t docs, and uploads which highlight with left arrows.
Link to Images and Documents
depending on where your resource is hosted.
between the anchor tags <a>...</a>. I want the image to link to the home page.

Two screenshots of the index dot h t m l- Notepad and a webpage screen. A 16-line h t m l code is in a notepad and highlights the paragraph tag of the image source link. The Annas kitchen webpage has a title, heading, subheading, paragraph, image, and price list. A photograph of a fork and knife with a text menu point with an arrow.
Menu Link in the Image

A screenshot of a photograph of a fork and knife with a text at the bottom read menu. It has a U R L link at the bottom of the image, and a hand cursor is on a photograph.
The Menu Link Appears
You can usually see the destination URL in the status bar at the bottom of your web browser.
Unordered lists appear as bulleted lists. Ordered lists appear as numbered lists.

Two screenshots of the index dot h t m l- Notepad and a webpage screen. A 19-line h t m l code is in a notepad and highlights the ordered list tag, which lists the items under l i tag. The Annas kitchen webpage has a title, heading, subheading, paragraph, image, price list, and list of popular menus.
Unordered List

2 screenshots of the index dot h t m l Notepad and a webpage screen. A 19-line h t m l code is in a notepad and highlights the ordered list tag, which lists the items under l i tag. The Annas kitchen webpage has a title, heading, subheading, paragraph, image, price list, and list of popular menus.
Ordered List
HTML5 introduced some new layout and structuring tags that help us to define and format our web page. These are known as semantic elements and can be used to define different parts of a web page. Semantic elements clearly describe the meaning of the content to the browser and developer. In other words, the elements have meaningful names.
These tags are useful for users who rely on screen readers. These readers audibly describe the content of the page, and if you are using semantic elements, this allows screen readers to communicate the content of the page more accurately.
Search engines such as Google and Bing will use the semantic elements to identify and figure out which parts of your site contain the most important content.
<header> ... </header> | A container for introductory content, page titles, or headings |
<nav> ... </nav> | A section of a page used to contain navigation links such as site menus |
<main> ... </main> | Contains the main content of the page |
<section> ... </section> | A stand-alone section of the main page |
<article> ... </article> | A self-contained section in a document or page that can be reused such as a blog article or widget |
<aside> ... </aside> | Allows you to define some content aside from the main content such as a sidebar |
<footer> ... </footer> | Contains information such as footnotes, author, and copyright data |
<figure> ... </figure> | Contains photos, images, illustrations, or diagrams |
<figcaption> ... </figcaption> | Allows you to define a caption for a <figure> element |
<summary> ... </summary> | Allows you to define a visible heading for the <details> element |
<details> ... </details> | Allows you to specify content that the user can open and close |
<div class=" "> ... </div> | Defines a division or a section in an HTML document and can be used as a container for HTML elements styled with CSS or manipulated using the class or id attribute. See Chapter 4 |

2 screenshots of the index dot h t m l- Notepad and a webpage screen. A 26-line h t m l code is in a notepad, and Annas kitchen webpage highlights the header, nav, section, figure, figure caption, and footer tags.
Tags
The main content can go in a <section> tag, any images can go in the <figure> tab, and we can add a footer using the <footer> tags.
Open a new text file and save it as ch03.html.
Write the basic structure of an HTML document.
How do you write bold text using HTML elements?
How to define the document’s body?
How do you create headings using HTML elements?
In the HTML document ch03.html, create a heading.
Change the background color to #E2E0E2 or one of your own choice.
Start a new paragraph, then add a paragraph of text.
Insert a hyperlink to the document you created in the previous chapter (ch02.html).
When using the local Abyss Server on your computer, save documents to C:\Abyss Web Server\htdocs.
To access the website on your computer with a browser, use http://127.0.0.1.
Main heading style: <h1>...</h1>
Subheading style: <h2>...</h2>
Minor heading style: <h3>...</h3>
Bold text: <b>...</b>
Italic text: <i>...</i>
Paragraph text: <p>...</p>
Add a style attribute to change color, for example, <H1 style = “color:Yellow;”>.
Add a style attribute to change font, for example, <H1 style = “font-family:Helvetica;”>.
To add a table, use <table> </table>.
To define each table row, use <tr>...</tr>.
To define data to that row, use <td>...</td>.
Use the img element to add an image: <img src = “ ” width = “ ”>.
Use the anchor element to define hyperlinks: <a href = “ ”>.
Cascading Style Sheets (CSS) are used to define and customize the styles and layouts for your web pages. This means you can create style sheets to alter the design, layout, and responsiveness to different screen sizes on various devices from computers to smartphones.
CSS describes how HTML elements are to be displayed on screen and controls the layout of multiple web pages all at once. This is because the style sheets are stored in separate CSS files and are linked to the HTML document.
CSS solved a big problem. HTML was never originally intended to contain tags for formatting a web page and was created to describe the content of said web page. When more formatting attributes were added to the HTML 3.2 specification, it became a total nightmare for web developers to design and maintain websites. This is because fonts, formatting, layout, and color information were added to every single HTML tag on every page, so making changes and maintaining a website was a long and expensive process.
To solve this problem, the World Wide Web Consortium (W3C) created and introduced CSS. CSS removed the style formatting from the HTML page and allowed the developer to include the formatting and layout information in a separate file which could be included in all the other HTML pages that make up the website.
The word “cascading” means that styling rules flow down from several sources. This means that CSS has a hierarchy, and styles of a higher precedence will overwrite styles of a lower precedence. In other words, styles lower down the hierarchy have higher priority over those higher up.
There are three methods you can use to include CSS styles in your HTML document.

A schematic illustration depicts the links of styles dot c s s into index dot h t m l. It is a right-to-left approach.
Linking a CSS File into an HTML Page
As we have seen in the previous chapter, we had to style each element every time we use it. These are known as inline styles and are very inefficient. What happens if we have a large website and we’ve styled every heading to be 20px, white, using the Helvetica font, and the client wants to change the color of the text or the font. We’d have to go through every instance and change it. Sounds like a nightmare to me.
A much better way is to define all the elements, tags, and so on using a style sheet. This is where CSS shows its true power. If the client came with the preceding request, and we used CSS style sheets, we would only have to change the declaration in the CSS, and every instance would change throughout the whole site.

A screenshot of a h t docs folder screen. The options of file, home, share, and view are at the top. The local disk C and its folders are on the left, and the names of the folders with the date modified are on the right. Local disk C, abyss web server folder, h t docs folder, and styles.css are indicated.
.CSS Text File

A schematic illustration depicts the basic syntax of a C S S rule. It consists of a selector H 1 and a declaration block with property, value, font family, and font size. The declaration block lies between the curly braces.
CSS Syntax
The selector points to the HTML or element you want to style. The declaration block starts with a curly brace and contains one or more style declarations separated by semicolons. Each declaration includes a CSS property name and a value, separated by a colon.

A schematic illustration depicts the H T M L tag or selector you want to style. It includes dot class, p, h 1, and hash para. The selectors using various properties are color, background color, font family, font size, text align, border style, and border width.
Styling Various CSS Selectors
Here, all the H1 elements will be styled in a white Helvetica font.
A class selector is used to apply styles to a specific HTML element. You can name the class anything you want, and it must begin with a dot (or period). Use class selectors when you want to style multiple elements throughout the page or site with the same look or layout.

A screenshot of the index dot h t m l, style dot c s s notepads, and a web browser screen. The code displays on the Notepad screen. The dot highlight class indicates on the notepads. The corresponding text highlights on the browser.
.highlight Class
The ID selector targets a single element and can only be used once per page.
ID selectors are defined in the CSS declarations using a hashtag # and should only be used when you have a single element on the page that will have that particular style or layout.
If you want to style more than one selector with the same styles, you can do this by grouping the selectors together.
This is much more efficient and allows you to declare the styles once.
This would style all the H1 tags used subsequently in the HTML file.

A screenshot of the index dot h t m l and style dot c s s notepads and web browser screen. The code displays on the Notepad screen. H 1 and H 2 tags are highlighted on the code. The first two headers are selected on the browser.
Adding Color to the Website

Two screenshots. 1. The font color is in a dark shade. The last line mentioning the copyright information has a light shade highlight. 2. The font color of the headers is in a light shade. The last line mentioning the copyright information has a light shade highlight.
Changing Font Color
Try changing the font color and alignment in the styles.css file and see what happens.
A Color keyword such as “red,” “green,” “blue,” “transparent,” “orange,” etc.
A hex value such as “#000000”, “#00A500”, “#FFFFFF”, etc.
An RGB value such as “rgb(255, 255, 0)”
Hex | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F |
Decimal | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
Red | Green | Blue |
FF | A5 | 00 |
Red | Green | Blue |
255 | 165 | 0 |
See Appendix C for the full list of color codes.
To control the size of certain objects such as fonts or images, the sizes are specified using various units. There are two types: absolute and relative.
Unit | Meaning |
|---|---|
in | Inch |
mm | Millimeter |
px | Short for pixels and is usually used to measure the dimensions of an image |
pt | Short for points and is used to measure the size of a font |
Unit | Meaning |
|---|---|
em | Relative to the current font size of the element. If a font is 12pt, each em unit would be 12pt, so 2em would be 12 x 2 which is 24pt, similarly 1.5em would be 18pt |
% | Relative to the parent element or window size |

A schematic illustration of the concentric square model. The labels from the inner to outer box layers are content, padding, border, and margin.
The Box Model
The content of the box is where text and images appear.
The padding property is used to add space around the content, inside of the defined border.
The margin property is used to add space around the content, outside of the defined border.
The border-style property specifies what kind of border to display.

A screenshot of the box model dot h t m l-Notepad, and browser window screens. The code displays on the Notepad screen. The website of Welcome to Anna's Kitchen is on the browser screen. The box model is on the browser screen.
Boxes in Use
If you look in the web browser, you can see the box model around the heading. The dotted lines mark the edge of the content. Then we see 10px of padding, then a 5px thick black border, and 20px margin outside the border.
In the previous section, the website we’ve been working on is very linear, meaning each section is just listed under the next. With style sheets, you’re not just limited to restyling HTML tags, you can define layouts and sections.

A block diagram of the flexbox container. A set of 2 blocks are inside a rectangular block. 2 blocks label the item, and the rectangular block label the container.
Flexbox Container
The items in the flex container can be laid out in any direction and can “flex” their sizes which means the items can grow to fill unused space or shrink depending on the screen size.
The flex property in the display element sets how a flex item will grow or shrink to fit the space available in its container.

A set of two block diagrams of the flexbox containers. 1. 2 blocks arranged in a row within a rectangular block. 2. 2 blocks arranged in a column within a square block.
Flexbox Container Spanning Rows and Columns

A block diagram of the flexbox containers. 2 blocks are side by side in a row within a rectangular block.
Flexbox Container Spanning Rows

A block diagram of the flexbox containers. 2 blocks are in a column within a square block.
Flexbox Container Spanning Columns

A set of 2 block diagrams of flexbox container. 1. 3 blocks are in a row within a rectangular block. A left arrow is the bottom of 3 blocks. 2. A square block of 2 rows and 3 columns of blocks. The third column block in the first row is in a light shade. An arrow from the third-column block points to the empty space in the second row of the second column.
Flexbox Container Wrapping

A collage photo of 3 screenshot of the flexstarter dot h t m l-Notepad, flexstarter dot c s s-Notepad, and browser window screens. The code is on the Notepad screens. The browser displays the flexbox container with the textbox that reads, this is content inside item. 2 square blocks are beside the text box.
Resizing

A block diagram of the website layout. The layout consists of a header at the top, a footer at the bottom, a navigation bar below the header, the content below the navigation, and a sidebar to the right of the content.
Website Layout

A collage photograph of 3 screenshots of flex dot h t m l-Notepad, flex dot c s s-Notepad, and browser window screens. The code for the flex container and sidebar are on the Notepad screens. The website of Welcome to Annas Kitchen is on the browser screen and 3 photographs of different foods are in a column on the screens left side.
Flex Container
flex-grow specifies how much the item will grow relative to the rest of the flexible items by a factor. flex-grow: 0 means items won’t grow. flex-grow: 1 means items can grow larger than their flex-basis.
flex-shrink specifies how much the item will shrink relative to the rest of the flexible items. flex-shrink: 1 means items can shrink smaller than their flex-basis.
flex-basis is the length of the item measured in “%”, “px”, or “em”. You can also have values: “auto” or “inherit.”
what does this mean?
flex-grow: 1 means items can grow larger than their flex-basis.
flex-shrink: 1 means items can shrink smaller than their flex-basis.
flex: 250px means once the first row gets to a point where there is not enough space to place another 250px item, a new flex line is created for the items. As the items can grow, they will expand larger than 250px in order to fill each row completely. If there is only one item on the final line, it will stretch to fill the entire line.

A collage photograph of 3 screenshots of flex dot h t m l-Notepad, flex dot c s s-Notepad, and browser window screens. The code for the flex container and sidebar are on the Notepad screens. An arrow from c s s notepad of content and sidebar code points to content and photographs on the webpage. The website of Welcome to Annas Kitchen is on the browser screen, and 3 photographs of different foods are in a column on the screens left side.
Flex Containers in the Browser

A screenshot of the screen displays the sidebar of the Welcome to Anna's Kitchen website. The size of the sidebar is 250 pixels. On the left, there are 2 photographs of food arranged in a column.
The Sidebar Sized at 250px

A set of 2 screenshots arranged in a column. Both screens are the welcome page of Annas kitchen with different widths.
The Width Reduced and Expanded
Keep in mind that flexbox can only handle rows or columns, not both.
A CSS grid layout is a two-dimensional grid-based layout system with rows and columns that is designed to make it easier to lay out web pages and enables a developer to align elements into columns and rows. A CSS grid is a perfect candidate for whole page layouts.

A 3 by 3 grid illustration of the C S S grid. The vertical lines label the column gap, and the horizontal lines label the row gap.
CSS Grid

A 2 by 3 grid illustration of the C S S grid. The vertical lines label the column gap the horizontal lines label the row gap. Row 1 has 3 cells that merge into a single cell. It labels grid span item 1. Row 2 cells read grid items 2, 3, and 4.
CSS Grid with Items

A screenshot of the web browser window screen. It displays the Welcome to Anna's Kitchen website and a grid of 4 columns and 3 rows over it. The header is on row 1, the content and sidebar are on row 2, and the footer is on row 3.
CSS Grid Template
Finally, we can add some padding to space out the contents of the header and align the text to the center.
Now we need to build the page using the grid containers in our HTML document. We do this with the <div> tag.

A screenshot of the c s s grid dot h t m l-Notepad and browser window screens. The header, content, sidebar, and footer code are on the HTML screen. The Welcome to Anna's Kitchen website is on the browser screen, which includes the header, content, sidebar, and footer.
Elements Added
Responsive design is an approach to web design that allows your website content to adapt to different screen and window sizes used on a variety of different devices such as phones, tablets, and computers.

A screenshot of a tablet screen. The screen displays the website for Welcome to Anna's Kitchen. The website has options including home, menu, and book a table. The price details of the dishes are on the right.
Web Design on a Tablet

A screenshot of a laptop screen. The laptop screen displays the website for Welcome to Anna's Kitchen. The website has options including home, menu, and book a table. The price details of the dishes are on the right.
Web Design on a Laptop

A screenshot of a mobile screen. The mobile screen displays the website for Welcome to Anna's Kitchen. The website has options including home, menu, and book a table.
Web Design on a Phone
The layout changes depending on the screen size. Pages should be optimized for a variety of screen sizes, but how do we do this? These days, thanks to smartphones, tablets, laptops with different screen sizes, and PCs, many web pages are based on a responsive grid view. This means web pages based on a grid view are divided into columns.

A schematic illustration of a responsive grid view with 12 columns. It indicates the margin, gutter, and column.
Responsive Grid View
Between each column, you’ll find a gutter, and at either side of the grid, there is a margin.
To construct the grid view in CSS, first we calculate the percentage for one column:
100% / 12 x 1 columns = 8.33%.
The next column would be 100% / 12 x 2 = 16.66%.
The next column: 100% / 12 x 3 = 25%.
And so on….

A schematic illustration of a responsive grid view indicates column widths of 12 columns. The widths from column 1 to column 12 are 8.33%, 16.66%, 25%, 33.33%, 41.66%, 50%, 58.33%, 66.66%, 75%, 83.33%, 91.66%, and 100%.
Responsive Grid View Showing Column Widths

A screenshot of a browser window screen displays the website of Welcome to Anna's Kitchen. The responsive grid view with 12 columns is on the website. The first 8 columns highlight with a rectangular outline.
Responsive Grid View for the Main Content

A screenshot of a browser window screen displays the website of Welcome to Anna's Kitchen. The responsive grid view with 12 columns is on the website. The last 4 columns highlight with a rectangular outline.
Responsive Grid View for the Sidebar

A screenshot of a screen displays the website for Welcome to Anna's Kitchen. The website has options including home, menu, and book a table. The price details of the dishes are on the right. The content on the screen stretches and fills the screen.
The Content Stretched to Fill the Screen

A screenshot of a smartphone screen. The screen displays the website for Welcome to Anna's Kitchen. The website has options including home, menu, and book a table. The price details of the dishes are on the right. The view on the screen is a bit cramped.
A Cramped View on a Phone

A screenshot of a tablet screen. The screen displays the website for Welcome to Anna's Kitchen. The website has options including home, menu, and book a table. The price details of the dish are on the right. The viewport indicates on the website.
Viewport
Using the meta viewport value, width=device-width instructs the page to match the screen's width in device-independent pixels. The initial-scale=1.0 part sets the initial zoom level when the page is first loaded by the browser.

A screenshot of smartphone, tablet, and laptop screens. The screens display the website for Welcome to Anna's Kitchen. The minimum width of the smartphone is 767 pixels, the tablet is 768 pixels, and for laptop is 1024 pixels. The maximum width of a tablet is 1023 pixels.
The Website on Different Screen Sizes
Media queries make it possible to respond to a client browser with a customized display for certain viewport sizes. The @media rule includes a block of CSS properties only if a certain condition is true.
This is known as a CSS attribute selector with the attribute we want to select enclosed in square brackets [].
This creates a breakpoint when the browser window is 768px wide.
You can set your breakpoints using min-width and max-width properties. When should you use each one? Well, if you are designing your layout for small smartphone screens first, then use min-width breakpoints and work your way up. If you’ve designed the website for a desktop display first, and you want to adapt the layout for smaller screens, then use max-width and work your way down to the smallest screen.
What is CSS?
How do you include CSS in your HTML document? Describe the three methods.
What is a selector? What are the different types and what do they do?
Create a new HTML file and name it ch04.html.
Create a new CSS file and name it ch04.css.
In the file ch04.html, add the basic structure of an HTML document.
Link the CSS file ch04.css in your HTML document.
What is the difference between absolute and relative measurements?
Name some absolute measurement units.
Name some relative measurement units.
Cascading Style Sheets (CSS) are used to define and customize the styles and layouts for your web pages.
Can be included inline within an HTML element.
Can be included from an external file using <script href= “”>.
Can be included in an HTML file itself between <script> … </script> tags.
A type selector creates a general style for the declared element.
A class selector is used to apply styles to a specific HTML element and is referenced using a dot.
The ID selector targets a single element and can only be used once per page and is referenced using a hash.
The universal selector matches every single element on the page and is referenced using an asterisk.
Specify colors using a keyword, a hex value, or an RGB value.
Use inch, millimeter, px, or pt for specifying absolute measurements.
Use em or a percentage for specifying relative measurements.
Flexbox is a layout module designed for laying out groups of items in one dimension (using a row or column, but not both at the same time).
A CSS grid is a two-dimensional layout feature and is a perfect candidate for whole page layouts (using rows and columns).
Hover effects
Buttons
Rounded corners
Shadows
Gradients
These effects should be used sparingly as they can become irritating and distracting if used in abundance.
However, effects can be useful to add emphasis to a section or object.

A set of 3 screenshots of about dot h t m l- Notepad, about dot c s s- Notepad, and a web browser. The h t m l and c s s codes are in about dot h t m l and c s s notepad. The webpage of about as has text and a photograph of food. The text about us enlarges with a magnifying class.
Text Shadow Property
In the web browser on the right in Figure 5-1, you can see the shadow around the heading.

A set of 3 screenshots of about dot h t m l- Notepad, about dot c s s- Notepad, and a web browser. The h t m l and c s s codes are in about dot h t m l and c s s notepad. The webpage of about as has text and a photograph of food. The photograph is in a round rectangular box with a border radius of 10 pixels.
Rounded Corners
You can see the rounded corners of the photo in the browser window in Figure 5-2.

A screenshot displays the screens of book dot h t m l- Notepad, index dot c s s- Notepad, and a web browser. The h t m l and c s s codes are on the Notepad screens. The welcome to Anna's Kitchen webpage has an input text area for first name, last name, email address, and your message. Submit button is at the bottom right.
The Cursor Changes

A set of 2 illustrations of 0 and 90 degrees. The 0 degrees has a downward arrow that moves from top to bottom. The 90 degrees has a left arrow that moves from right to left.
Gradients

A set of 3 screenshots of about dot h t m l- Notepad, about dot c s s- Notepad, and a web browser. The h t m l and c s s codes are in about dot h t m l and c s s notepad. The webpage of the Annas kitchen has the new year menu of carvery and veggie options.
Gradients in Use
We’ve also enclosed the text between the <div> tags, so we know where the gradient will start and where it will end.
What is CSS?
What is a selector? What are the different types and what do they do?
Create a new HTML file and name it ch05.html.
Create a new CSS file and name it ch05.css.
In the file ch05.html, add the basic structure of an HTML document.
Link the CSS file ch04.css in your HTML document.
You can add various effects to HTML elements.
Use text-shadow to add a shadow effect to text.
Use border-radius to round corners of images and buttons.
Use button:hover to create a rollover effect.
Use linear-gradient() to create a gradient from one color to another.
Using the HTML5 specification, it is a lot easier to embed multimedia into your website. You can easily embed video, music, animations, and sound.
Multimedia files have various file extensions.
Audio files can be .wav, .mp3, .aac, or .wma.
Video files can be .mp4, .mpg, .wmv, .webm, or .avi.
Photos and illustrations are usually .jpg, .png, or .webp.
Use the source attribute to specify the video file and format. You can list multiple formats here, but H264 “MP4” and WEBM seem to be the most popular.
Use the width attribute to set the width of the video window or use the height attribute to set the height. Note, if you want to maintain the aspect ratio of the video, you only need to specify one of the two attributes: width or height. This prevents the video getting stretched or squashed. You can also specify a percentage, for example, 100%, to span the video across the whole page regardless of the browser window size – this is sometimes useful if you are developing for different screen sizes.
If you want controls such as play, stop, and skip to appear along the bottom of your video window, add the attribute “controls”; if not, leave the attribute out.
If you want the video to automatically start when the page loads, add the attribute “autoplay.” Browsers tend to block this feature, and most videos won’t start to play unless the user clicks the play button.

2 screenshots of the index dot h t m l- Notepad and a webpage. The 16-line code is on the Notepad screen and highlights the video tag. The Annas Kitchen website has a title, heading, sub heading, video, and list of popular meals.
Embedding a Video
If you upload video files to your web server, you’ll need to have plenty of space to store the files as well as enough bandwidth to transfer the video to whomever visits your website.
Another method is to upload your video file to a video hosting service such as YouTube or Vimeo. That way, your video is streamed to the user’s device rather than downloaded first.

A screenshot of the video screen. The screen lists the video title, privacy, and modified options. Title, course intro. Privacy, hidden. Modified with copy link. The copy link button lists copy video link and copy embed code.
Vimeo Upload

A screenshot of the video about the introduction to H T M L. The options of dislike, share, download, clip, and save are at the bottom of the video. The share option points with a downward arrow.
The YouTube Share Button

A screenshot of the share pop-up dialog box. The share screen has the options of embed, WhatsApp, Facebook, Twitter, email, and Kakao Talk. The share option points with a left arrow.
Embed

A screenshot of the embed video is on the left of the screen, and the code for the embed video is on the right. The video of a woman with 2 computer program screens at the background. The copy option is at the bottom right corner.
Copy the Code

Two screenshots of the index dot h t m l Notepad and a web browser. The 23-line h t m l code is on the Notepad screen. The Annas Kitchen website has a title, heading, subheading, video, paragraphs, and the most popular meals list. The video is on the website.
The Video in the Website
You can adjust the size using the width and height attributes. You can also add or remove the frame and allow autoplay and fullscreen modes.
If you are adding background music or any sound to your website, make sure it is appropriate and complements the website. There is nothing worse than going to a website and have annoying music or sound blaring at you.
The loop attribute loops the music to play over again.
The controls attribute shows play, stop, track, and volume controls.
The autoplay attribute starts playing music automatically – do not use! It makes websites unbearable and annoying.
Add the code to the HTML page in the position you want the audio player to appear.
To demonstrate how to create an image map, we’re going to add a navigation bar image to our website.
Add the usemap attribute and add the image map name.
Inside the <map>…</map> tags, you need to define hotspots around parts of the image you want the user to click.
You need to create these hotspots using a coordinate system (coords = “x,y,x,y”). This corresponds to x&y coordinates of the top left and the x&y coordinates of the bottom right of the hotspot within the image dimensions.
Click “Download GIMP directly.”
Load the image into GIMP. The image needs to be the same size as it is in the HTML document, so you’ll need to resize if necessary. In this example, we set the width of the image to 220px in our HTML code.

A screenshot of the sidebar. The sidebar has three images of foods. The sidebar is 220 pixels wide and 598 pixels long.
Resizing the Image
We need to divide the image into three sections. The first image is the first hotspot on the image map, the second image is the second hotspot, and the third image is the third hotspot.

A screenshot of the food image in a grid. The options to select pixels and click-drag to create a new selection are at the bottom of the screen. The coordinates of an image 331, 359 is at the screen's bottom left corner.
Coordinates in GIMP

An illustration of a food image in a square box. The top left corner reads 0, 0, and the right bottom corner reads 220,202.
Coordinates of the First Image

An illustration of a food image in a square box. The top left corner reads 0, 202, and the right bottom corner reads 220,395.
Image Coordinates

Two screenshots of index dot h t m l- Notepad and a web browser. The 23-line h t m l code on the Notepad screen and highlights a map tag. The Annas Kitchen website has a title, heading, paragraphs, image, and sidebar image. A left arrow points to the first image in a sidebar.
The Final Result
Create a new HTML file.
Where do you store video and audio files to be included on a web page?
Add a video from YouTube or one of your own videos to the web page.
Underneath, add an MP3 audio recording.
Use the <video> tag to include a video on your web page.
If you’re including a video from YouTube, copy and paste the embed code from the YouTube video.
Use the <audio> tag to include an audio recording such as music or other audio.

A screenshot of a form. It has four text boxes labeled first name, last name, email address, and your message. The button to submit is at the bottom of the screen.
A Form
An HTML form contains fields for name, password, telephone number, and email address, as well as larger fields to capture messages. You can also add radio buttons, select boxes, and a submit button.
Forms provide a way to acquire information from the user.
Use the action attribute to point to a PHP or CGI script to process the inputted data.
Inside the <form> tags, you need to add some input elements.
text
tel
url
password
Radio button
Checkbox
Range slider
submit
reset
File
The type attribute indicates the type of input such as text field, radio button, checkbox, etc.
The name attribute specifies the name of an <input> element and can be referenced in a JavaScript or to identify the inputted data after a form is submitted for processing.
You can also add an id attribute that assigns an identifier that allows a JavaScript or CSS ID selector to easily access the <input> element.

An illustration of the text area. The text field labeled, your message on the form. It indicates 30 columns and 5 rows on the text field.
A Message

A screenshot of two radio buttons labeled male and female. The female radio button is selected.
A Radio Button

A checkbox labeled, I will have a starter. It has a tick mark on the checkbox.
A Checkbox

A screenshot of a drop-down list box. The drop-down list box lists the United States, United Kingdom, and Europe, and select the United Kingdom option.
A Drop-Down List

A screenshot of a text box labeled, Name. The label highlights with an upward arrow.
A Label

A screenshot of the submit button. A round rectangular box reads submit.
A Submit Button
Let’s go back to our website project and create a table booking form. Here, we’ve added some code to create our form.
Do the rest for the other fields.
The IDs are used later in the Python or PHP script that processes the form data.

A screenshot of book dot h t m l- Notepad and a web browser. The code displays on the Notepad screen. The welcome to Anna's Kitchen website is on the browser. The options to enter first name, last name, email address, your message, and submit are on the website.
A Form in the Website
Notice that the form looks a little rough. We can use our CSS selectors to style the form and make it look a little better.
To do this, we can add our CSS styles to our index.css file we were using in the previous chapters.
First, we need to style the input boxes. In this form, we have three different types of input box.
I’ve also added a thin border around each input field and colored it gray with a rounded edge (or border radius) on the corners.
I’ve added 5px at the top of each box (margin-top) and 10px below each box (margin-bottom) to separate them vertically on the form.
To match the style of the website, I’ve changed the background color of the button to orange with white text.
I’ve also added 15px of padding around the inside of the button, removed the border, and added the 4px to border-radius to make the edges of the button rounded.
The property cursor: pointer changes your mouse pointer to a hand pointer when you hover your mouse over the button.
Here, I’ve created a container with a gray background and a padding of 20px around the form to move it away from the rest of the page.

A screenshot of the index dot c s s- Notepad, book dot h t m l- Notepad, and a web browser. The codes are on the Notepad screens. The welcome to Anna's Kitchen website is on the browser. The options to enter first name, last name, email address, and your message are on the website.
A Formatted Form
Next, we need to add the functionality to the form (i.e., what happens when you click submit).
The form is usually processed on the server with a PHP or Python script and will take the details entered and send them to an email address. In this example, we are going to use a PHP script to process the form data.

A screenshot of two screens with the option to download Abyss Web Server X 1 and P H P for Windows. The links to download Abyss Web Server X 1 and P H P for Windows are on the screen.
Installing PHP

A screenshot of the welcome page of the preconfigured P H P package 8.1.7 setup. The options next and cancel are at the bottom. The next button highlights with a dark line.
Installing PHP

A screenshot of the preconfigured P H P package 8.1.7 setup. The screen displays a browse option to choose the destination folder. The options back, install, and cancel is at the bottom. The install button highlights with a dark line.
Choosing Where to Install

A screenshot of the Abyss web server console. The screen displays the options for server configuration, console configuration, and about Abyss Web Server. Below the options, a host table has a hostname, status, and 3 buttons stop, configure, and add. A left arrow points to configure option.
Configuring the Console

A screenshot of the hosts-edit- default host on port 80. The options are general, index files, directory listing, aliases, users and groups, scripting parameters, logging, compression, reverse proxy, and statistics. The scripting parameters option highlights with a square box. The OK option is at the bottom.
Scripting Parameters

A screenshot of interpreters table. It displays options to edit C G I, I S A P I, and fast C G I parameters. The option to enable script execution selects at the top. The options to add interpreters and script paths are on the screen.
Interpreters Table

A screenshot of the fields to enter the interface, interpreter, arguments, advanced parameters, and type. The browse button is near the interpreter field, and the drop-down option is near the interface field. The checkbox to check for file existence before execution marks a tick.
Setting Up

A screenshot of the associated extensions. The associated extension option table has an extension as p h p with the options to edit, delete, and add. The ok button is in the right-bottom corner.
Associated Extensions Table
Now we need to add the php extension to the index files.

A screenshot of the hosts-edit- default host on port 80. The options are general, index files, directory listing, aliases, users and groups, X S S I parameters, custom error pages, scripting parameters, A S P dot net parameters, access control, and I Paddress control. The ok button is at the bottom right.
Select Index Files

A screenshot of the index files table. It has the file names with the options to edit and delete. The file names on the screen are index dot h t m l, index dot h t m, default dot a s p x, and index dot p y. The option to add is at the bottom right corner.
Index Files Section

A screenshot of the index file add screen. The options of the abyss web server console, hosts, edit, index files, and add are at the top. The text field is to enter the file name, and the file reads index dot p h p. The ok and cancel buttons are in the bottom right corner.
Entering index.php

A screenshot of the hosts-edit- default host on port 80 screens. The message box reads the configuration has changed, Press restart to apply the modifications. The word restart highlight with a rectangular box. Below the message box is the list of options.
Click Restart

A screenshot of the web browser screen. The screen displays the Welcome to Anna's Kitchen website. It has the option to enter first name, last name, email address, and your message and a submit button at the bottom. The submit button leads to the message page that reads thank you for your booking screen. The book notepad has a code for the message page.
The Script Executed After Submit Is Clicked
There are two methods to send the form’s data to the server: get and post.
In this demonstration, we have a PHP script that executes when the user clicks the “submit” button and sends the data entered into the form fields back to the server. First, we’ll execute the script using the “get” method, then we’ll execute the same script using the “post” method, so you can see the differences in the header inspector shown on the bottom right of the screenshots.

A screenshot of the web browser screen displays contact us with text fields to enter name, telephone, and email. The options for message, submit, headers, preview, response, and timing are on the right. The U R L is at the top, name, telephone, email, and message highlight with a dark shade.
Query String
You can see the data appended to the URL of the script in the preceding illustration and the query string attributes in the header inspector.
This method should never be used to submit sensitive information like passwords as it is clearly visible on the page URL.

A screenshot of the web browser screen. It displays contact us with fields to enter the name, telephone number, and email address. The options for message, submit, headers, preview, response, and timing are on the right. The U R L at the top and the submit button point to the request header 13 and forms data which highlights with a dark shade rectangle.
Use of the Post Method
You can see the data appended to the header of the script in the preceding illustration.
Create an HTML form to accept some information from a user such as name, email, etc.
Add some styling to make the form look a bit better.
What are the submission methods used to pass the data entered into the form to the server? Which should you use?
What is a query string?
How is the form data processed?
Use <form action=“ ”>…</form> to create a form and specify the script to process the data.
The “get” submission method appends the inputted data to the requesting URL.
The “post” method sends the data with the HTTP headers of the processing script rather than through the URL.
Originally named LiveScript, JavaScript was developed by Brendan Eich at Netscape in the mid-1990s. It was later renamed JavaScript in 1995.
JavaScript is an interpreted, object-based, client-side scripting language that allows you to create dynamic content on a web page. You can animate images, validate data, and create interactive elements. In other words, JavaScript adds behavior to web pages, and it is supported by most modern web browsers such as Chrome, Firefox, Edge, and Safari.
You can embed the code between <script> tags within your HTML document. You can add this to the <head> or <body> section of your HTML document. In the example in Figure 8-1, we’ve added the JavaScript code between the <script> tags in the header.

A screenshot of an h t m l code. There is a javascript with the opening and closing tags of the script highlighted in the code. it underlines a command from the code of the button to multiply.
Adding JavaScript
You can save the JavaScript code in a separate file and link it to your HTML. This is useful for larger projects where you have multiple HTML documents using the same JavaScript functions.
In this example, the JavaScript code is saved in the file script.js. We include the JavaScript file using the src attribute in the opening <script> tag. We can add this line in the header of the HTML file (Figure 8-2).

A screenshot of notepad exhibits a file named javascript 0 dot h t m l. It highlights a script named script dot j s from the code. An arrow from another notepad titled script dot j s points to the highlighted script. The java script contains the function for multiplication.
Adding JavaScript
A JavaScript program called a script is a list of statements that contain constructs and commands that perform actions. Let’s take a look at some of the basic building blocks of a JavaScript program.
A block is a sequence of statements that are often executed together and is commonly used in control flow constructs such as an if statement or in while and for loops. A block is grouped by a pair of curly brackets { }:

A set of lines represents the example of the if function as follows. if open parenthesis some condition close parenthesis left curly brace, Statement 1 semicolon, Statement 2 semicolon, Statement 4 semicolon, Close brace. statements 1, 2, and 3 are grouped as the code block.

A table with 5 columns and 12 rows. The table contains keywords with specific uses while using JavaScript. The entries in row 1 are abstract, delete, function, null, and throw.
JavaScript Keywords

A screenshot of a notepad titled javascript dot h t m l and a web browser screen. it highlights an I d from the p element along with a script from the h t m l file in the notepad. The title on the browser reads, welcome to javascript. The text below reads, this is a test.
Adding JavaScript Code to the HTML
Here, we can see the getElementById() method assigns the text we specified to the object <p> in the document. This is how we can use JavaScript to manipulate an HTML document.
The getElementById method displays text output to the browser window. “So what,” you say, “HTML already does that.” Yes, it does, but using JavaScript you can do things you can’t do with simple HTML. For example, you can display text or options based on variables or certain conditions. You can also use JavaScript to add interactivity and content validation to an otherwise static website.
In this exercise, we’re going to create a small HTML form with a JavaScript function that adds two numbers and displays the result.

A screenshot of a form titled Welcome to JavaScript. It contains the text boxes to input the first and second numbers. There is a button labeled add at the bottom.
HTML Form with JavaScript Function
After we’ve created the HTML page, we need to add the JavaScript. In this case, I’m going to add the JavaScript to the actual HTML page. We do this using the <script> tags.

A screenshot represents a code on the left and its compilation on the right. The compilation part represents a form to enter the first and second numbers. The arrows indicate the function to add between the script tag of the code.
Retrieving the Numbers

A screenshot represents a code. The following line is highlighted. Document dot get element by I d, left parenthesis, double quotes, res, right parenthesis. The line indicates the span tag with an arrow.
Value Assigned to HTML

A screenshot of an h t m l file opened in a notepad, titled javascript 2 dot h t m l. On the right, it exhibits the execution of the h t m l code. It highlights the elements in the script used for entering the first and second numbers, the button to add, and the result at the bottom.
Values Assigned to HTML
The value in result is then assigned to the HTML value of the span element on the HTML page. This is what displays the result (in this example, “4”).
Try it out.
Embed the JavaScript code between <script>…</script> tags.
Include an external script file using the src attribute in the opening <script> tag.
A semicolon marks the end of a statement.
querySelector
querySelectorAll
getElementById
A content management system (or CMS) is a software application that enables you to create, edit, and store digital content. In other words, a CMS is a piece of software that runs on a web server and allows you to easily create, edit, and manage content published on a website.
The website data is stored in a database. The CMS platform takes care of all the technical aspects around building and managing a website. The end user can use a WYSIWYG text editor that looks like a word processor to create, publish, and edit content, without the need for coding experience. However, basic HTML and CSS knowledge is an advantage.
Most CMS platforms come with a selection of predesigned templates called themes that you can use to quickly customize the appearance of your site. You can also download countless other themes or even develop your own.
Nowadays, this is the most common way to build a website rather than using static HTML pages.
wordpress.org
drupal.org
joomla.org
umbraco.com
Rather than creating static HTML pages, the website content is stored in a database (usually MySQL). The pages that you see when you visit the website are generated dynamically and formatted according to the theme used.
Using a CMS such as WordPress, websites can be created very quickly with the least amount of technical or programming expertise. Developers can develop plugins and themes for the website, and editors and publishers can log in and edit the content using a front end that looks similar to a word processor without the need to deal with code.

A screenshot of a WordPress dashboard of the Ellumitech Academy website. It highlights the pages option from the left panel. The screen exhibits the spaces to add a title and paragraphs for the new page. The publish button is in the bottom right corner.
WordPress Back End

A screenshot represents the all-courses webpage of the Ellumitech Academy. It comprises the course for illustrated coding series, computer hardware, and Microsoft word fundamentals. There is a list of categories in the right sidebar.
WordPress Front End
Click “Download WordPress.” This will download a zip file to your downloads directory.
You’ll need to install PHP and configure it as we did in the “Configure the Web Server to Execute Scripts” section in Chapter 7.

A screenshot of the My S Q L Installer 8.0.30 page. It has the option to select an operating system. It highlights the option to download the Windows x 86, 32-bit, M S I installer.
MySQL Install Page

A screenshot of the My S Q L Installer page. It highlights the option for choosing a setup type on the left panel. The option named server only is selected on the main screen. There are buttons to go next and cancel at the bottom.
Setup Type Menu

A screenshot of the My S Q L Installer page. It highlights the options for type and networking on the left panel. On the right, it represents the details of server configuration type and connectivity. There are buttons to go next and cancel at the bottom right corner.
Type and Networking Options Menu

A screenshot of the My S Q L Installer page. It highlights the options of accounts and roles on the left panel. The right part of the screen highlights the inputs for the My S Q L root password and repeat password. Below is a table with the columns my s q l user name, host, and user role and indicates the button to add a user.
Entering a Root Password

A screenshot of the My S Q L Installer page. It highlights the option for windows service on the left panel. The right part of the screen exhibits the details of the windows service name along with the options for my s q l configuration and running windows service as a standard system account.
Windows Service Menu

A screenshot of the My S Q L Installer page. It highlights the option for applying configuration on the left panel. The right part of the screen provides the details of the configuration steps. some of them include writing configuration files, updating the windows firewall rules, and adjusting windows service.
Apply Configuration Menu
Allow the software to install.

A screenshot exhibits the Windows start menu screen on the computer. It enlists a set of applications including My S Q L 8.0 command line client.
MySQL Command Line Client in the Start Menu

A screenshot represents the screen of the My S Q L 8.0 command line client. The field to enter a password is indicated on the screen.
Enter the Root Password

A screenshot represents the screen of the My S Q L 8.0 command line client with a set of commands. It highlights the line at the bottom that reads, create user if not exists d b u at local host identified by 12 hash.
Command Line Client
This will create a user called dbu with a password of 12#. This is a simple example to demonstrate, but you should use a strong password instead.

A screenshot represents the screen of the My S Q L 8.0 command line client with a set of commands. t highlights the line at the bottom that reads, my s q l, create database if not exists my d b, semicolon.
Creating a Database
Finally, we need to give permission to the user dbu we created earlier. Type the following line:
grant all privileges on mydb.* to ‘dbu@hostname ’;
Here, we’re adding all privileges that WordPress needs to our user dbu to be able to access and use the mydb.
Next, we need to install WordPress.

A screenshot of the file explorer window. It indicates a file named WordPress 6.0.2 dot zip in the downloads folder. A context menu indicates the option to extract all.
Extract the WordPress Zip

A screenshot of a dialog box to extract compressed zipped folders. The screen exhibits the path of the destination inside c drive. It highlights the extract button at the bottom.
Select a Destination in the Web Server

A screenshot of the web page of WordPress-setup configuration. The screen highlights the option to select the language as English, United States.
Selecting a Language

A screenshot displays the Welcome screen dialog box on the WordPress screen. The let's go button is displayed at the bottom of the screen.
WordPress Setup
Click “Let’s go!” (Figure 9-16).

A screenshot of a form for the database connection details. The fields to enter are database name, username, password, database host, and table prefix. The option to submit is at the bottom, and it is selected.
Filling Out the Fields
Click “Submit.”

A screenshot represents the information detail screen. The fields to enter are the site title, username, password, email, and search engine visibility. It highlights the button at the bottom labeled install WordPress.
Setting Up the Administrator Information

A screenshot exhibits the success message after the installation of WordPress. The screen displays the username and password. The option to log in is at the bottom, and it is selected.
Log In

A screenshot of the login page of WordPress. The screen indicates the fields to enter the username and password. The button to log in is at the bottom and is selected.
Enter Your Username and Password

A screenshot of the WordPress dashboard of Anna's Kitchen. It highlights the pages option on the left panel. The right part of the screen provides a table with a list of the available pages along with the option to add a new page.
Wp-Admin Dashboard

A screenshot of the WordPress dashboard of Anna's Kitchen. It highlights the appearance option from the left panel. The screen represents 3 available themes along with an option to customize a selected theme.
Appearance Options
Try adding some pages using the pages tab.
A web framework is a software platform for developing web applications and websites. These frameworks offer a wide range of prewritten components, code snippets, and application templates that can be used to develop web services and other web resources.
There are two types of frameworks – client side (front end) and server side (back end).
Front-end frameworks such as React and Angular are used to design the user interface of a website or application – the bit you can see when you visit the site. The front-end frameworks are mostly based on JavaScript, HTML, and CSS.
Back-end frameworks such as Flask and ASP.NET are used to design the hidden part of the app or website that is responsible for database management, security, URL routing, and page generation. These frameworks are based on Python, .NET, Ruby, Java, and PHP.
Another framework that is both a front end and a back end is Django, which is a prominent Python framework that is used by developers and businesses.
Framework | Website |
|---|---|
Django | |
Flask | flask.palletsprojects.com |
ASP.NET | dotnet.microsoft.com |
Angular | angular.io |
React | reactjs.org |
A content management system (or CMS) is a software application that enables you to create, edit, and store digital content.
WordPress is by far the most popular content management system and powers roughly 43% of the websites on the Internet; however, there are others such as Drupal, Joomla, and Umbraco.
Using a CMS such as WordPress, websites can be created very quickly with the least amount of technical or programming expertise. Developers can develop plugins and themes.
You can download it from wordpress.org/download/.
You can download MySQL from mysql.com/downloads/windows/installer/.
A web framework is a software platform for developing web applications and websites.
Front-end frameworks such as React and Angular are used to design the user interface of a website or application.
Back-end frameworks such as Flask and ASP.NET are used to design the hidden part of the app or website that is responsible for database management, security, URL routing, and page generation.