SlideShare ist ein Scribd-Unternehmen logo
1 von 22
Downloaden Sie, um offline zu lesen
(X)HTML: The Basics
What is (X)HTML?
What you need to know
• HTML
  •   Hypertext Markup Language
  •   A Computer language used to add objects and other information to a Web page
  •   Not a programming language, it’s a markup language

• Markup Language
  •   A set of markup tags

• HTML Tags
  •   Surrounded by angle brackets <>
      •   <html>
  •   Come in pairs
      •   <b>Content Here</b>
      •   Start Tag = first tag —also called an opening tag
      •   End Tag = second tag —also called a closing tag

• HTML Documents = Web Pages
  •   Describe Web pages
  •   Contain HTML tags and plain text
More stuff to know
• XHTML
 •   Extensible Hypertext Markup Language
 •   Very similar to HTML—same concept
 •   Newer and Stricter than HTML, but the two terms are often used interchangeably
 •   A sort of cross between HTML and XML (Extensible Markup Language)

• XML
 •   A set of rules used to encode electronic documents
 •   Employed to increase compatibility among electronic documents and satisfy current Web
     standards
 •   Employed to increase compatibility between electronic documents and the Web

• CSS
 •   Cascading Style Sheets
 •   A type of computer language used to specify how a web page should be presented
     •   Font colors, positioning, line spacing, borders, etc…
Two types of HTML and XHTML
• Strict
  •   The only one you should use
  •   Do not use outdated tags
  •   Everything in lowercase!

• Transitional
  •   Use only when dealing with a page that is in the process of being updated to the new
      version
HTML strict document type declaration
• DOCTYPE
• Document type declaration
• Always the first thing typed into your HTML document
• Appears BEFORE opening tag
• Tells the browser which version and what type of (X)HTML you are using
• Does not display as visual content on your Web page
• More forgiving than XHTML, so we will stick with what’s below
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
What’s the markup?
Anatomy of a tag
•   An (X)HTML tag is a name/keyword surrounded by angle brackets


•   The closing tag needs a slash   (/)   before the tag name

•   opening tag + closing tag + content = (X)HTML element —Below is an example of the h1 (X)HTML element



•   Use only   lowercase letters!
                                                                                            Closing tag


    Tag name
                       <h1>Content Here</h1>
    Opening tag


                                                                                    Angle Brackets
Most commonly used tags
•   <html>Content Here</html>                                       •   Italics

    •   Text placed between the angled brackets describes
        the Web page                                            •   <b>Content Here</b>
    •   Opening tag is very first displayed in the markup
                                                                    •   Bold


    •
        after DOCTYPE
        Closing tag is the very last displayed in the markup
                                                                •   <font>Content Here</font>
                                                                    •   Describes the font you’re using

•   <title>Content Here</title>
                                                                •   <q>Content Here</q>
    •   Text placed between the angled brackets describes
                                                                    •   Displays quotation marks around content
        the title of the Web page

•   <body>Content Here</body>                                   •   &nbsp;
    •   Text placed between the angled brackets describes           •   Adds a space
        the visible page content
                                                                •   <br />
•   <h1>Content Here</h1>                                           •   Adds a line break

    •   Text placed between the angled brackets displays as a       •   Empty/Self-Closing tag
        heading                                                     •   <br /> —space before the slash mark makes it
    •   h1 (largest heading), h2, h3, h4, h5, h6 (smallest              compatible with older browsers

                                                                •
        heading)
                                                                    <hr />
•   <p>Content Here</p>                                             •   Adds a horizontal line
    •
                                                                •
        Text placed between the angled brackets displays as a
        paragraph                                                   <img />
                                                                    •   Adds an image to your page
•   <i>Content Here</i>
Even more commonly used tags
•   <a>Content Here</a>
    •   Displays a hyperlink

•   <ol>Content Here</ol>
    •   Displays an ordered list
    •   Uses numbers for list items

•   <ul>Content Here</ul>
    •   Displays an unordered list
    •   Uses bullets for list items

•   <li>Content Here</li>
    •   Used in an unordered or ordered list to separate the
        items in a list
        <ol>
        <li>Coffee</li>
        <li>Tea</li>
        <li>Milk</li>
        </ol>

•   <center>Content Here</center>
    •   Centers content on a page
Yes, (X)HTML can be nested
• (X)HTML elements can be nested inside of each other
       <p><h1><i>Content Here</i></h1></p>

• When nesting elements, the first tag opened, must be the last tag closed
     •GOOD
       <p><h1><i>Content Here</i></h1></p>

     •BAD
       <p><h1></i>Content Here</p></h1></i>
Putting it to work

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<title>My Great Web Page</title>
<body>
<h1>My first heading</h1>
<h2>My second heading</h2>
<h3>My third heading</h3>
<h4>My fourth heading</h4>
<h5>My fifth heading</h5>
<h6>My sixth heading</h6>
&nbsp;
<h1><i>My italic heading</i></h1>
<h2><b>My bold heading</b></h2>
<p>This is a paragraph
with no line breaks.</p>
<p>
This<br />
is a<br />
paragraph<br />
with<br />
line breaks<br />
</p>
</body>
</html>
Wait, there’s more
Attributes
• Adds extra information to an (X)HTML tag
• The value for an attribute can be placed within either single or double quotes
• Always go inside the opening tag
• Tags can have multiple attributes
  •   Separate each attribute with a space



 Attribute


        <font face="verdana">Content Here</font>

                                                  Value
Commonly used attributes and values
•   face                                                      •   width
    •   Describes a typeface                                      •   Specifies the width of an image or horizontal line
    •   <font face="garamond">This is Garamond.</font>            •   Use pixels
                                                                      •    <img src="http://www.interestment.co.uk/wp-
•   color                                                                  content/uploads/2009/04/lampard-poodle.jpg"
                                                                           alt=Crazy Poodle width="100" />
    •   Describes a tag’s color
                                                                  •   Or use percentages
    •   <font color="#FFFF00">This is yellow text.</font>
                                                                      •    <img src="http://www.interestment.co.uk/wp-
    •   <hr color="#80ff80" />                                             content/uploads/2009/04/lampard-poodle.jpg"
                                                                           alt=Crazy Poodle width="50%" />
•   bgcolor                                                       •   If you don’t include the height attribute, the image will
    •   Describes a background color for your page                    be resized proportionately
    •   <body bgcolor="#FFFF00">Content Here</body>
                                                              •   height
•   src                                                           •   Specifies the height of an image
    •   Describes your image source                               •   Use pixels or percentages
    •   <img src="http://www.interestment.co.uk/wp-content/       •   <img src="http://www.interestment.co.uk/wp-content/
        uploads/2009/04/lampard-poodle.jpg" />                        uploads/2009/04/lampard-poodle.jpg" alt=Crazy
                                                                      Poodle width="50%" height="20%" />

•   alt                                                           •   If you don’t include the width attribute, the image will
                                                                      be resized proportionately
    •   Specifies an alternate text for an image
    •   <img src="http://www.interestment.co.uk/wp-content/
                                                              •   size
        uploads/2009/04/lampard-poodle.jpg" alt=Crazy
        Poodle />                                                 •   Specifies the height of a typeface [-8(–)+8]
                                                                  •   <font face="garamond" size="+5" height="60">This is
                                                                      Garamond.</font>
Hyperlink (Anchor) attributes and values

•   href                                                        •   target
    •   Describes your hyperlinked Web source                       •   Describes the browser window you want the
    •   <a href="http://www.google.com">Click here to go                hyperlink to open in
        to Google!</a>                                              •   _blank, _self, _parent, _top
                                                                    •   Opens hyperlink in a new browser window
•   name                                                                •   <a href="http://www.google.com"
    •   Describes a name anchor (bookmark)                                  target="_blank">Click here to go to Google!</
                                                                            a>
    •   Enables travel within a single html document
                                                                    •   Opens hyperlink in the current browser window
    •   First create your bookmarks
                                                                        •   <a href="http://www.google.com"
        •   <a name="P1">Paragraph One</a>                                  target="_self">Click here to go to Google!</a>
    •   Next, create your hyperlink that will take you to the
        bookmark of your choice
        •   <a href="#P1">Click to Return to Paragraph
            One</a>
Now what?
Using TextEdit

• TextEdit is the Plain Text Editor for Mac users
  •   Finder ➞ Applications ➞ TextEdit
  •   PC Users will use Notepad
  •   Google Search for other available plain text editors if
      necessary


• Once in TextEdit ➞ Format ➞ Make Plain Text
  •   File ➞ Save As ➞ index.html

  •      lowercase letters!
      Use only

  • No spaces !
  •   You must include the .html extension!
I need more tags!
     http://cedesign.net/help2j.htm
    http://www.w3schools.com/tags/
Web-Safe Fonts
http://www.ampsoft.net/webdesign-l/WindowsMacFonts.html
Web-Safe Colors
     http://ficml.org/jemimap/style/color/wheel.html
 http://www.webmonkey.com/reference/Color_Charts
More sources
        http://www.tizag.com/htmlT/
http://www.learningnerd.com/series/xhtml-css

Weitere ähnliche Inhalte

Was ist angesagt? (20)

Html
HtmlHtml
Html
 
HTML & CSS Masterclass
HTML & CSS MasterclassHTML & CSS Masterclass
HTML & CSS Masterclass
 
Week 2-intro-html
Week 2-intro-htmlWeek 2-intro-html
Week 2-intro-html
 
Web Development using HTML & CSS
Web Development using HTML & CSSWeb Development using HTML & CSS
Web Development using HTML & CSS
 
Intro to HTML and CSS - Class 2 Slides
Intro to HTML and CSS - Class 2 SlidesIntro to HTML and CSS - Class 2 Slides
Intro to HTML and CSS - Class 2 Slides
 
HTML CSS Basics
HTML CSS BasicsHTML CSS Basics
HTML CSS Basics
 
Introduction to WEB HTML, CSS
Introduction to WEB HTML, CSSIntroduction to WEB HTML, CSS
Introduction to WEB HTML, CSS
 
html-css
html-csshtml-css
html-css
 
Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS Presentation
 
An Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java ScriptAn Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java Script
 
HTML CSS | Computer Science
HTML CSS | Computer ScienceHTML CSS | Computer Science
HTML CSS | Computer Science
 
Css notes
Css notesCss notes
Css notes
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
 
PHP HTML CSS Notes
PHP HTML CSS  NotesPHP HTML CSS  Notes
PHP HTML CSS Notes
 
Html css java script basics All about you need
Html css java script basics All about you needHtml css java script basics All about you need
Html css java script basics All about you need
 
Presentation on html, css
Presentation on html, cssPresentation on html, css
Presentation on html, css
 
HTML, CSS and Java Scripts Basics
HTML, CSS and Java Scripts BasicsHTML, CSS and Java Scripts Basics
HTML, CSS and Java Scripts Basics
 
HTML Foundations, pt 2
HTML Foundations, pt 2HTML Foundations, pt 2
HTML Foundations, pt 2
 
Intro to HTML
Intro to HTMLIntro to HTML
Intro to HTML
 

Andere mochten auch

Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTMLMayaLisa
 
Introduction to html
Introduction to htmlIntroduction to html
Introduction to htmlvikasgaur31
 
HTML presentation for beginners
HTML presentation for beginnersHTML presentation for beginners
HTML presentation for beginnersjeroenvdmeer
 
Black Hat 2014: Don’t be a Target: Everything You Know About Vulnerability Pr...
Black Hat 2014: Don’t be a Target: Everything You Know About Vulnerability Pr...Black Hat 2014: Don’t be a Target: Everything You Know About Vulnerability Pr...
Black Hat 2014: Don’t be a Target: Everything You Know About Vulnerability Pr...Skybox Security
 
How to manage a big scale HTML/CSS project
How to manage a big scale HTML/CSS projectHow to manage a big scale HTML/CSS project
How to manage a big scale HTML/CSS projectRenoir Boulanger
 
Magic in ruby
Magic in rubyMagic in ruby
Magic in rubyDavid Lin
 
MongoDB - Ruby document store that doesn't rhyme with ouch
MongoDB - Ruby document store that doesn't rhyme with ouchMongoDB - Ruby document store that doesn't rhyme with ouch
MongoDB - Ruby document store that doesn't rhyme with ouchWynn Netherland
 
The Black Magic of Ruby Metaprogramming
The Black Magic of Ruby MetaprogrammingThe Black Magic of Ruby Metaprogramming
The Black Magic of Ruby Metaprogrammingitnig
 
process management
 process management process management
process managementAshish Kumar
 
Accessibility & Compatibility
Accessibility & CompatibilityAccessibility & Compatibility
Accessibility & CompatibilityJared Smith
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHPBradley Holt
 

Andere mochten auch (20)

Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
 
Html Ppt
Html PptHtml Ppt
Html Ppt
 
Introduction to html
Introduction to htmlIntroduction to html
Introduction to html
 
HTML presentation for beginners
HTML presentation for beginnersHTML presentation for beginners
HTML presentation for beginners
 
Hackers vs developers
Hackers vs developersHackers vs developers
Hackers vs developers
 
Black Hat 2014: Don’t be a Target: Everything You Know About Vulnerability Pr...
Black Hat 2014: Don’t be a Target: Everything You Know About Vulnerability Pr...Black Hat 2014: Don’t be a Target: Everything You Know About Vulnerability Pr...
Black Hat 2014: Don’t be a Target: Everything You Know About Vulnerability Pr...
 
How to manage a big scale HTML/CSS project
How to manage a big scale HTML/CSS projectHow to manage a big scale HTML/CSS project
How to manage a big scale HTML/CSS project
 
Magic in ruby
Magic in rubyMagic in ruby
Magic in ruby
 
Ruby objects
Ruby objectsRuby objects
Ruby objects
 
ZODB Tips and Tricks
ZODB Tips and TricksZODB Tips and Tricks
ZODB Tips and Tricks
 
Designing Ruby APIs
Designing Ruby APIsDesigning Ruby APIs
Designing Ruby APIs
 
MongoDB - Ruby document store that doesn't rhyme with ouch
MongoDB - Ruby document store that doesn't rhyme with ouchMongoDB - Ruby document store that doesn't rhyme with ouch
MongoDB - Ruby document store that doesn't rhyme with ouch
 
Ruby object model
Ruby object modelRuby object model
Ruby object model
 
The Black Magic of Ruby Metaprogramming
The Black Magic of Ruby MetaprogrammingThe Black Magic of Ruby Metaprogramming
The Black Magic of Ruby Metaprogramming
 
Tags in html
Tags in htmlTags in html
Tags in html
 
Web engineering lecture 1
Web engineering lecture 1Web engineering lecture 1
Web engineering lecture 1
 
Introduction to Html5
Introduction to Html5Introduction to Html5
Introduction to Html5
 
process management
 process management process management
process management
 
Accessibility & Compatibility
Accessibility & CompatibilityAccessibility & Compatibility
Accessibility & Compatibility
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
 

Ähnlich wie HTML Lecture Part 1 of 2

Ähnlich wie HTML Lecture Part 1 of 2 (20)

Intro to HTML 5 / CSS 3
Intro to HTML 5 / CSS 3Intro to HTML 5 / CSS 3
Intro to HTML 5 / CSS 3
 
Introduction to html
Introduction to htmlIntroduction to html
Introduction to html
 
Web forms and html (lect 1)
Web forms and html (lect 1)Web forms and html (lect 1)
Web forms and html (lect 1)
 
Html and css
Html and cssHtml and css
Html and css
 
Html intro
Html introHtml intro
Html intro
 
Introduction to xhtml
Introduction to xhtmlIntroduction to xhtml
Introduction to xhtml
 
Intro to HTML
Intro to HTMLIntro to HTML
Intro to HTML
 
Castro Chapter 3
Castro Chapter 3Castro Chapter 3
Castro Chapter 3
 
Html cia
Html ciaHtml cia
Html cia
 
CSS
CSSCSS
CSS
 
Khoa dang (kay)
Khoa dang (kay)Khoa dang (kay)
Khoa dang (kay)
 
Xhtml and html5 basics
Xhtml and html5 basicsXhtml and html5 basics
Xhtml and html5 basics
 
Intro to html, css & sass
Intro to html, css & sassIntro to html, css & sass
Intro to html, css & sass
 
Xhtml
XhtmlXhtml
Xhtml
 
Images and Lists in HTML
Images and Lists in HTMLImages and Lists in HTML
Images and Lists in HTML
 
HTML, CSS, JavaScript for beginners
HTML, CSS, JavaScript for beginnersHTML, CSS, JavaScript for beginners
HTML, CSS, JavaScript for beginners
 
HTML Coding
HTML CodingHTML Coding
HTML Coding
 
Introduction to XML, XHTML and CSS
Introduction to XML, XHTML and CSSIntroduction to XML, XHTML and CSS
Introduction to XML, XHTML and CSS
 
Html lesson1 5
Html lesson1 5Html lesson1 5
Html lesson1 5
 
html
htmlhtml
html
 

Kürzlich hochgeladen

Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIShubhangi Sonawane
 
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
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
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
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
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
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 

Kürzlich hochgeladen (20)

Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
 
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
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
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
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
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...
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 

HTML Lecture Part 1 of 2

  • 3. What you need to know • HTML • Hypertext Markup Language • A Computer language used to add objects and other information to a Web page • Not a programming language, it’s a markup language • Markup Language • A set of markup tags • HTML Tags • Surrounded by angle brackets <> • <html> • Come in pairs • <b>Content Here</b> • Start Tag = first tag —also called an opening tag • End Tag = second tag —also called a closing tag • HTML Documents = Web Pages • Describe Web pages • Contain HTML tags and plain text
  • 4. More stuff to know • XHTML • Extensible Hypertext Markup Language • Very similar to HTML—same concept • Newer and Stricter than HTML, but the two terms are often used interchangeably • A sort of cross between HTML and XML (Extensible Markup Language) • XML • A set of rules used to encode electronic documents • Employed to increase compatibility among electronic documents and satisfy current Web standards • Employed to increase compatibility between electronic documents and the Web • CSS • Cascading Style Sheets • A type of computer language used to specify how a web page should be presented • Font colors, positioning, line spacing, borders, etc…
  • 5. Two types of HTML and XHTML • Strict • The only one you should use • Do not use outdated tags • Everything in lowercase! • Transitional • Use only when dealing with a page that is in the process of being updated to the new version
  • 6. HTML strict document type declaration • DOCTYPE • Document type declaration • Always the first thing typed into your HTML document • Appears BEFORE opening tag • Tells the browser which version and what type of (X)HTML you are using • Does not display as visual content on your Web page • More forgiving than XHTML, so we will stick with what’s below <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  • 8. Anatomy of a tag • An (X)HTML tag is a name/keyword surrounded by angle brackets • The closing tag needs a slash (/) before the tag name • opening tag + closing tag + content = (X)HTML element —Below is an example of the h1 (X)HTML element • Use only lowercase letters! Closing tag Tag name <h1>Content Here</h1> Opening tag Angle Brackets
  • 9. Most commonly used tags • <html>Content Here</html> • Italics • Text placed between the angled brackets describes the Web page • <b>Content Here</b> • Opening tag is very first displayed in the markup • Bold • after DOCTYPE Closing tag is the very last displayed in the markup • <font>Content Here</font> • Describes the font you’re using • <title>Content Here</title> • <q>Content Here</q> • Text placed between the angled brackets describes • Displays quotation marks around content the title of the Web page • <body>Content Here</body> • &nbsp; • Text placed between the angled brackets describes • Adds a space the visible page content • <br /> • <h1>Content Here</h1> • Adds a line break • Text placed between the angled brackets displays as a • Empty/Self-Closing tag heading • <br /> —space before the slash mark makes it • h1 (largest heading), h2, h3, h4, h5, h6 (smallest compatible with older browsers • heading) <hr /> • <p>Content Here</p> • Adds a horizontal line • • Text placed between the angled brackets displays as a paragraph <img /> • Adds an image to your page • <i>Content Here</i>
  • 10. Even more commonly used tags • <a>Content Here</a> • Displays a hyperlink • <ol>Content Here</ol> • Displays an ordered list • Uses numbers for list items • <ul>Content Here</ul> • Displays an unordered list • Uses bullets for list items • <li>Content Here</li> • Used in an unordered or ordered list to separate the items in a list <ol> <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ol> • <center>Content Here</center> • Centers content on a page
  • 11. Yes, (X)HTML can be nested • (X)HTML elements can be nested inside of each other <p><h1><i>Content Here</i></h1></p> • When nesting elements, the first tag opened, must be the last tag closed •GOOD <p><h1><i>Content Here</i></h1></p> •BAD <p><h1></i>Content Here</p></h1></i>
  • 12. Putting it to work <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <title>My Great Web Page</title> <body> <h1>My first heading</h1> <h2>My second heading</h2> <h3>My third heading</h3> <h4>My fourth heading</h4> <h5>My fifth heading</h5> <h6>My sixth heading</h6> &nbsp; <h1><i>My italic heading</i></h1> <h2><b>My bold heading</b></h2> <p>This is a paragraph with no line breaks.</p> <p> This<br /> is a<br /> paragraph<br /> with<br /> line breaks<br /> </p> </body> </html>
  • 14. Attributes • Adds extra information to an (X)HTML tag • The value for an attribute can be placed within either single or double quotes • Always go inside the opening tag • Tags can have multiple attributes • Separate each attribute with a space Attribute <font face="verdana">Content Here</font> Value
  • 15. Commonly used attributes and values • face • width • Describes a typeface • Specifies the width of an image or horizontal line • <font face="garamond">This is Garamond.</font> • Use pixels • <img src="http://www.interestment.co.uk/wp- • color content/uploads/2009/04/lampard-poodle.jpg" alt=Crazy Poodle width="100" /> • Describes a tag’s color • Or use percentages • <font color="#FFFF00">This is yellow text.</font> • <img src="http://www.interestment.co.uk/wp- • <hr color="#80ff80" /> content/uploads/2009/04/lampard-poodle.jpg" alt=Crazy Poodle width="50%" /> • bgcolor • If you don’t include the height attribute, the image will • Describes a background color for your page be resized proportionately • <body bgcolor="#FFFF00">Content Here</body> • height • src • Specifies the height of an image • Describes your image source • Use pixels or percentages • <img src="http://www.interestment.co.uk/wp-content/ • <img src="http://www.interestment.co.uk/wp-content/ uploads/2009/04/lampard-poodle.jpg" /> uploads/2009/04/lampard-poodle.jpg" alt=Crazy Poodle width="50%" height="20%" /> • alt • If you don’t include the width attribute, the image will be resized proportionately • Specifies an alternate text for an image • <img src="http://www.interestment.co.uk/wp-content/ • size uploads/2009/04/lampard-poodle.jpg" alt=Crazy Poodle /> • Specifies the height of a typeface [-8(–)+8] • <font face="garamond" size="+5" height="60">This is Garamond.</font>
  • 16. Hyperlink (Anchor) attributes and values • href • target • Describes your hyperlinked Web source • Describes the browser window you want the • <a href="http://www.google.com">Click here to go hyperlink to open in to Google!</a> • _blank, _self, _parent, _top • Opens hyperlink in a new browser window • name • <a href="http://www.google.com" • Describes a name anchor (bookmark) target="_blank">Click here to go to Google!</ a> • Enables travel within a single html document • Opens hyperlink in the current browser window • First create your bookmarks • <a href="http://www.google.com" • <a name="P1">Paragraph One</a> target="_self">Click here to go to Google!</a> • Next, create your hyperlink that will take you to the bookmark of your choice • <a href="#P1">Click to Return to Paragraph One</a>
  • 18. Using TextEdit • TextEdit is the Plain Text Editor for Mac users • Finder ➞ Applications ➞ TextEdit • PC Users will use Notepad • Google Search for other available plain text editors if necessary • Once in TextEdit ➞ Format ➞ Make Plain Text • File ➞ Save As ➞ index.html • lowercase letters! Use only • No spaces ! • You must include the .html extension!
  • 19. I need more tags! http://cedesign.net/help2j.htm http://www.w3schools.com/tags/
  • 21. Web-Safe Colors http://ficml.org/jemimap/style/color/wheel.html http://www.webmonkey.com/reference/Color_Charts
  • 22. More sources http://www.tizag.com/htmlT/ http://www.learningnerd.com/series/xhtml-css