10
Introduction to HTML Year 8

Introduction to HTML Year 8. What is HTML O Hyper Text Mark-up Language O The language that all the elements of a web page are written in. O It describes

Embed Size (px)

Citation preview

Page 1: Introduction to HTML Year 8. What is HTML O Hyper Text Mark-up Language O The language that all the elements of a web page are written in. O It describes

Introduction to HTML

Year 8

Page 2: Introduction to HTML Year 8. What is HTML O Hyper Text Mark-up Language O The language that all the elements of a web page are written in. O It describes

What is HTMLO Hyper Text Mark-up Language

O The language that all the elements of a web page are written in.

O It describes the document content in a way that is understandable by a web browser

Page 3: Introduction to HTML Year 8. What is HTML O Hyper Text Mark-up Language O The language that all the elements of a web page are written in. O It describes

HTML <!DOCTYPE>O The <!DOCTYPE> declaration helps

the browser to display a web page correctly.

O It tells the browser what type of document.

O Should be the first thing in a HTML document

O HTML5 is the most recent version of HTML and its declaration is:

<!DOCTYPE html>

Page 4: Introduction to HTML Year 8. What is HTML O Hyper Text Mark-up Language O The language that all the elements of a web page are written in. O It describes

HTML “tags”O HTML tags are key words that are used

to identify content.O They are surrounded by angle brackets

e.g. <html>O They usually come in pairs (a start and

an end tag)<tagname>Content</tagname>

Page 5: Introduction to HTML Year 8. What is HTML O Hyper Text Mark-up Language O The language that all the elements of a web page are written in. O It describes

HTML ElementsO A HTML element is everything between the

start tag and the end tag including the tags themselves:

<tagname>Content</tagname>

O An element content is everything between the start tag and the end tag:

<tagname>Content</tagname>

O Its important to always remember to have an end tag for each element.

Page 6: Introduction to HTML Year 8. What is HTML O Hyper Text Mark-up Language O The language that all the elements of a web page are written in. O It describes

Simple HTML structure example

<!DOCTYPE html><html>

<head><title>Example</title>

</head>

<body><h1>Web page example</h1><p>This is an example web page</p>

</body></html>

Page 7: Introduction to HTML Year 8. What is HTML O Hyper Text Mark-up Language O The language that all the elements of a web page are written in. O It describes

What does this look like?

<title>

<h1>

<p>

Page 8: Introduction to HTML Year 8. What is HTML O Hyper Text Mark-up Language O The language that all the elements of a web page are written in. O It describes

HTML headingsO Headings are defined using the <h1> to

<h6> tags.O They are ranked in order of importance.O <h1> should be used as a main heading

and then <h2> as a sub heading and so on.

<!DOCTYPE html><html> <body>

<h1>This is heading 1</h1> <h2>This is heading 2</h2> <h3>This is heading 3</h3> <h4>This is heading 4</h4> <h5>This is heading 5</h5> <h6>This is heading 6</h6>

</body></html>

Page 9: Introduction to HTML Year 8. What is HTML O Hyper Text Mark-up Language O The language that all the elements of a web page are written in. O It describes

HTML ParagraphsO Paragraphs are defined with the <p>

tag<!DOCTYPE html><html><body>

<p>This is a paragraph.</p><p>This is a paragraph.</p><p>This is a paragraph.</p>

</body></html>

Page 10: Introduction to HTML Year 8. What is HTML O Hyper Text Mark-up Language O The language that all the elements of a web page are written in. O It describes

Useful resourcesO http://www.w3schools.com/html/

html_intro.aspO THE WEB!! There are many tutorials

online.

HTML ValidatorO http://validator.w3.org/#

validate_by_input