SlideShare uma empresa Scribd logo
1 de 22
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

Mais conteúdo relacionado

Mais procurados

HTML & CSS Workshop Notes
HTML & CSS Workshop NotesHTML & CSS Workshop Notes
HTML & CSS Workshop NotesPamela 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 JSNaga 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 ArmstrongNick Armstrong
 
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 documentationAlkacon Software GmbH & Co. KG
 
An Introduction To HTML5
An Introduction To HTML5An Introduction To HTML5
An Introduction To HTML5Robert Nyman
 
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
 
Introduction to XML, XHTML and CSS
Introduction to XML, XHTML and CSSIntroduction to XML, XHTML and CSS
Introduction to XML, XHTML and CSSJussi Pohjolainen
 
網頁程式設計
網頁程式設計網頁程式設計
網頁程式設計傳錡 蕭
 
Web1O1 - Intro to HTML/CSS
Web1O1 - Intro to HTML/CSSWeb1O1 - Intro to HTML/CSS
Web1O1 - Intro to HTML/CSSNYCSS Meetup
 
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
 

Mais procurados (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
 

Destaque

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 mitosisScelo91
 
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 htmltmjordan
 
An introduction to html
An introduction to htmlAn introduction to html
An introduction to htmlkashifareed
 
01. session 01 introduction to html
01. session 01   introduction to html01. session 01   introduction to html
01. session 01 introduction to htmlPhúc Đỗ
 

Destaque (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
 

Semelhante a 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 NCRGaurav Mishra
 
Chapter 2 introduction to html5
Chapter 2 introduction to html5Chapter 2 introduction to html5
Chapter 2 introduction to html5nobel mujuji
 
HTML course.ppt
HTML course.pptHTML course.ppt
HTML course.pptRyanTeo35
 
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 5Ravi 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 1Erin M. Kidwell
 
Frontend for developers
Frontend for developersFrontend for developers
Frontend for developersHernan Mammana
 
Web Fundamentals Crash Course
Web Fundamentals Crash CourseWeb Fundamentals Crash Course
Web Fundamentals Crash CourseMrAbbas
 
Web Fundamentals Crash Course
Web Fundamentals Crash CourseWeb Fundamentals Crash Course
Web Fundamentals Crash CourseMrAbas
 
C3 웹기술로만드는모바일앱
C3 웹기술로만드는모바일앱C3 웹기술로만드는모바일앱
C3 웹기술로만드는모바일앱NAVER D2
 
Lesson 1: Introduction to HTML
Lesson 1: Introduction to HTMLLesson 1: Introduction to HTML
Lesson 1: Introduction to HTMLOlivia 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 #seoplus2018Esteve Castells
 
Web Concepts - an introduction - introduction
Web Concepts - an introduction - introductionWeb Concepts - an introduction - introduction
Web Concepts - an introduction - introductionclement swarnappa
 

Semelhante a 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?
 

Último

microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Shubhangi Sonawane
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfSanaAli374401
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 

Último (20)

microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 

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