CMPT 165 Unit 2 Markup Part 2

Similar documents
CMPT 165 Unit 3 CSS Part 1. Sept. 24 th, 2015

HTML Summary. All of the following are containers. Structure. Italics Bold. Line Break. Horizontal Rule. Non-break (hard) space.

HTML. Mohammed Alhessi M.Sc. Geomatics Engineering. Internet GIS Technologies كلية اآلداب - قسم الجغرافيا نظم المعلومات الجغرافية

Certified HTML Designer VS-1027

INTRODUCTION TO WEB USING HTML What is HTML?

Certified HTML5 Developer VS-1029

Basics of Web Design, 3 rd Edition Instructor Materials Chapter 2 Test Bank

Announcements. Paper due this Wednesday

Management Information Systems

Chapter 4. Introduction to XHTML: Part 1

Web Design 101. What is HTML? HTML Tags. Web Browsers. <!DOCTYPE html> <html> <body> <h1>my First Heading</h1> <p>my first paragraph.

CHAPTER 2 MARKUP LANGUAGES: XHTML 1.0

HTML. Hypertext Markup Language. Code used to create web pages

11. HTML5 and Future Web Application

CSI 3140 WWW Structures, Techniques and Standards. Markup Languages: XHTML 1.0

Tutorial 2 - HTML basics

(1) I (2) S (3) P allow subscribers to connect to the (4) often provide basic services such as (5) (6)

Desire2Learn: HTML Basics

HTML, CSS, JavaScript

HTML & XHTML Tag Quick Reference

Hyper Text Markup Language

1. The basic building block of an HTML document is called a(n) a. tag. b. element. c. attribute. d. container. Answer: b Page 5

HTML+ CSS PRINCIPLES. Getting started with web design the right way

Web Publishing Basics I

HTML Text Formatting. HTML Session 2 2

Skill Area 323: Design and Develop Website. Multimedia and Web Design (MWD)

Index. alt, 38, 57 class, 86, 88, 101, 107 href, 24, 51, 57 id, 86 88, 98 overview, 37. src, 37, 57. backend, WordPress, 146, 148

Chapter 4 A Hypertext Markup Language Primer

CMPT 470: Web-based Information Systems

Web Development & Design Foundations with XHTML. Chapter 2 Key Concepts

Chapter 1 Getting Started with HTML 5 1. Chapter 2 Introduction to New Elements in HTML 5 21

introduction to XHTML

Overview. Part I: Portraying the Internet as a collection of online information systems HTML/XHTML & CSS

Hyper Text Markup Language

HTML & CSS November 19, 2014

CSC Web Programming. Introduction to HTML

The internet is a worldwide collection of networks that link millions of computers. These links allow the computers to share and send data.

Unit 2 - HTML Formatting

recall: a Web page is a text document that contains additional formatting information in the HyperText Markup Language (HTML)

A HTML document has two sections 1) HEAD section and 2) BODY section A HTML file is saved with.html or.htm extension

HTML Hyper Text Markup Language

Motivation (WWW) Markup Languages (defined). 7/15/2012. CISC1600-SummerII2012-Raphael-lec2 1. Agenda

COPYRIGHTED MATERIAL. Contents. Chapter 1: Creating Structured Documents 1

Skill Area 323: Design and Develop Website. Multimedia and Web Design (MWD)

Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM Advanced Internet Technology Lab.

Unit 5 Web Publishing Systems Page 1 of 13 Part 4 HTML Part 4

HTML. Based mostly on

Creating A Web Page. Computer Concepts I and II. Sue Norris

CSC 121 Computers and Scientific Thinking

It is possible to create webpages without knowing anything about the HTML source behind the page.

8/19/2018. Web Development & Design Foundations with HTML5. Learning Objectives (1 of 2) More on Relative Linking. Learning Objectives (2 of 2)

Web Engineering (Lecture 01)

HTML Overview. With an emphasis on XHTML

Bridges To Computing

Introduction to HTML

How the Internet Works

BASICS OF WEB DESIGN CHAPTER 2 HTML BASICS KEY CONCEPTS

HTML CS 4640 Programming Languages for Web Applications

HYPERTEXT MARKUP LANGUAGE ( HTML )

AOS 452 Lab 4: HTML, CSS and Your Webpage

COPYRIGHTED MATERIAL. Contents. Introduction. Chapter 1: Structuring Documents for the Web 1

History of the Internet. The Internet - A Huge Virtual Network. Global Information Infrastructure. Client Server Network Connectivity

A Balanced Introduction to Computer Science, 3/E

HTML5 & CSS 8 th Edition. Chapter 2 Building a Webpage Template with HTML5

Creating Web Pages Using HTML

Beginning Web Site Design

Web Development & Design Foundations with HTML5 & CSS3 Instructor Materials Chapter 2 Test Bank

('cre Learning that works for Utah STRANDS AND STANDARDS WEB DEVELOPMENT 1

c122jan2714.notebook January 27, 2014

HTML TAG SUMMARY HTML REFERENCE 18 TAG/ATTRIBUTE DESCRIPTION PAGE REFERENCES TAG/ATTRIBUTE DESCRIPTION PAGE REFERENCES MOST TAGS

Learning Objectives. Review html Learn to write a basic webpage in html Understand what the basic building blocks of html are

HTML & CSS. SWE 432, Fall 2017 Design and Implementation of Software for the Web

HTML (Hypertext Mark-up language) Basic Coding

The University of Hawaii at Manoa Library Webpage Content/Design/Style Guidelines General Site Design... 2

HTML BEGINNING TAGS. HTML Structure <html> <head> <title> </title> </head> <body> Web page content </body> </html>

CS 350 COMPUTER/HUMAN INTERACTION. Lecture 6

The Structural Layer (Hypertext Markup Language) Webpage Design

SI Networked Computing: Storage, Communication, and Processing, Winter 2009

1/6/ :28 AM Approved New Course (First Version) CS 50A Course Outline as of Fall 2014

CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB

WEBSITE PROJECT 2 PURPOSE: INSTRUCTIONS: REQUIREMENTS:

GRAPHIC WEB DESIGNER PROGRAM

CAS 111D: XHTML Tutorial

Announcements. 1. Class webpage: Have you been reading the announcements? Lecture slides and coding examples will be posted

Programmazione Web a.a. 2017/2018 HTML5

Markup Language. Made up of elements Elements create a document tree

CS134 Web Site Design & Development. Quiz1

Text and Layout. Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 11. This presentation 2004, MacAvon Media Productions

Attributes & Images 1 Create a new webpage

Chapter 2:- Introduction to XHTML. Compiled By:- Sanjay Patel Assistant Professor, SVBIT.

Web Designing HTML5 NOTES

CMPT 165 Advanced XHTML & CSS Part 3

Multimedia for the Web: Creating Digital Excitement. Multimedia Element Text

Hyper Text Markup Language HTML: A Tutorial

HTML TUTORIAL ONE. Understanding What XHTML is Not

Welcome Please sit on alternating rows. powered by lucid & no.dots.nl/student

ATSC Week 2 Web Authoring

XHTML & CSS CASCADING STYLE SHEETS

Introduction to WEB PROGRAMMING

INTRODUCTION TO HTML5! HTML5 Page Structure!

Transcription:

CMPT 165 Unit 2 Markup Part 2 Sept. 17 th, 2015 Edited and presented by Gursimran Sahota

Today s Agenda Recap of materials covered on Tues Introduction on basic tags Introduce a few useful tags and concepts anchor image attributes absolute vs. relative URL Lab exercise 1 demo/tutorial 2

Good Webpage (Design) CONTENT Messages to your audience INTERACTION Provide responses to audience You provide. Check grammar Web-programming (Python) STRUCTURE Give meaning to each element Meta data (meta=about) STYLE Describe visual properties of each element Markup, i.e. XHTML, HTML5 Cascading Style Sheets (CSS) 3

Why do markup? 1. Gives you more control over browsers 2. Encourages you to focus on content (no formatting yet) 3. Allows you to reuse code (we ll see why/how later) 4. Better Search Engine rankings 5. Visual properties of webpages are not accessible to some people, e.g.: Software like JAWS is used to read out webpages to the blind Bolded text like this image is therefore not meaningful to the blind: Using e.g. <strong> tags: <strong>quodsi vocibus eligendi </strong> Makes your webpages more accessible, e.g. JAWS will speak with a lower tone for contents of <strong> tags 4

High-level structure of a webpage 1. Document type declaration (DTD) more later 2. Header: provides meta information, i.e. things about the webpage - Not displayed in browser window! - Title is displayed on the tab An element An element 3. Body: Actual content 5

High-level structure of a webpage An element An element CMPT 165 D1 (Summer 2005) 6

About elements Most elements consist of 1-2 components <h1>this is a heading</h1> Opening (+ closing) tags + content Some elements do not have content: e.g. horizontal line (=rule), line breaks Use empty tags <hr/> <br/> Demo e.g. <p>this is a paragraph.</p><br/> <p>this is another paragraph.</p> 7

Basic tags <h1>,, <h6> <p> <b> <i> <u> <em> <strong> <blockquote> <q> <pre> <tt> <br/> <hr/> headings paragraph bold italic underline emphasis* strong emphasis** indented quoting quoting text (for citations) pre-formatted text typewriter type ( monospace ), not equivalent to <pre> line break horizontal rule (rule=line) *preferred over <i> **preferred over <b> (as it gives semantic meaning of content) Demo 8

Important notes Tags must be in lower cases, e.g. <body>, <BODY> Most tags should be closed: <h1>this is a subheading <p>validator will complain.</p> Semantics should be respected: <p><h2>bad annotations</h2>validator will complain.</p> <h2>good annotations</h2> <p>validator will <em>approve</em> it.</p> Ordering of tags matters! Improper nesting : <p><i>validator will <em>not</i></em> approve this.</p> 9

Another note White spaces are ignored: <h2>this is a subheading</h2> <h2>this is a subheading</h2> Demo <h2>this is a subheading</h2> will be displayed in same manner 10

<blockquote> <h2> <p> <h1> </h2> </h1> </blockquote> </p> <p><i> </i></p> <h2> <p> </h2> </p> <h3> <p><b> </h3> </b></p> <h3> <p> </h3> </p> <h4> <p> </h4> </p> 11

Questions? 12

Unit 2 Part 2 More Tags 13

Today s Agenda Recap of materials covered Introduce a few useful tags and concepts absolute vs. relative URL attributes image anchor 14

URL (reviewed) Universal Resource Locator: name of a resource html, pdf document, image file, etc. Examples: http://www.cs.sfu.ca/coursecentral/165/lisat/index.html http://www.cs.sfu.ca/coursecentral/165/lisat/lectures/unit1-part2.pdf http://cmpt165.cs.sfu.ca/~lisat/demos/sfu_logo.png 15

FileZilla window Demo Local Remote cmpt165.csil.sfu.ca Web server s IP:[142.58.21.82] Z My station s IP: [199.60.5.178] 16

http://cmpt165.cs.sfu.ca/ ~ lisat /demos/sfu_logo.png 17

<img> tag An empty tag (no closing tag) Required attributes: src: where the image file is stored; abbreviation of source alt: alternative text to be displayed if file cannot be read Tip: be as descriptive as possible because search engines use them Example: <img src= http://cmpt165.cs.sfu.ca/~lisat/demos/sfu_logo.png alt= Library logo /> Optional attributes: height: displayed height width: displayed width (% or pixels) <img src= SFU_logo.png alt= Library logo width= 500 height= 400 /> 18

Attribute specification Assign attributes to elements: <img src= SFU_logo.png alt= Library logo width= 500 height= 400 /> name_of_attribute= value Always close the value with double quotes ( value )! 19

Absolute vs. relative URL SFU_logo.png + index.html both in same demos folder use relative path (as opposed to absolute path) <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd"> <html> <head><title>title</title></head> <body> </body> </html> <h1>heading</h1> <p> <img src= http://cmpt165.csil.sfu.ca/ ~lisat/demos/sfu_logo.png /> </p> <p><img src= SFU_logo.png /></p> 20

<a> tag <a>: anchor tag creates a hyperlink to a resource Example: <p>this is link to <a href= www.sfu.ca >SFU</a></p> Required attributes: href: hyper reference Optional attributes target: where the target page will be displayed type: what type of resource href points to 21

Recap on Unit 2 Key components of good websites Structure of webpage: DTD vs. head vs. body Elements vs. tags vs. content Tags examined today: Basic Tags <h1>,,<h6>,<p>,<br>,etc. Image <img> Anchor <a> http://www.w3schools.com/tags/ Key concepts: Attributes Relative vs. absolute URL 22

Part 2 - Exercise 1 tutorial/demo http://www.cs.sfu.ca/coursecentral/165/lisat/assign/e1.html IMPORTANT NOTE: follow instructions exactly e.g. use the exact URL as requested Demo 23