HTML Css Web Small
HTML Css Web Small
STC&S
SCHOOL OF SIGNAL
Disclaimer:
This book is a compilation of notes on various web technologies from diverse resources.
Table of Contents
Chapter-2: HTML
201. Introduction
202. History of HTML
203. Structure of HTML Web Page
204. Understanding HTML Syntax
205. Heading
206. Paragraph
207. Div
208. Span
209. Images
210. Tables
211. Lists
212. Html Links
213. Html Inputs
214. Html Forms
215. Line Breaks
216. Horizontal Rules
217. Semantic Tags
218. Holy Grail Web Layout
Chapter-3: CSS
301. Introduction
302. Why is CSS Required?
303. Understanding CSS Syntax
304. Methods to Add CSS to HTML
305. Styling Rules for Various Elements
306. Positioning Div Elements to Make a Layout
307. Designing a Holy Grail Web Layout with CSS
308. Responsive Web Design
309. Responsive Web Design Framework (Bootstrap)
310. Designing a Holy Grail Web Layout with Bootstrap
CHAPTER-1
UNDERSTANDING HOW WWW WORKS
101. Introduction.
a. World Wide Web (WWW), which is also commonly known as
W3 or web is an interconnected system of public webpages
accessible through the internet. These websites contain
text pages, digital images, audio, videos, etc. Users can
access the content of these sites from any part of the world
over the internet using their devices such as computers,
laptops, cell phones, etc. The WWW, along with the internet,
enable the retrieval and display of text and media to your
device.
b. Webpages are the building blocks of the web (WWW) and
are mainly formatted with HTML. Normally the webpages are
linked to each other by links named as hyperlinks. Anyone
can access these webpages using specific client software
called as web browsers and a specific application layer
protocol called as HTTP (hypertext transfer protocol).
c. All web pages are given an online address called a
Uniform Resource Location (URL). A website is actually a
collection of web pages that belong to a specific URL group
or the same domain. Any URL is composed of the following
parts:
4
Compiled by: Maj Murad Ahmed, SUP, Sigs
c. When the client types in a web address, an HTTP request
is initiated to the server. HTTP requests are mainly of 5
types (GET, POST, PUT, DELETE, PATCH). The server checks
the request and if it is valid (if the webpage requested
exists on the server), sends the requested webpage as a
response.
7
Compiled by: Maj Murad Ahmed, SUP, Sigs
CHAPTER-2
HTML
201. Introduction.
a. HTML stands for Hyper Text Markup Language, which is
the most widely used language on the Web to develop web
pages. It defines the meaning and structure of web content.
b. It is imperative to remember that HTML is not at all a
programming language, rather a markup language. A markup
language is an encoding system to format different elements
on the page for display and printing. It is interpreted by
different internet browsers and controls how a document is
displayed. Markup languages contain two main data types:
the text that will be displayed and then the markup to
describe how to display it.
c. There are more than a hundred other markup languages,
but HTML is the most common one. More than 94% of all web
pages are written in HTML.
d. An HTML document is essentially a text document having
.html or .htm extension.
b. In this example:
i. <!DOCTYPE html> is called doctype declaration
which defines that this is an HTML5 document.
ii. <html> element is the root element of an HTML page.
iii. <head> element contains meta information of the
HTML page.
iv. <title> element specifies a title for the HTML page
v. <body> element defines the document's body, and is
a container for all the visible contents.
vi. <h1> element defines a large heading.
vii. <p> element defines a paragraph.
10
Compiled by: Maj Murad Ahmed, SUP, Sigs
d. Attributes. HTML attributes are special
declarations which define additional properties or
information about the elements or attributes are the
modifiers of the HTML element. Attributes are always
specified in the start tag (or opening tag) and usually
consist of name/value pairs like name=”value”.
Attribute values should always be enclosed in quotation
marks (double or single). There are a few attributes
in HTML5 that do not consist of name/value pairs but
consist of just names.
12
Compiled by: Maj Murad Ahmed, SUP, Sigs
lines between sentences, the browser reduces them to a
single line.
14
Compiled by: Maj Murad Ahmed, SUP, Sigs
Fig-207: HTML Unordered List.
b. Ordered List. The <ol> tag is used to create a list
of related items, in a specific order. In this case,
the relative order of the list items is important. The
list items in an ordered list are marked with numbers.
Some of the most commonly used input types are given below:
Input Type Description
text Defines a single line text input field
textarea Defines a multiline text input field
password Defines a password input field
submit Define button to submit the form to server
reset Defines a button to reset all values in form
radio Defines a radio button which allows select one
option
checkbox Defines checkboxes which allow select multiple
options form
button Defines a simple button, which can be
programmed to perform a task on click
file Upload a file from device storage
image Defines a graphical submit button
Table: HTML input types.
It is always a good practice to provide a description for
any input field with the <label> tag.
16
Compiled by: Maj Murad Ahmed, SUP, Sigs
Fig-210: HTML Description List.
17
Compiled by: Maj Murad Ahmed, SUP, Sigs
Fig-211: HTML Form Example.
18
Compiled by: Maj Murad Ahmed, SUP, Sigs
Fig-208: Holy Grail layout of web design.
CHAPTER-3
CSS
301. Introduction.
a. CSS stands for Cascading Style Sheet, which is a simple
design language intended to simplify the process of making
web pages presentable. It is generally used with HTML to
change the style of web pages and user interfaces.
b. CSS is created and maintained through a group of people
within the W3C called the CSS Working Group. The current
existing version of CSS is CSS3 which was introduced along
with HTML5.
302. Why is CSS Required?
a. CSS handles the look and feel part of a web page. Using
CSS, we can control the colour of the text, the style of
fonts, the spacing between paragraphs, how columns are
sized and laid out, what background images or colours are
used, layout designs, and variations in display for
different devices and screen sizes as well as a variety of
other effects.
b. CSS is extensively used because of the following
characteristics:
19
Compiled by: Maj Murad Ahmed, SUP, Sigs
i. CSS is easier to learn and use.
ii. Webpages load much faster with CSS.
iii. CSS saves a lot of time for defining or changing
the styles of all or a few elements in a webpage.
iv. CSS makes it easier to maintain a website.
v. CSS supports almost all device types.
vi. CSS adds a nice look to HTML pages which are
usually rendered completely plain.
22
Compiled by: Maj Murad Ahmed, SUP, Sigs
ways to represent colours for many other properties. Colors
in CSS most often specified in the following formats:
• color keyword - like "red", "green", "blue",
"transparent", etc.
• a HEX value - like "#ff0000", "#00ff00", etc.
• an RGB value - like "rgb(255, 0, 0)".
font-style
24
Compiled by: Maj Murad Ahmed, SUP, Sigs
font-weight
font-size
CHAPTER-4
WEB DEVELOPMENT WITH WORDPRESS
401. Introduction.
26
Compiled by: Maj Murad Ahmed, SUP, Sigs