Top Banner
Web design and programming HTML Basics Lecture 1 Dr. Sundos Alazawi لثالثةمرحلة ا ال/ مسائي2021-2022
19

HTML Basics and CSS style

Apr 24, 2023

Download

Documents

Khang Minh
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: HTML Basics and CSS style

Web design and programming

HTML Basics

Lecture 1

Dr. Sundos Alazawi

مسائي/ المرحلة الثالثة

2021-2022

Page 2: HTML Basics and CSS style

2

Hypertext Markup Language

Markup language:

Embedded codes in documents

Codes are called `tags’

Codes

Describe the structure documents

Include instructions for processing

Computer language for describing syntax of tags

HTML:make for publishing hypertext on the World Wide Web

Allow to embed other scripting languages to manipulate

design layout, text and graphics

Platform independent

Page 3: HTML Basics and CSS style

Web Page Development Cycle

EDIT and SAVE the file in your AFS

p:\web\index.html

TEST by BROWSING to the page

http://www.msu.edu/~msunetid/index.html

Page 4: HTML Basics and CSS style

Step 1: Open Notepad

Windows 8 or later:

Open the Start Screen (the window symbol at the

bottom left on your screen). Type Notepad.

Windows 7 or earlier:

Open Start > Programs > Accessories > Notepad

Step 1: Open TextEdit (Mac)

Open Finder > Applications > TextEdit

In Preferences > Format > choose"Plain Text"

Write HTML Using Notepad

Page 5: HTML Basics and CSS style

5

Write HTML Using Notepad

Step 2: Write Some HTML

Write HTML into Notepad.

Page 6: HTML Basics and CSS style

HTML File

Step 3: Save the HTML Page

Page 7: HTML Basics and CSS style

HTML File

Step 4: View the HTML Page in Your Browser

Open the saved HTML file in your favorite browser

Page 8: HTML Basics and CSS style

An HTML element starts and ends with tags—the opening tag and the closing tag.

1. Tag consists of an opening angled bracket (<), some text, and a closing bracket (>).

2. Inside a tag, there is a tag name; there may also be one or more attributes

Tags <html><body> <head>….etc

Tags

Page 9: HTML Basics and CSS style

Attribute

Each attribute is made up of a name and a

value, name="value“

Page 10: HTML Basics and CSS style

10

HTML Basics

3 Parts to HTML document

DOCTYPE

What DTD are you using

Head

Meta information

Only <title> is required

Body

Text to render

Page 11: HTML Basics and CSS style

HTML File Structure

<HTML>

<HEAD>

</HEAD>

<BODY>

</BODY>

</HTML>

Page 12: HTML Basics and CSS style

HTML ElementsThere are two major sections inside the html element: the head and the

body.

HTML Elements

Head ElementBody Element

Title ElementMeta Element

CSS markupJava Script

Paragraphs ImagesLink

Table, frame, form, etc….

Page 13: HTML Basics and CSS style

Head elementHead element contains information about the page, but no

information that will be displayed on the page itself.

The opening<head> and closing tags </head>

Title element tells the browser what to display in its title bar

(the title bar is the very top part of the browser window)

The opening<title> and closing tags </title>

Meta element can be used in a web page for different

reasons. Some are used to provide additional information

that’s not displayed on screen to the browser or search

engines

for example: <meta charset="utf-8"/>

Page 14: HTML Basics and CSS style

Structural Tags

<HTML>

These tags enclose the entire Web page document.

</HTML>

<HEAD>

These tags enclose the Head part of the document

</HEAD>

<TITLE>

These tags enclose the title of the document. This text

appears in the title bar in the browser and on the bookmark

list if someone bookmarks your web page.

</TITLE>

Page 15: HTML Basics and CSS style

Example1

<head>

<title>Computer Sciences </title>

<meta charset="utf-8"/>

</head>

Page 16: HTML Basics and CSS style

Header Tags

Header Tags -- Used for marking sections and

subsections in a document.

<H1>Header 1 -- Giant-sized and bold </H1>

<H2>Header 2 -- Large and bold </H2>

<H3>Header 3 -- Normal-sized and bold </H3>

<H4>Header 4 -- Small and bold </H4>

<H5>Header 5 -- Very Small and bold </H5>

<H6>Header 6 -- Tiny and bold </H6>

Page 17: HTML Basics and CSS style

H1 = Giant-sized and bold

H2 = Large and bold

H3 = Normal-sized and bold

H4 = Small and bold

H5 = Very Small and bold

H6 = Tiny and bold

Page 18: HTML Basics and CSS style

Body element

Body element contains almost everything

that you see on the screen: headings,

paragraphs, images, any navigation that’s

required, and footers that sit at the bottom of

the web page

Page 19: HTML Basics and CSS style

Example2<HTML>

<HEAD>

<TITLE> My First home page

</TITLE>

</HEAD>

<BODY>

My name is your name.

My major is your major.

</BODY>

</HTML>