Upload
eugene-day
View
214
Download
0
Embed Size (px)
Citation preview
Introduction to HTML
Year 8
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
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>
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>
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.
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>
What does this look like?
<title>
<h1>
<p>
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>
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>
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