SlideShare a Scribd company logo
HTML



                       HyperText Markup Language

is the main markup language for creating web pages and other information that can be displayed
                                       in a web browser.

                                        abidibo says:
           HTML is not a programming language!
Wait, what the hell is abidibo?

abidibo it's me
●   Physicist
●   Software developer at otto srl (web applications, mobile, databases, ...)
●   Just Open Source
●   Dev questions?
    abidibo@gmail.com
●   Questions about Open Source projects?
    dev@abidibo.net
●   Web: http://abidibo.net
●   Skype: abidibo
●   Twitter: abidibo
HTTP

HyperText Transfer Protocol (HTTP) is the main system used to transmit information over the web
URL (Uniform Resource Locator)
(http://)(www.example.com)(/pages/about.html)
Version (standard) history

●   1989 Tim Berners-Lee invents the Web with HTML as its publishing language
●   1995 HTML 2
●   1997 (january) HTML 3.2
●   1997 (december) HTML 4.0 strict, transitional, frameset, css
●   1999 HTML 4.01
●   2000 XHTML 1.0 XHTML 1.0 is a HTML 4.01 reformulation using XML (doctype, closed tags,
    case-sensitive,...)

●   2001 XHTML 1.1
●   2002-2006 XHTML 2
●   ? HTML5
Elder web sites

●   Nothing more than a collection of html files organized (or not) into folders
●   Url:
    http://www.example.com/index.html
    http://www.example.com/pages/about.html
    Files:
    ROOT DIR → index.html
    ROOT DIR/pages → about.html
●   Almost nothing different from viewing (downloading) a file which resides on a different machine
    which occasionally has links to other files which reside on the same or another machine (plus
    other resources like images, videos, ...).
●   Really a web page is only a file?
    Not only this, is a text file, it contains text, but such text is formatted (html is a markup language)
●   HTML provides a way to jump between different files (HyperText) allowing the user for a contents
    navigation
●   Static web sites, change contents manually by editing the html files
Web 2.0

●   Dynamic web sites, and rich web applications
●   Contents are stored in databases instead of directly into files
●   Contents can be easily managed through back-office interfaces
●   Applications generally implemented using a server side programming language which serves
    the final document (php, python, asp, …)
●   Web sites allow everyone to publish contents on the web, also without html knowledge
    (WYSIWYG editors)
●   “So is it really necessary to learn HTML?”
    YES!
●   “But Joomla, Wordpress, Typo3, Blogspot, Tumblr...”
    Again YES!
●   “But really, my friend has its on website but he doesn't...”
    YESSS!!
Why YES!


●   The final output of a rich web application still is an html document
●   Contents still are the noblest part of a web site.
    Contents are rendered in html
●   BAD JOOMLA BOY SAYS:
    “But we have WYSIWYG!”
    ANSWER:
    “WYSIWYG sure, but what you get often is NOT really what you see”
●   Be cross-browser! (i.e. IE is your enemy)
●   Web applications use templates (HTML) in which they insert dynamic contents
●   The HTML you may write is better than the HTML a software can produce
●   Learning HTML is easy! Learning CSS is easy!
What really does HTML?

●   Text Structure - TAGS
    Separate structure from contents

    Divide contents in blocks, visually separate information

    Nested contents, tree like structure

    What is a tag? <tagname>tag content</tagname> → <structure>content</structure>

●   Semantics!!!!!
    Which is the page title (hopefully not the bold big-sized first line)

    Does a block forms an independent part of a document? Is this list a menu? ...

    Accessibility and Search Engines Optimization

●   Through pages navigation (hyper text)
●   Styles (Graphics)
    Colors, backgrounds, borders, …

●   Some amazing stuff
    If combined with javascript
Text Structure
Text structured in nested elements
<nav>
 <ul>
  <li>Menu voice #1</li>
  <li>Menu voice #2</li>
 </ul>
</nav>

<section id=”main”>
 <h1>Main section</h1>
 <article>
   <h1>title</h1>
   <p>Some text</p>
   <ul>
    <li>Item #1</li>
    <li>Item #2</li>
   </ul>
 </article>
</section>
TAGS 1/2

Generally:
    <tagname attribute=”attribute-value”>tag content</tagname>

Sometimes:
    <tagname attribute=”attribute-value” />

Notice
●   No spaces between < and tagname
●   TagNaMe works the same, but please, be kind, don't do it
●   A tag can contain tags (not every tag can contain every tag, semantics and tag type
    limitations)
●   Attributes specify more information about the content structure
TAGS 2/2

Some examples
 ●   HEAD ELEMENTS
     <title>, <meta>, <link>, <script>, <style>, …
 ●   STRUCTURE OF THE DOCUMENT (semantics!)
     <div>, <p>, <ul>, <ol>, <table>, <h1>, …, <h6>
 ●   TEXT ELEMENTS
     <b>, <i>, <u>, <cite>, <var>, …
 ●   FORM ELEMENTS
     <input>, <select>, <textarea>, <fieldset>, …
 ●   SPECIAL ELEMENTS
     <img>, <video>, <script>, <br />
Try always to use the right tag! <abbr>, <time>, <address>
Reference: https://developer.mozilla.org/en-US/docs/HTML/HTML5/HTML5_element_list
Semantics

1. abidibo.net
  1. Main menu
  2. Archive
  3. Categories
  4. The importance of semantics in html documents
      1. The header and the hgroup tags
      2. The section tag
      3. The article tag
      4. And so on...
      5. Post information
      6. Comments
  5. Projects
  6. Topics
  7. Tweet

  ●    http://www.abidibo.net/blog/2012/01/26/the-importance-of-semantics-in-html-documents/
Styles / Graphics
Tools

Browser                                               Text Editor
   While there are many of them, use a good                 Use you preferred text editor here.
   browser please!                                          Suggestions?
   → NO IE
   → FF                                                     Vim (the editor of the beast)
   → Chrome
   → Safari
   → Opera
                                                      Preview
                                                            http://codepen.io
                                                            http://jsfiddle.net
That's it... but
   There are many other tools/browser plugins which may make you happier, why?
   Time saving,
   don't waste time if you can, play more with your children or drink a beer!

Again, Browser?
   FF → Use Firebug! There's no other web development tool which may be compared to it at the time of this
   writing
Why HTML5?

●   Easier (DOCTYPE, charset declarations)
●   Semantics
●   Multimedia support (no flash plz!)
●   Geolocalization
●   Canvas
●   Forms
●   Storage
●   Mobile
●   Web Sockets
●   ...
Why easier?

    HTML5                          XHTML
●   <!DOCTYPE html>            ●   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML
                                   1.0 Strict//EN" "
●   <html>                         http://www.w3.org/TR/xhtml1-strict.dtd">
●   <meta charset=”utf-8” />   ●   <html xmlns="http://www.w3.org/1999/xhtml"
                                   lang="it" xml:lang="it">
●   <script>
                               ●   <meta http-equiv="content-type"
●   <style>                        content="text/html; charset=utf-8" />
                               ●   <script type=”text/javascript”>
                               ●   <style type=”text/css”>
Semantics

●   <section>
●   <article>
●   <aside>
●   <header>
●   <footer>
●   <hgroup>
●   Not only one <h1> for page!
●   Outline
    → http://www.abidibo.net/blog/2012/01/26/the-importance-of-semantics-in-html-documents/

    → http://gsnedders.html5.org/outliner/
Hello world!

HTML5 rulez!                        What?
1. <!DOCTYPE html>                  1 → Document declaration
2. <html>                           2 → Root element
3.   <head>                         3 → Head of the document (include external
                                    resources, add meta information, favicon, )
4.    <meta charset=”utf-8” />
                                    4 → Character encoding
5.    <title>Hello world!</title>
                                    5 → Title of the page (as appears in the
6.   </head>                        browser tab)
7.   <body>                         7 → The body of the document, what we really
8.    <h1>Hello world!</h1>         see on the browser page

9.   </body>                        8 → Just an heading

10. </html>
CSS

Cascading Style Sheets
●   Define how your html elements will be displayed
●   Css can be INLINE
    <span style=”padding: 10px; color: #aaa; display: block”></span>
●   Css can stay in the head of the document
    <head>
     <style>
      span {
        padding: 10px;
        color: #aaa;
        display: block;
      }
     </style>
    </head>
●   Css can stay in a separate file: stylesheet.css and included in the head section

    <link type=”text/css” rel=”stylesheet” href=”stylesheet.css” />
CSS selectors

A simple selector as defined by the CSS3 specs is composed of “either a
type or universal selector followed by zero or more attribute selectors,
ID selectors, or pseudo-classes, in any order.
●   A type selector is used to select elements based on their tag name, such as div or span. A related selector, called a
    universal selector, is denoted by the asterisk symbol (*), and is used to select elements regardless of their tag.
●   An id selector is used to select an element based on the value of its id attribute. Each id attribute in a given
    document must be unique, so the id attribute can only be used to match a single element.
    #item, #wrapper
●   A class selector is used to select elements based on the value of their class attribute. An element can have several
    CSS classes, and a CSS class can be used for more than one element.
    .notification, .colored
●   An attribute selector is used to select elements based on the value of their attributes.
    [<Attribute Name><Operator>"<Value>"].
    The <Attribute Name> refers to an attribute of the element to select
    The <Operator> can be one of the following:
     = (equal to)
     ~= (includes in space list)
     |= (includes in pipe list)
     ^= (starts with)
     $= (ends with)
     *= (contains)
CSS pseudo-selectors

Special selectors that don’t deal with properties, but rather with states
:empty—matches a node with no child nodes.

:first-child—matches a node if it’s the first child of its parent.

:last-child—matches a node if it’s the last child of its parent.

:only-child—matches a node if it has no sibling nodes.

:contains(<text>)—matches a node that contains the string value passed as the

   argument to <text>

:not(<selector>)—matches a node if it doesn’t match the simple selector passed

    as the argument to <selector>

:first-of-type—matches a node if it’s the first element of its type (i.e., a tag).

:last-of-type—matches a node if it’s the last element of its type.

:only-of-type—matches a node if it’s the only element of its type.
CSS combined selectors

Two or more simple selectors that are connected using a
combinator.
A combinator is a special symbol that denotes the
relationship of one simple selector to another
●   div a
    the whitespace character is the descendant combinator
●   div > a
    the greater than symbol is the child combinator
●   div ~ a
    the tilde symbol is the general sibling combinator (div preceeds a)
●   Div + a
    the plus sign is the adjacent sibling combinator

More Related Content

What's hot

HTML & CSS Workshop Notes
HTML & CSS Workshop NotesHTML & CSS Workshop Notes
HTML & CSS Workshop Notes
Pamela Fox
 
About Best friends - HTML, CSS and JS
About Best friends - HTML, CSS and JSAbout Best friends - HTML, CSS and JS
About Best friends - HTML, CSS and JS
Naga Harish M
 
A Primer on HTML 5 - By Nick Armstrong
A Primer on HTML 5 - By Nick ArmstrongA Primer on HTML 5 - By Nick Armstrong
A Primer on HTML 5 - By Nick Armstrong
Nick Armstrong
 
Introduction to WEB HTML, CSS
Introduction to WEB HTML, CSSIntroduction to WEB HTML, CSS
Introduction to WEB HTML, CSS
University of Technology
 
OpenCms Days 2014 - Introducing the 9.5 OpenCms documentation
OpenCms Days 2014 - Introducing the 9.5 OpenCms documentationOpenCms Days 2014 - Introducing the 9.5 OpenCms documentation
OpenCms Days 2014 - Introducing the 9.5 OpenCms documentation
Alkacon Software GmbH & Co. KG
 
An Introduction To HTML5
An Introduction To HTML5An Introduction To HTML5
An Introduction To HTML5
Robert Nyman
 
Intro to web dev
Intro to web devIntro to web dev
Intro to web dev
kamar MEDDAH
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
Ferdous Mahmud Shaon
 
What is HTML - An Introduction to HTML (Hypertext Markup Language)
What is HTML - An Introduction to HTML (Hypertext Markup Language)What is HTML - An Introduction to HTML (Hypertext Markup Language)
What is HTML - An Introduction to HTML (Hypertext Markup Language)
Ahsan Rahim
 
HTML 5 and CSS 3
HTML 5 and CSS 3HTML 5 and CSS 3
HTML 5 and CSS 3
Kannika Kong
 
CSS
CSSCSS
Introduction to XML, XHTML and CSS
Introduction to XML, XHTML and CSSIntroduction to XML, XHTML and CSS
Introduction to XML, XHTML and CSS
Jussi Pohjolainen
 
Unit 4(it workshop)
Unit 4(it workshop)Unit 4(it workshop)
Unit 4(it workshop)
Dr.Lokesh Gagnani
 
網頁程式設計
網頁程式設計網頁程式設計
網頁程式設計
傳錡 蕭
 
Html5 training
Html5 trainingHtml5 training
Html5 training
James VanDyke
 
Web1O1 - Intro to HTML/CSS
Web1O1 - Intro to HTML/CSSWeb1O1 - Intro to HTML/CSS
Web1O1 - Intro to HTML/CSS
NYCSS Meetup
 
Chapter3
Chapter3Chapter3
Chapter3
DeAnna Gossett
 
Unit 2 (it workshop)
Unit 2 (it workshop)Unit 2 (it workshop)
Unit 2 (it workshop)
Dr.Lokesh Gagnani
 
Internet and Web Technology (CLASS-4) [CSS & JS]
Internet and Web Technology (CLASS-4) [CSS & JS] Internet and Web Technology (CLASS-4) [CSS & JS]
Internet and Web Technology (CLASS-4) [CSS & JS]
Ayes Chinmay
 
Css.html
Css.htmlCss.html

What's hot (20)

HTML & CSS Workshop Notes
HTML & CSS Workshop NotesHTML & CSS Workshop Notes
HTML & CSS Workshop Notes
 
About Best friends - HTML, CSS and JS
About Best friends - HTML, CSS and JSAbout Best friends - HTML, CSS and JS
About Best friends - HTML, CSS and JS
 
A Primer on HTML 5 - By Nick Armstrong
A Primer on HTML 5 - By Nick ArmstrongA Primer on HTML 5 - By Nick Armstrong
A Primer on HTML 5 - By Nick Armstrong
 
Introduction to WEB HTML, CSS
Introduction to WEB HTML, CSSIntroduction to WEB HTML, CSS
Introduction to WEB HTML, CSS
 
OpenCms Days 2014 - Introducing the 9.5 OpenCms documentation
OpenCms Days 2014 - Introducing the 9.5 OpenCms documentationOpenCms Days 2014 - Introducing the 9.5 OpenCms documentation
OpenCms Days 2014 - Introducing the 9.5 OpenCms documentation
 
An Introduction To HTML5
An Introduction To HTML5An Introduction To HTML5
An Introduction To HTML5
 
Intro to web dev
Intro to web devIntro to web dev
Intro to web dev
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
 
What is HTML - An Introduction to HTML (Hypertext Markup Language)
What is HTML - An Introduction to HTML (Hypertext Markup Language)What is HTML - An Introduction to HTML (Hypertext Markup Language)
What is HTML - An Introduction to HTML (Hypertext Markup Language)
 
HTML 5 and CSS 3
HTML 5 and CSS 3HTML 5 and CSS 3
HTML 5 and CSS 3
 
CSS
CSSCSS
CSS
 
Introduction to XML, XHTML and CSS
Introduction to XML, XHTML and CSSIntroduction to XML, XHTML and CSS
Introduction to XML, XHTML and CSS
 
Unit 4(it workshop)
Unit 4(it workshop)Unit 4(it workshop)
Unit 4(it workshop)
 
網頁程式設計
網頁程式設計網頁程式設計
網頁程式設計
 
Html5 training
Html5 trainingHtml5 training
Html5 training
 
Web1O1 - Intro to HTML/CSS
Web1O1 - Intro to HTML/CSSWeb1O1 - Intro to HTML/CSS
Web1O1 - Intro to HTML/CSS
 
Chapter3
Chapter3Chapter3
Chapter3
 
Unit 2 (it workshop)
Unit 2 (it workshop)Unit 2 (it workshop)
Unit 2 (it workshop)
 
Internet and Web Technology (CLASS-4) [CSS & JS]
Internet and Web Technology (CLASS-4) [CSS & JS] Internet and Web Technology (CLASS-4) [CSS & JS]
Internet and Web Technology (CLASS-4) [CSS & JS]
 
Css.html
Css.htmlCss.html
Css.html
 

Viewers also liked

Consigue El Mejor Smartphone En Linea!
Consigue El Mejor Smartphone En Linea!Consigue El Mejor Smartphone En Linea!
Consigue El Mejor Smartphone En Linea!
megatelefonosmoviles32
 
Unit 3 mitosis
Unit 3 mitosisUnit 3 mitosis
Unit 3 mitosis
Scelo91
 
Introduction to Web Design for Literary Theorists I: Introduction to HTML (v....
Introduction to Web Design for Literary Theorists I: Introduction to HTML (v....Introduction to Web Design for Literary Theorists I: Introduction to HTML (v....
Introduction to Web Design for Literary Theorists I: Introduction to HTML (v....
Patrick Mooney
 
Introduction to html
Introduction to htmlIntroduction to html
Introduction to html
tmjordan
 
An introduction to html
An introduction to htmlAn introduction to html
An introduction to html
kashifareed
 
01. session 01 introduction to html
01. session 01   introduction to html01. session 01   introduction to html
01. session 01 introduction to html
Phúc Đỗ
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
Mrs. Sitler - Media Teacher
 

Viewers also liked (7)

Consigue El Mejor Smartphone En Linea!
Consigue El Mejor Smartphone En Linea!Consigue El Mejor Smartphone En Linea!
Consigue El Mejor Smartphone En Linea!
 
Unit 3 mitosis
Unit 3 mitosisUnit 3 mitosis
Unit 3 mitosis
 
Introduction to Web Design for Literary Theorists I: Introduction to HTML (v....
Introduction to Web Design for Literary Theorists I: Introduction to HTML (v....Introduction to Web Design for Literary Theorists I: Introduction to HTML (v....
Introduction to Web Design for Literary Theorists I: Introduction to HTML (v....
 
Introduction to html
Introduction to htmlIntroduction to html
Introduction to html
 
An introduction to html
An introduction to htmlAn introduction to html
An introduction to html
 
01. session 01 introduction to html
01. session 01   introduction to html01. session 01   introduction to html
01. session 01 introduction to html
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
 

Similar to Light introduction to HTML

Drupal7 Theming session on the occassion of Drupal7 release party in Delhi NCR
Drupal7 Theming session on the occassion of  Drupal7 release party in Delhi NCRDrupal7 Theming session on the occassion of  Drupal7 release party in Delhi NCR
Drupal7 Theming session on the occassion of Drupal7 release party in Delhi NCR
Gaurav Mishra
 
Web Information Systems Html and css
Web Information Systems Html and cssWeb Information Systems Html and css
Web Information Systems Html and css
Artificial Intelligence Institute at UofSC
 
Chapter 2 introduction to html5
Chapter 2 introduction to html5Chapter 2 introduction to html5
Chapter 2 introduction to html5
nobel mujuji
 
HTML course.ppt
HTML course.pptHTML course.ppt
HTML course.ppt
RyanTeo35
 
Html5.pptx
Html5.pptxHtml5.pptx
Html5.pptx
dharajagad
 
Is it time to start using HTML 5
Is it time to start using HTML 5Is it time to start using HTML 5
Is it time to start using HTML 5
Ravi Raj
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 1
Girl Develop It Cincinnati: Intro to HTML/CSS Class 1Girl Develop It Cincinnati: Intro to HTML/CSS Class 1
Girl Develop It Cincinnati: Intro to HTML/CSS Class 1
Erin M. Kidwell
 
HTML & CSS.ppt
HTML & CSS.pptHTML & CSS.ppt
HTML & CSS.ppt
vaseemshaik21
 
Frontend for developers
Frontend for developersFrontend for developers
Frontend for developers
Hernan Mammana
 
Web Fundamentals Crash Course
Web Fundamentals Crash CourseWeb Fundamentals Crash Course
Web Fundamentals Crash Course
MrAbbas
 
Web Fundamentals Crash Course
Web Fundamentals Crash CourseWeb Fundamentals Crash Course
Web Fundamentals Crash Course
MrAbas
 
An-Introduction-to-HTML
An-Introduction-to-HTMLAn-Introduction-to-HTML
An-Introduction-to-HTML
HatemMagdyMohamed
 
C3 웹기술로만드는모바일앱
C3 웹기술로만드는모바일앱C3 웹기술로만드는모바일앱
C3 웹기술로만드는모바일앱
NAVER D2
 
Html
HtmlHtml
Html5 basics
Html5 basicsHtml5 basics
Html5 basics
sagaroceanic11
 
HTML 5
HTML 5HTML 5
Lesson 1: Introduction to HTML
Lesson 1: Introduction to HTMLLesson 1: Introduction to HTML
Lesson 1: Introduction to HTML
Olivia Moran
 
Advanced Web Scraping or How To Make Internet Your Database #seoplus2018
Advanced Web Scraping or How To Make Internet Your Database #seoplus2018Advanced Web Scraping or How To Make Internet Your Database #seoplus2018
Advanced Web Scraping or How To Make Internet Your Database #seoplus2018
Esteve Castells
 
Web Concepts - an introduction - introduction
Web Concepts - an introduction - introductionWeb Concepts - an introduction - introduction
Web Concepts - an introduction - introduction
clement swarnappa
 
Html 5 - What's new?
Html 5 - What's new?Html 5 - What's new?
Html 5 - What's new?
Bethmi Gunasekara
 

Similar to Light introduction to HTML (20)

Drupal7 Theming session on the occassion of Drupal7 release party in Delhi NCR
Drupal7 Theming session on the occassion of  Drupal7 release party in Delhi NCRDrupal7 Theming session on the occassion of  Drupal7 release party in Delhi NCR
Drupal7 Theming session on the occassion of Drupal7 release party in Delhi NCR
 
Web Information Systems Html and css
Web Information Systems Html and cssWeb Information Systems Html and css
Web Information Systems Html and css
 
Chapter 2 introduction to html5
Chapter 2 introduction to html5Chapter 2 introduction to html5
Chapter 2 introduction to html5
 
HTML course.ppt
HTML course.pptHTML course.ppt
HTML course.ppt
 
Html5.pptx
Html5.pptxHtml5.pptx
Html5.pptx
 
Is it time to start using HTML 5
Is it time to start using HTML 5Is it time to start using HTML 5
Is it time to start using HTML 5
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 1
Girl Develop It Cincinnati: Intro to HTML/CSS Class 1Girl Develop It Cincinnati: Intro to HTML/CSS Class 1
Girl Develop It Cincinnati: Intro to HTML/CSS Class 1
 
HTML & CSS.ppt
HTML & CSS.pptHTML & CSS.ppt
HTML & CSS.ppt
 
Frontend for developers
Frontend for developersFrontend for developers
Frontend for developers
 
Web Fundamentals Crash Course
Web Fundamentals Crash CourseWeb Fundamentals Crash Course
Web Fundamentals Crash Course
 
Web Fundamentals Crash Course
Web Fundamentals Crash CourseWeb Fundamentals Crash Course
Web Fundamentals Crash Course
 
An-Introduction-to-HTML
An-Introduction-to-HTMLAn-Introduction-to-HTML
An-Introduction-to-HTML
 
C3 웹기술로만드는모바일앱
C3 웹기술로만드는모바일앱C3 웹기술로만드는모바일앱
C3 웹기술로만드는모바일앱
 
Html
HtmlHtml
Html
 
Html5 basics
Html5 basicsHtml5 basics
Html5 basics
 
HTML 5
HTML 5HTML 5
HTML 5
 
Lesson 1: Introduction to HTML
Lesson 1: Introduction to HTMLLesson 1: Introduction to HTML
Lesson 1: Introduction to HTML
 
Advanced Web Scraping or How To Make Internet Your Database #seoplus2018
Advanced Web Scraping or How To Make Internet Your Database #seoplus2018Advanced Web Scraping or How To Make Internet Your Database #seoplus2018
Advanced Web Scraping or How To Make Internet Your Database #seoplus2018
 
Web Concepts - an introduction - introduction
Web Concepts - an introduction - introductionWeb Concepts - an introduction - introduction
Web Concepts - an introduction - introduction
 
Html 5 - What's new?
Html 5 - What's new?Html 5 - What's new?
Html 5 - What's new?
 

Recently uploaded

How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
Celine George
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
imrankhan141184
 
Bonku-Babus-Friend by Sathyajith Ray (9)
Bonku-Babus-Friend by Sathyajith Ray  (9)Bonku-Babus-Friend by Sathyajith Ray  (9)
Bonku-Babus-Friend by Sathyajith Ray (9)
nitinpv4ai
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
Electric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger HuntElectric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger Hunt
RamseyBerglund
 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
Steve Thomason
 
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.pptLevel 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Henry Hollis
 
Standardized tool for Intelligence test.
Standardized tool for Intelligence test.Standardized tool for Intelligence test.
Standardized tool for Intelligence test.
deepaannamalai16
 
Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"
National Information Standards Organization (NISO)
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
Himanshu Rai
 
Nutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour TrainingNutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour Training
melliereed
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
Nguyen Thanh Tu Collection
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
TechSoup
 
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdfمصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
سمير بسيوني
 
B. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdfB. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdf
BoudhayanBhattachari
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
iammrhaywood
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
TechSoup
 

Recently uploaded (20)

How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
 
Bonku-Babus-Friend by Sathyajith Ray (9)
Bonku-Babus-Friend by Sathyajith Ray  (9)Bonku-Babus-Friend by Sathyajith Ray  (9)
Bonku-Babus-Friend by Sathyajith Ray (9)
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
Electric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger HuntElectric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger Hunt
 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
 
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.pptLevel 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
 
Standardized tool for Intelligence test.
Standardized tool for Intelligence test.Standardized tool for Intelligence test.
Standardized tool for Intelligence test.
 
Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
 
Nutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour TrainingNutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour Training
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
 
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdfمصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
 
B. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdfB. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdf
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
 

Light introduction to HTML

  • 1. HTML HyperText Markup Language is the main markup language for creating web pages and other information that can be displayed in a web browser. abidibo says: HTML is not a programming language!
  • 2. Wait, what the hell is abidibo? abidibo it's me ● Physicist ● Software developer at otto srl (web applications, mobile, databases, ...) ● Just Open Source ● Dev questions? abidibo@gmail.com ● Questions about Open Source projects? dev@abidibo.net ● Web: http://abidibo.net ● Skype: abidibo ● Twitter: abidibo
  • 3. HTTP HyperText Transfer Protocol (HTTP) is the main system used to transmit information over the web URL (Uniform Resource Locator) (http://)(www.example.com)(/pages/about.html)
  • 4. Version (standard) history ● 1989 Tim Berners-Lee invents the Web with HTML as its publishing language ● 1995 HTML 2 ● 1997 (january) HTML 3.2 ● 1997 (december) HTML 4.0 strict, transitional, frameset, css ● 1999 HTML 4.01 ● 2000 XHTML 1.0 XHTML 1.0 is a HTML 4.01 reformulation using XML (doctype, closed tags, case-sensitive,...) ● 2001 XHTML 1.1 ● 2002-2006 XHTML 2 ● ? HTML5
  • 5. Elder web sites ● Nothing more than a collection of html files organized (or not) into folders ● Url: http://www.example.com/index.html http://www.example.com/pages/about.html Files: ROOT DIR → index.html ROOT DIR/pages → about.html ● Almost nothing different from viewing (downloading) a file which resides on a different machine which occasionally has links to other files which reside on the same or another machine (plus other resources like images, videos, ...). ● Really a web page is only a file? Not only this, is a text file, it contains text, but such text is formatted (html is a markup language) ● HTML provides a way to jump between different files (HyperText) allowing the user for a contents navigation ● Static web sites, change contents manually by editing the html files
  • 6. Web 2.0 ● Dynamic web sites, and rich web applications ● Contents are stored in databases instead of directly into files ● Contents can be easily managed through back-office interfaces ● Applications generally implemented using a server side programming language which serves the final document (php, python, asp, …) ● Web sites allow everyone to publish contents on the web, also without html knowledge (WYSIWYG editors) ● “So is it really necessary to learn HTML?” YES! ● “But Joomla, Wordpress, Typo3, Blogspot, Tumblr...” Again YES! ● “But really, my friend has its on website but he doesn't...” YESSS!!
  • 7. Why YES! ● The final output of a rich web application still is an html document ● Contents still are the noblest part of a web site. Contents are rendered in html ● BAD JOOMLA BOY SAYS: “But we have WYSIWYG!” ANSWER: “WYSIWYG sure, but what you get often is NOT really what you see” ● Be cross-browser! (i.e. IE is your enemy) ● Web applications use templates (HTML) in which they insert dynamic contents ● The HTML you may write is better than the HTML a software can produce ● Learning HTML is easy! Learning CSS is easy!
  • 8. What really does HTML? ● Text Structure - TAGS Separate structure from contents Divide contents in blocks, visually separate information Nested contents, tree like structure What is a tag? <tagname>tag content</tagname> → <structure>content</structure> ● Semantics!!!!! Which is the page title (hopefully not the bold big-sized first line) Does a block forms an independent part of a document? Is this list a menu? ... Accessibility and Search Engines Optimization ● Through pages navigation (hyper text) ● Styles (Graphics) Colors, backgrounds, borders, … ● Some amazing stuff If combined with javascript
  • 9. Text Structure Text structured in nested elements <nav> <ul> <li>Menu voice #1</li> <li>Menu voice #2</li> </ul> </nav> <section id=”main”> <h1>Main section</h1> <article> <h1>title</h1> <p>Some text</p> <ul> <li>Item #1</li> <li>Item #2</li> </ul> </article> </section>
  • 10. TAGS 1/2 Generally: <tagname attribute=”attribute-value”>tag content</tagname> Sometimes: <tagname attribute=”attribute-value” /> Notice ● No spaces between < and tagname ● TagNaMe works the same, but please, be kind, don't do it ● A tag can contain tags (not every tag can contain every tag, semantics and tag type limitations) ● Attributes specify more information about the content structure
  • 11. TAGS 2/2 Some examples ● HEAD ELEMENTS <title>, <meta>, <link>, <script>, <style>, … ● STRUCTURE OF THE DOCUMENT (semantics!) <div>, <p>, <ul>, <ol>, <table>, <h1>, …, <h6> ● TEXT ELEMENTS <b>, <i>, <u>, <cite>, <var>, … ● FORM ELEMENTS <input>, <select>, <textarea>, <fieldset>, … ● SPECIAL ELEMENTS <img>, <video>, <script>, <br /> Try always to use the right tag! <abbr>, <time>, <address> Reference: https://developer.mozilla.org/en-US/docs/HTML/HTML5/HTML5_element_list
  • 12. Semantics 1. abidibo.net 1. Main menu 2. Archive 3. Categories 4. The importance of semantics in html documents 1. The header and the hgroup tags 2. The section tag 3. The article tag 4. And so on... 5. Post information 6. Comments 5. Projects 6. Topics 7. Tweet ● http://www.abidibo.net/blog/2012/01/26/the-importance-of-semantics-in-html-documents/
  • 14. Tools Browser Text Editor While there are many of them, use a good Use you preferred text editor here. browser please! Suggestions? → NO IE → FF Vim (the editor of the beast) → Chrome → Safari → Opera Preview http://codepen.io http://jsfiddle.net That's it... but There are many other tools/browser plugins which may make you happier, why? Time saving, don't waste time if you can, play more with your children or drink a beer! Again, Browser? FF → Use Firebug! There's no other web development tool which may be compared to it at the time of this writing
  • 15. Why HTML5? ● Easier (DOCTYPE, charset declarations) ● Semantics ● Multimedia support (no flash plz!) ● Geolocalization ● Canvas ● Forms ● Storage ● Mobile ● Web Sockets ● ...
  • 16. Why easier? HTML5 XHTML ● <!DOCTYPE html> ● <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" " ● <html> http://www.w3.org/TR/xhtml1-strict.dtd"> ● <meta charset=”utf-8” /> ● <html xmlns="http://www.w3.org/1999/xhtml" lang="it" xml:lang="it"> ● <script> ● <meta http-equiv="content-type" ● <style> content="text/html; charset=utf-8" /> ● <script type=”text/javascript”> ● <style type=”text/css”>
  • 17. Semantics ● <section> ● <article> ● <aside> ● <header> ● <footer> ● <hgroup> ● Not only one <h1> for page! ● Outline → http://www.abidibo.net/blog/2012/01/26/the-importance-of-semantics-in-html-documents/ → http://gsnedders.html5.org/outliner/
  • 18. Hello world! HTML5 rulez! What? 1. <!DOCTYPE html> 1 → Document declaration 2. <html> 2 → Root element 3. <head> 3 → Head of the document (include external resources, add meta information, favicon, ) 4. <meta charset=”utf-8” /> 4 → Character encoding 5. <title>Hello world!</title> 5 → Title of the page (as appears in the 6. </head> browser tab) 7. <body> 7 → The body of the document, what we really 8. <h1>Hello world!</h1> see on the browser page 9. </body> 8 → Just an heading 10. </html>
  • 19. CSS Cascading Style Sheets ● Define how your html elements will be displayed ● Css can be INLINE <span style=”padding: 10px; color: #aaa; display: block”></span> ● Css can stay in the head of the document <head> <style> span { padding: 10px; color: #aaa; display: block; } </style> </head> ● Css can stay in a separate file: stylesheet.css and included in the head section <link type=”text/css” rel=”stylesheet” href=”stylesheet.css” />
  • 20. CSS selectors A simple selector as defined by the CSS3 specs is composed of “either a type or universal selector followed by zero or more attribute selectors, ID selectors, or pseudo-classes, in any order. ● A type selector is used to select elements based on their tag name, such as div or span. A related selector, called a universal selector, is denoted by the asterisk symbol (*), and is used to select elements regardless of their tag. ● An id selector is used to select an element based on the value of its id attribute. Each id attribute in a given document must be unique, so the id attribute can only be used to match a single element. #item, #wrapper ● A class selector is used to select elements based on the value of their class attribute. An element can have several CSS classes, and a CSS class can be used for more than one element. .notification, .colored ● An attribute selector is used to select elements based on the value of their attributes. [<Attribute Name><Operator>"<Value>"]. The <Attribute Name> refers to an attribute of the element to select The <Operator> can be one of the following: = (equal to) ~= (includes in space list) |= (includes in pipe list) ^= (starts with) $= (ends with) *= (contains)
  • 21. CSS pseudo-selectors Special selectors that don’t deal with properties, but rather with states :empty—matches a node with no child nodes. :first-child—matches a node if it’s the first child of its parent. :last-child—matches a node if it’s the last child of its parent. :only-child—matches a node if it has no sibling nodes. :contains(<text>)—matches a node that contains the string value passed as the argument to <text> :not(<selector>)—matches a node if it doesn’t match the simple selector passed as the argument to <selector> :first-of-type—matches a node if it’s the first element of its type (i.e., a tag). :last-of-type—matches a node if it’s the last element of its type. :only-of-type—matches a node if it’s the only element of its type.
  • 22. CSS combined selectors Two or more simple selectors that are connected using a combinator. A combinator is a special symbol that denotes the relationship of one simple selector to another ● div a the whitespace character is the descendant combinator ● div > a the greater than symbol is the child combinator ● div ~ a the tilde symbol is the general sibling combinator (div preceeds a) ● Div + a the plus sign is the adjacent sibling combinator