SlideShare a Scribd company logo
1 of 23
HTML – Markup Introduction Colin Gourlay & Kevin Vanderbeken
HTML = (the content layer)
Last week we said... separate your content, presentation & behaviour  It eases our development, with multiple people, and allows all our technologies to work nicely together.
Today: Basic HTML Concepts: Document overview - Meet HTML! HTML Syntax - tags, html, xhtml attributes Block & Inline - <DIV>'s and <SPAN>'s Special characters.
What is HTML... Hypertext Markup Language The building block of elements in a web document. A language designed to allow us to put many kinds of things on the web. Has a few variations through different standards: HTML and XHTML – We’re doing XHTML, it’s stricter. Not a programming language! Markup languages describe  parts (in a document). It’s the bits of a document in a language a browser can understand.
The document... Browser goes to http://finda.com.au Gets back an XHTML formatted (“marked-up”) document. ‘Document’ is a term that describes the page and all it’s associated bits and pieces.
Meet XHTML... <html> <head> <title> This is my title. </title> </head> 	<body> <h1>Hello World!</h1> <p>I am a very basic page.  		       Use your back button to  		       get out of here.</p> </body> </html>
What are all these brackets?! Part of the HTML Syntax: The bracketed tags are elements.
The HTML Element Required to be lowercase in XHTML. XHTML defines dozens of text elements that make up documents: Headings Paragraphs Emphasised text Links Etc. Used according to it’s semantic markup: type of tag used provides information to the relevancy or type of content that it’s holding. Eg. Headings <h1>
The HTML Element (cont..) Elements don't always have content! Empty tags are closed by adding a trailing slash preceded by a space before the closing bracket: 	<img />, <br />, and <hr /> There are HTML elements that add information about the document (such as its <title>). Some add media such as images, videos, Flash movies, or applets to the page.
Document Requirements The base structure of the document is required, and some fields like <title> are a required element of an XHTML page. In XHTML, all elements, including empty elements, must be terminated (closed). They all need their </blah> if in a pair... or <blah /> if they are an empty element.
Structure of an XHTML document We saw it before – essentially the document is a hierarchy. ,[object Object]
In head: define properties of the document and linkages to css and js.
In body: All the content we want the page to display.,[object Object],[object Object]
Block and Inline elements: It’s all about boxes around things! Block level elements: Treated as boxes stacked up in the page top to bottom. <div>, <p>, etc. Inline elements: do not start a new line, but stay in the flow of content. <span>, <em>, <a>, etc.
Block and Inline elements: It’s all about boxes around things! Block level elements: Treated as boxes stacked up in the page top to bottom. <div>, <p>, etc. Inline elements: do not start a new line, but stay in the flow of content. <span>, <em>, <a>, etc. Whether an element is block or inline restricts what other elements it may contain and where it will end up being positioned.
Special Characters: Some text characters need to be written using a html character substitute because they would not be understood by html or they might be misinterpreted as markup. © , & and < are examples of this! You can represent it by its numeric or named character reference for the web. Two options: by an assigned numeric value (numeric entity) or using a predefined abbreviated name for the character (called a named entity).  All character references begin with a “&” and end with an “;”.
how’s our speed?
email us... kevin.vanderbeken@apn.com.au colin.gourlay@apn.com.au
next week...
CSS INTRO

More Related Content

What's hot

Web topic 2 html
Web topic 2  htmlWeb topic 2  html
Web topic 2 htmlCK Yang
 
Meta Tag Presentation
Meta Tag PresentationMeta Tag Presentation
Meta Tag Presentationlaurlaur123
 
Introduction to Web Development - HTML
Introduction to Web Development - HTMLIntroduction to Web Development - HTML
Introduction to Web Development - HTMLSadhanaParameswaran
 
An Introduction to HTML
An Introduction to HTMLAn Introduction to HTML
An Introduction to HTMLcrea8ivemoiz
 
sanjivsangamHtml online ppt
sanjivsangamHtml online pptsanjivsangamHtml online ppt
sanjivsangamHtml online pptSanjiv Sangam
 
Lesson 1: Introduction to HTML
Lesson 1: Introduction to HTMLLesson 1: Introduction to HTML
Lesson 1: Introduction to HTMLOlivia Moran
 
Html training part1
Html training part1Html training part1
Html training part1than sare
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTMLAnn Alcid
 
Semantically Correct And Standards Compliance Html
Semantically Correct And Standards Compliance HtmlSemantically Correct And Standards Compliance Html
Semantically Correct And Standards Compliance Htmlsanjay2211
 
Week1 xml
Week1 xmlWeek1 xml
Week1 xmlhapy
 

What's hot (20)

Html vs xhtml
Html vs xhtmlHtml vs xhtml
Html vs xhtml
 
Xml and JavaScript
Xml and JavaScriptXml and JavaScript
Xml and JavaScript
 
Web topic 2 html
Web topic 2  htmlWeb topic 2  html
Web topic 2 html
 
M02 un04 p01
M02 un04 p01M02 un04 p01
M02 un04 p01
 
Basic html
Basic htmlBasic html
Basic html
 
Html basic tags
Html basic tagsHtml basic tags
Html basic tags
 
Ict html
Ict htmlIct html
Ict html
 
Html and dhtml
Html and dhtmlHtml and dhtml
Html and dhtml
 
Web technology
Web technologyWeb technology
Web technology
 
Meta Tag Presentation
Meta Tag PresentationMeta Tag Presentation
Meta Tag Presentation
 
Dom in javascript
Dom in javascriptDom in javascript
Dom in javascript
 
BasicHTML
BasicHTMLBasicHTML
BasicHTML
 
Introduction to Web Development - HTML
Introduction to Web Development - HTMLIntroduction to Web Development - HTML
Introduction to Web Development - HTML
 
An Introduction to HTML
An Introduction to HTMLAn Introduction to HTML
An Introduction to HTML
 
sanjivsangamHtml online ppt
sanjivsangamHtml online pptsanjivsangamHtml online ppt
sanjivsangamHtml online ppt
 
Lesson 1: Introduction to HTML
Lesson 1: Introduction to HTMLLesson 1: Introduction to HTML
Lesson 1: Introduction to HTML
 
Html training part1
Html training part1Html training part1
Html training part1
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
 
Semantically Correct And Standards Compliance Html
Semantically Correct And Standards Compliance HtmlSemantically Correct And Standards Compliance Html
Semantically Correct And Standards Compliance Html
 
Week1 xml
Week1 xmlWeek1 xml
Week1 xml
 

Viewers also liked

Viewers also liked (15)

Xhtml
XhtmlXhtml
Xhtml
 
HTML5 - Introduction
HTML5 - IntroductionHTML5 - Introduction
HTML5 - Introduction
 
Introduction to XML, XHTML and CSS
Introduction to XML, XHTML and CSSIntroduction to XML, XHTML and CSS
Introduction to XML, XHTML and CSS
 
Xhtml
XhtmlXhtml
Xhtml
 
XHTML
XHTMLXHTML
XHTML
 
HTML: An Introduction
HTML: An IntroductionHTML: An Introduction
HTML: An Introduction
 
HTML5: a quick overview
HTML5: a quick overviewHTML5: a quick overview
HTML5: a quick overview
 
Xhtml
XhtmlXhtml
Xhtml
 
Introduction to XHTML
Introduction to XHTMLIntroduction to XHTML
Introduction to XHTML
 
An Introduction To HTML5
An Introduction To HTML5An Introduction To HTML5
An Introduction To HTML5
 
Html 5 in a big nutshell
Html 5 in a big nutshellHtml 5 in a big nutshell
Html 5 in a big nutshell
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
Up to Speed on HTML 5 and CSS 3
Up to Speed on HTML 5 and CSS 3Up to Speed on HTML 5 and CSS 3
Up to Speed on HTML 5 and CSS 3
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
 
Html Ppt
Html PptHtml Ppt
Html Ppt
 

Similar to 1-02: HTML Markup Introduction

Similar to 1-02: HTML Markup Introduction (20)

Web publishing and XHTML
Web publishing and XHTMLWeb publishing and XHTML
Web publishing and XHTML
 
Michael(tm) Smith ED09 presentation
Michael(tm) Smith ED09 presentationMichael(tm) Smith ED09 presentation
Michael(tm) Smith ED09 presentation
 
Introduction to HTML- Week 3- HTMLSyntax
Introduction to HTML- Week 3- HTMLSyntaxIntroduction to HTML- Week 3- HTMLSyntax
Introduction to HTML- Week 3- HTMLSyntax
 
Web1O1 - Intro to HTML/CSS
Web1O1 - Intro to HTML/CSSWeb1O1 - Intro to HTML/CSS
Web1O1 - Intro to HTML/CSS
 
Intr To Html & Xhtml
Intr To Html & XhtmlIntr To Html & Xhtml
Intr To Html & Xhtml
 
Basic HTML
Basic HTMLBasic HTML
Basic HTML
 
HTML_Slideshow1
HTML_Slideshow1HTML_Slideshow1
HTML_Slideshow1
 
Html
HtmlHtml
Html
 
Vskills certified html5 developer Notes
Vskills certified html5 developer NotesVskills certified html5 developer Notes
Vskills certified html5 developer Notes
 
HTML Introduction
HTML IntroductionHTML Introduction
HTML Introduction
 
Mdst 3559-02-01-html
Mdst 3559-02-01-htmlMdst 3559-02-01-html
Mdst 3559-02-01-html
 
Module 2 Lesson 1
Module 2 Lesson 1Module 2 Lesson 1
Module 2 Lesson 1
 
Lecture1
Lecture1Lecture1
Lecture1
 
Html
HtmlHtml
Html
 
Html - Tutorial
Html - TutorialHtml - Tutorial
Html - Tutorial
 
HTML
HTMLHTML
HTML
 
Summary of-xhtml-basics
Summary of-xhtml-basicsSummary of-xhtml-basics
Summary of-xhtml-basics
 
Web Designing
Web DesigningWeb Designing
Web Designing
 
Intro to html
Intro to htmlIntro to html
Intro to html
 
Intro to html
Intro to htmlIntro to html
Intro to html
 

More from apnwebdev

1 07-the box-model
1 07-the box-model1 07-the box-model
1 07-the box-modelapnwebdev
 
1 07-2-css floats-and_positioning
1 07-2-css floats-and_positioning1 07-2-css floats-and_positioning
1 07-2-css floats-and_positioningapnwebdev
 
1 06-more html-elements
1 06-more html-elements1 06-more html-elements
1 06-more html-elementsapnwebdev
 
1 05-css for-text_and_backgrounds
1 05-css for-text_and_backgrounds1 05-css for-text_and_backgrounds
1 05-css for-text_and_backgroundsapnwebdev
 
1 04-html elements
1 04-html elements1 04-html elements
1 04-html elementsapnwebdev
 
1-07: The Box Model
1-07: The Box Model1-07: The Box Model
1-07: The Box Modelapnwebdev
 
1-06: More HTML Elements
1-06: More HTML Elements1-06: More HTML Elements
1-06: More HTML Elementsapnwebdev
 
1-05: CSS for Text and Backgrounds
1-05: CSS for Text and Backgrounds1-05: CSS for Text and Backgrounds
1-05: CSS for Text and Backgroundsapnwebdev
 
1-04: HTML Elements
1-04: HTML Elements1-04: HTML Elements
1-04: HTML Elementsapnwebdev
 
1 03 - CSS Introduction
1 03 - CSS Introduction1 03 - CSS Introduction
1 03 - CSS Introductionapnwebdev
 
1-01: Introduction To Web Development
1-01: Introduction To  Web  Development1-01: Introduction To  Web  Development
1-01: Introduction To Web Developmentapnwebdev
 

More from apnwebdev (11)

1 07-the box-model
1 07-the box-model1 07-the box-model
1 07-the box-model
 
1 07-2-css floats-and_positioning
1 07-2-css floats-and_positioning1 07-2-css floats-and_positioning
1 07-2-css floats-and_positioning
 
1 06-more html-elements
1 06-more html-elements1 06-more html-elements
1 06-more html-elements
 
1 05-css for-text_and_backgrounds
1 05-css for-text_and_backgrounds1 05-css for-text_and_backgrounds
1 05-css for-text_and_backgrounds
 
1 04-html elements
1 04-html elements1 04-html elements
1 04-html elements
 
1-07: The Box Model
1-07: The Box Model1-07: The Box Model
1-07: The Box Model
 
1-06: More HTML Elements
1-06: More HTML Elements1-06: More HTML Elements
1-06: More HTML Elements
 
1-05: CSS for Text and Backgrounds
1-05: CSS for Text and Backgrounds1-05: CSS for Text and Backgrounds
1-05: CSS for Text and Backgrounds
 
1-04: HTML Elements
1-04: HTML Elements1-04: HTML Elements
1-04: HTML Elements
 
1 03 - CSS Introduction
1 03 - CSS Introduction1 03 - CSS Introduction
1 03 - CSS Introduction
 
1-01: Introduction To Web Development
1-01: Introduction To  Web  Development1-01: Introduction To  Web  Development
1-01: Introduction To Web Development
 

1-02: HTML Markup Introduction

  • 1. HTML – Markup Introduction Colin Gourlay & Kevin Vanderbeken
  • 2. HTML = (the content layer)
  • 3. Last week we said... separate your content, presentation & behaviour It eases our development, with multiple people, and allows all our technologies to work nicely together.
  • 4. Today: Basic HTML Concepts: Document overview - Meet HTML! HTML Syntax - tags, html, xhtml attributes Block & Inline - <DIV>'s and <SPAN>'s Special characters.
  • 5. What is HTML... Hypertext Markup Language The building block of elements in a web document. A language designed to allow us to put many kinds of things on the web. Has a few variations through different standards: HTML and XHTML – We’re doing XHTML, it’s stricter. Not a programming language! Markup languages describe parts (in a document). It’s the bits of a document in a language a browser can understand.
  • 6. The document... Browser goes to http://finda.com.au Gets back an XHTML formatted (“marked-up”) document. ‘Document’ is a term that describes the page and all it’s associated bits and pieces.
  • 7. Meet XHTML... <html> <head> <title> This is my title. </title> </head> <body> <h1>Hello World!</h1> <p>I am a very basic page. Use your back button to get out of here.</p> </body> </html>
  • 8. What are all these brackets?! Part of the HTML Syntax: The bracketed tags are elements.
  • 9. The HTML Element Required to be lowercase in XHTML. XHTML defines dozens of text elements that make up documents: Headings Paragraphs Emphasised text Links Etc. Used according to it’s semantic markup: type of tag used provides information to the relevancy or type of content that it’s holding. Eg. Headings <h1>
  • 10. The HTML Element (cont..) Elements don't always have content! Empty tags are closed by adding a trailing slash preceded by a space before the closing bracket: <img />, <br />, and <hr /> There are HTML elements that add information about the document (such as its <title>). Some add media such as images, videos, Flash movies, or applets to the page.
  • 11. Document Requirements The base structure of the document is required, and some fields like <title> are a required element of an XHTML page. In XHTML, all elements, including empty elements, must be terminated (closed). They all need their </blah> if in a pair... or <blah /> if they are an empty element.
  • 12.
  • 13. In head: define properties of the document and linkages to css and js.
  • 14.
  • 15. Block and Inline elements: It’s all about boxes around things! Block level elements: Treated as boxes stacked up in the page top to bottom. <div>, <p>, etc. Inline elements: do not start a new line, but stay in the flow of content. <span>, <em>, <a>, etc.
  • 16. Block and Inline elements: It’s all about boxes around things! Block level elements: Treated as boxes stacked up in the page top to bottom. <div>, <p>, etc. Inline elements: do not start a new line, but stay in the flow of content. <span>, <em>, <a>, etc. Whether an element is block or inline restricts what other elements it may contain and where it will end up being positioned.
  • 17.
  • 18. Special Characters: Some text characters need to be written using a html character substitute because they would not be understood by html or they might be misinterpreted as markup. © , & and < are examples of this! You can represent it by its numeric or named character reference for the web. Two options: by an assigned numeric value (numeric entity) or using a predefined abbreviated name for the character (called a named entity). All character references begin with a “&” and end with an “;”.
  • 19.
  • 21. email us... kevin.vanderbeken@apn.com.au colin.gourlay@apn.com.au

Editor's Notes

  1. This lesson we’ll expand on the content layer – HTML – which is all the structure and content of the web.
  2. Last lesson we covered the basics of the layers of web development, and how important it is to separate everything for ease of development. It allows all our technologies to work neatly together.
  3. Introduction:Welcome to HTML!Here we&apos;re going to start introducing HTML as a language and understanding how it forms the building blocks of the elements on a web page. These elements on a page, can convey anything from information, to lists and even input. As a language, HTML has been designed to provide us the ability to include many different types of things for presentation on the web. Over the course of time, more and more elements and their practical use will be demonstrated as well as the theory of how they all link together to form a seamless web experience that we enjoy on a daily basis. What is HTML?HTML (HyperText Markup Language) is literally the language used to create web page documents. The updated version, XHTML (eXtensible HTML) is essentially the same language with stricter rules in how it&apos;s written and understood by browsers.What we will actually be concentrating on is XHTML for our course but we&apos;ll refer to the differences between these derivative languages as we go, and when we recap the course at points. PS: If someone mentions &quot;(X)HTML&quot; they collectively mean both HTML or XHTML. Firstly, and possibly the most important thing to remember about (X)HTML itself is that it&apos;s not a programming language. (X)HTML is a markup language which means it defines a way of identifying and describing parts of a document. Markup is essentially the bits and pieces of a document which you see (or don&apos;t see!) through a browser - such as headings, paragraphs, buttons, structural divisions, etc. Markup language doesn&apos;t define any programming logic, it defines what&apos;s on the page. In order to get a basic understanding of the language, going to write some pages and code snippets by hand in this course, as it&apos;s the best way to learn.
  4. Document overview:When you punch in a URL into your web browser or click on a hypertext link such as http://finda.com.au, your browser asks our servers to send back what web content it finds at that address. What the browser gets back is an (X)HTML formatted document. Document is the term that describes the full page and all it&apos;s associated bits and pieces. Everything that makes up the page you see when rendered is &quot;marked-up&quot; in that document.
  5. Meet (X)HTML!Here is some example source code for a very basic (X)HTML document.You can see that the above example contains the text that will be displayed to the viewer of the page, but it also contains special tags (indicated with angle brackets, &lt; and &gt;) that describe each text element on the page.Adding descriptive tags to a text document in this way is known as “marking up” the document.
  6. The HTML Element:The bracketed tags contained in the document as shown are known as elements, and these tags all follow this convention.
  7. Element names are usually lowercase, as XHTML requires it. And as we use and teach XHTML primarily over HTML, we will be using these stricter rules. The (X)HTML syntax was created especially for documents with hypertext links. HTML defines dozens of text elements that make up documents such as headings, paragraphs, emphasized text, and of course, links. These elements are used according to &quot;semantic markup&quot; - the type of tag used, provides information to that bit of content&apos;s relevancy or use. Examples of these can be seen in the &lt;h1&gt;&lt;/h1&gt; tags which specifies the most important heading on the page and the &lt;p&gt;&lt;/p&gt; tags which define a paragraph.
  8. Elements don&apos;t always have content, and some never have content - they are referred to as empty elements! They are written differently if they are empty. Empty tags are closed by adding a trailing slash preceded by a space before the closing bracket, like so:&lt;img /&gt;, &lt;br /&gt;, and &lt;hr /&gt; There are also HTML elements that add information about the document (such as its &lt;title&gt;) and that add media such as images, videos, Flash movies, or applets to the page.
  9. Structure of the document is required, and some fields like &lt;title&gt; are a required element of an XHTML page. In XHTML, all elements, including empty elements, must be closed (or terminated, to use the proper term). They all need their &lt;/blah&gt; if in a pair... or &lt;blah /&gt; if they are an empty element.
  10. The structure of an (X)HTML document is a heirarchy, and in it&apos;s most basic sense everything is contained inside the &lt;html&gt;&lt;/html&gt; tags. The &lt;HTML&gt; tag is known as the root element, because it contains everything else, as well as defines that everything inside will be the further markup of the document. After that, we move one level down, and see the  &lt;head&gt;&lt;/head&gt; and &lt;body&gt;&lt;/body&gt; tags - Humans have a head and a body, and so do (X)HTML documents.The head area is where we define various properties of the document such as it&apos;s title (which is required), and also set up linkages to any CSS files and javascript files the document may use. The body is where we specify all the main content, and inside of it, are all our base elements such as headings and paragraphs.These tags don&apos;t specify how anything in the document looks, but they are required to be there in order to play by the XHTML rules and be &quot;vaild&quot; as a document.
  11. Attributes:We now know about elements, but in order to make some elements useful, we need to apply attributes to them so they can perform their role. For example, An &lt;img /&gt; (image) tag is not very useful by itself... there’s no way to know which image to use! That’s where attributes come in. &quot;Attributes are instructions that clarify or modify an element.&quot; For the img element, the src (short for “source”) attribute is required, and provides the location of the image file via its URL. The syntax for attributes is as follows:&lt;element attribute-name=&quot;value&quot;&gt;Content&lt;/element&gt; or for empty elements (less commonly):&lt;elementattribute-name=&quot;value&quot;/&gt; 
  12. For our image element example we can check the graphic. There are a variety of different tags for different elements, some are common, and others are only used on certain tags. We&apos;ll examine certain tags individually later.
  13. Block and Inline elementsYou may have noticed in the past that heading and paragraph elements start on new lines and do not run together as other text can. That is because they are examples of block-level elements. Browsers treat block-level elements as though they are in rectangular boxes, stacked up in the page top to bottom. Each block-level element begins on a new line, and some space is also usually added above and below the entire element by default. If you open an example in firefox, and use the firebug plugin, you can clearly see the outlines as you select them. By contrast, if you check content that is marked up with a &lt;span&gt; element or as emphasized with an &lt;em&gt;, you will see that it does not start a new line, but rather stays in the flow of the paragraph. That is because the em element is an inline element. Inline elements do not start new lines; Boxes are drawn around them in firebug to show that they just go with the flow of text.  The difference between block-level and inline elements is important. In (X)HTML markup, whether an element is block-level or inline restricts what other elements it may contain and where it will end up being positioned. For example, you can’t logically put a block-level element within an inline element (such as a paragraph within a link). Blocklevel and inline elements also behave differently when it comes to applying Cascading Style Sheet (css) properties.
  14. Special CharactersThere&apos;s a bunch of common characters, like the copyright symbol ©, that aren&apos;t part of the normal set of ASCII characters which are used on the web. The normal set has only letters, numbers, and a few basic symbols. You may see a problem with that however, since if you put one in an (X)HTML document, the browser will think it&apos;s the beginning of a tag. If we have special character we need to substitute it. You can represent it by its numeric or named character reference for the web. When the browser sees the character reference, it substitutes the proper character in that spot when the page is displayed. There&apos;s a few ways to do this: by an assigned numeric value (numeric entity) or using a predefined abbreviated name for the character (called a named entity). All character references begin with a “&amp;” and end with an “;”. Say we wanted to add the copyright symbol ( © ) to the page... in XHTML we must use the named entity &amp; copy ; (or its numeric equivalent &amp; # 169 ; ) where we want the symbol to appear. NOTE: There is to be no spaces between the &amp; and the closing semicolon - i just can&apos;t write them here in the wiki because it treats them as the characters otherwise! That&apos;s how well it works!An example of the html for inserting a copyright symbol: &lt;p&gt;All content copyright &amp; copy ; 2007, Jennifer Robbins&lt;/p&gt;or:&lt;p&gt;All content copyright &amp; # 169 ; 2007, Jennifer Robbins&lt;/p&gt;  A common mistake is the &amp; symbol, which should be &amp; amp ; .This is just a restriction of adding propper content for the web. 
  15. There&apos;s hundreds of equivellant characters, and they can all be found on various standards websites like http://www.webstandards.org/learn/reference/charts/entities/http://www.webmonkey.com/2010/02/special_characters/