Professional Documents
Culture Documents
Grade 8 Week 1,2,3
Grade 8 Week 1,2,3
American Section
IT Department
HTML Introduction
What is HTML?
HTML stands for Hyper Text Markup Language
HTML is the standard markup language for creating Web pages
HTML describes the structure of a Web page
HTML consists of a series of elements
HTML elements tell the browser how to display the content
HTML elements label pieces of content such as "this is a heading", "this is
a paragraph", "this is a link", etc.
</body>
</html>
Example Explained
Almanar language School
American Section
IT Department
The <!DOCTYPE html> declaration defines that this document is an HTML5
document
The <html> element is the root element of an HTML page
The <head> element contains meta information about the HTML page
The <title> element specifies a title for the HTML page (which is shown in
the browser's title bar or in the page's tab)
The <body> element defines the document's body, and is a container for all
the visible contents, such as headings, paragraphs, images, hyperlinks,
tables, lists, etc.
The <h1> element defines a large heading
The <p> element defines a paragraph
*********************************************************
Web Browsers
The purpose of a web browser (Chrome, Edge, Firefox, Safari) is to read
HTML documents and display them correctly.
A browser does not display the HTML tags, but uses them to determine how
to display the document:
Almanar language School
American Section
IT Department
1. Website logo
The logo section of the website will commonly be the space for identifying the website brand.
While personal blogs and other non-brand-driven websites may only include the name of the
website here, this spot is the first point of call for establishing a brand on the website. This
image or text is often linked to the website main page, often known as “home”.
2. Header
The header is the top portion of the website, often containing the website logo as well as the
main menu. The header is often a permanent fixture of the website, where the main content
might scroll beneath it. The header contains information that is important to website
navigation.
3. Menu
Menus, often placed at an easy-to-reach place on the website, provide a way to navigate the
website in an easy way. A main menu is often contained in the header, or on a collapsible pane
(especially in mobile views of websites), and allows navigation through the pages of the website.
4. Body
The body area of a website is the area of the website that contains the most content. There are
a number of different kinds of content. Specific pages will contain specific content. The home
page depicted contains examples of these types of content in ways that would be displayed on
Almanar language School
American Section
IT Department
a home page.
5. Highlighted content
Highlighted content, often exclusively on the home page, guides visitors to parts of your
website that will convert into website goals. Website goals are the actions, interactions, etc. on
your website that fulfil the very purpose of your website. Booking a flight on a travel agent’s
website, or buying goods on an online store are examples of this.
7. Sidebar
While many modern websites with flat design elements frame the body content within the full
width of the website, sidebars are very common website elements that haven’t disappeared
entirely. Sidebars, like menus, often help with navigation. When large amount of information,
like multiple blog posts, or products need to be ordered, a sidebar can help. Sidebars are often
used in displaying related bits of information, contain CTAs, or guide visitors to the next step
after they’ve read a post or added a product to their cart (for example).
9. Internal Links
Internal links are useful for creating an ideal flow through your website. In the example, the link
takes users to the blog page, where they can peruse the full list of blog posts and find
something that interests them and effectively completing a website goal. Sidebar content and
highlighted content CTAs are another way of achieving the same thing, with an even more
effective attention grabbing effect.
10. Forms
Forms are ideal ways of gathering information from your visitors. Contact forms are very
common, and work to get the name and a means of contacting visitors at the very least. Sign-up
forms, application forms, shipping information forms, and the like are other examples of how
forms are used on websites. Forms are an easy and intuitive way for your visitors, from
whatever level of technological background, to get the correct information to you.
11. Buttons
As CTAs, prompts to complete an interaction like a form, or simply as a link to another part of
Almanar language School
American Section
IT Department
your website (menus use this often) buttons are handy interactive parts of your website that
prompt engagement. Unique styling to these parts of the website can be helpful in brand
building, highlighting the CTA related, and guiding the visitor’s eye to a particular piece of
information.
12. Footer
The footer is the round-up of the website. Typically the footer will contain important links on
the website, or, sometimes, links to all of the pages of the website. A copyright and date stamp
is common, to protect the information on your website and let visitors know when your website
was last updated. Any other pertinent information – perhaps a mini contact form, a CTA, a
scrolling photo gallery, or any other permanent information you would like to display at the end
of every page – is contained in the footer.
A social media presence is almost essential to creating and maintaining a brand online and is a
huge help with engaging with your online audience.
Almanar language School
American Section
IT Department
What is CSS?
CSS stands for Cascading Style Sheets
CSS describes how HTML elements are to be displayed on screen, paper,
or in other media
CSS saves a lot of work. It can control the layout of multiple web pages
all at once
External stylesheets are stored in CSS files
CSS Example
body {
background-color: lightblue;
}
Almanar language School
American Section
IT Department
h1 {
color: white;
text-align: center;
}
p {
font-family: verdana;
font-size: 20px;
}
CSS Syntax
❮ PreviousNext ❯
CSS Syntax
Multiple CSS declarations are separated with semicolons, and declaration blocks
are surrounded by curly braces.
Example
In this example all <p> elements will be center-aligned, with a red text color:
p {
color: red;
text-align: center;
}
Example Explained
p is a selector in CSS (it points to the HTML element you want to style: <p>).
CSS Selectors
CSS selectors are used to "find" (or select) the HTML elements you want to
style.
When a browser reads a style sheet, it will format the HTML document
according to the information in the style sheet.
Almanar language School
American Section
IT Department
External CSS
Internal CSS
Inline CSS
External CSS
With an external style sheet, you can change the look of an entire website by
changing just one file!
Each HTML page must include a reference to the external style sheet file inside
the <link> element, inside the head section.
Example
External styles are defined within the <link> element, inside the <head>
section of an HTML page:
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="mystyle.css">
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
Try it Yourself »
An external style sheet can be written in any text editor, and must be saved
with a .css extension.
The external .css file should not contain any HTML tags.
"mystyle.css"
body {
background-color: lightblue;
}
h1 {
color: navy;
margin-left: 20px;
}
Note: Do not add a space between the property value (20) and the unit (px):
Incorrect (space): margin-left: 20 px;
Correct (no space): margin-left: 20px;
Internal CSS
An internal style sheet may be used if one single HTML page has a unique style.
The internal style is defined inside the <style> element, inside the head section.
Example
Internal styles are defined within the <style> element, inside the <head>
section of an HTML page:
<!DOCTYPE html>
<html>
<head>
<style>
body {
background-color: linen;
}
h1 {
color: maroon;
margin-left: 40px;
}
</style>
</head>
<body>
Almanar language School
American Section
IT Department
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
Try it Yourself »
Inline CSS
An inline style may be used to apply a unique style for a single element.
To use inline styles, add the style attribute to the relevant element. The style
attribute can contain any CSS property.
Example
Inline styles are defined within the "style" attribute of the relevant element:
<!DOCTYPE html>
<html>
<body>
</body>
</html>
Try it Yourself »
Tip: An inline style loses many of the advantages of a style sheet (by mixing
content with presentation). Use this method sparingly.
h1 {
color: navy;
}
Then, assume that an internal style sheet also has the following style for the
<h1> element:
h1 {
color: orange;
}
Example
If the internal style is defined after the link to the external style sheet, the
<h1> elements will be "orange":
<head>
<link rel="stylesheet" type="text/css" href="mystyle.css">
<style>
h1 {
color: orange;
}
</style>
</head>
Try it Yourself »
Example
However, if the internal style is defined before the link to the external style
sheet, the <h1> elements will be "navy":
<head>
<style>
h1 {
color: orange;
}
</style>
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>
Try it Yourself »