COMPSCI 345 / SOFTENG 350 TUTORIAL WEEK 8 | SAM KAVANAGH.

Slides:



Advertisements
Similar presentations
1 © Netskills Quality Internet Training, University of Newcastle Introducing Cascading Style Sheets © Netskills, Quality Internet.
Advertisements

Intro to HTML. HTML HTML = HyperText Markup Language Used to define the content of a webpage HTML is made up of tags and attributes Content.
Introduction to HTML & CSS
CSS Cascading Style Sheets. Objectives Using Inline Styles Working with Selectors Using Embedded Styles Using an External Style Sheet Applying a Style.
Hyper Text Markup Language.  HTML is a language for describing web pages.  HTML stands for Hyper Text Markup Language  HTML is not a programming language,
Cascading Style Sheets
HTML Overview - Cascading Style Sheets (CSS). Before We Begin Make a copy of one of your HTML file you have previously created Make a copy of one of your.
Making Things Look Nice: Visual Appearance and CSS CMPT 281.
Cascading Style Sheets. CSS stands for Cascading Style Sheets and is a simple styling language which allows attaching style to HTML elements. CSS is a.
Chapter 8 Creating Style Sheets.
HTML5 and CSS3 Illustrated Unit B: Getting Started with HTML
HTML Introduction HTML
4.01 Cascading Style Sheets
Chapter 2 Introduction to HTML5 Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
HTML BASIC
© Ms. Masihi 1.  A web page is created using a language called, Hypertext Markup Language, better known as HTML Code.  HTML is a user friendly language.
Chapter 14 Introduction to HTML
CSS (Cascading Style Sheets): How the web is styled Create Rules that specify how the content of an HTML Element should appear. CSS controls how your web.
Review HTML  What is HTML?  HTML is a language for describing web pages.  HTML stands for Hyper Text Markup Language  HTML is not a programming language,
Basics of HTML.
© 2012 Adobe Systems Incorporated. All Rights Reserved. LEARNING THE LANGUAGE OF THE WEB INTRODUCTION TO HTML AND CSS.
XP Tutorial 7New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks.
CSS Style Rules Guang Tong, Zhan L;lo’p[ Css Style Rule Guang Tong Zhan Three ways to insert CSS 1 External style sheet 2 Internal style sheet 3 Inline.
DAT602 Database Application Development Lecture 14 HTML.
CS 299 – Web Programming and Design Introduction to HTML.
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
ACM 511 HTML Week -1 ACM 511 Course Notes. Books ACM 511 Course Notes.
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
Introduction To CSS.. HTML Review What is HTML used for? Give some examples of formatting tags in HTML? HTML is the most widely used language on the Web.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
Introduction to HTML. What is HTML? Hyper Text Markup Language (HTML) is a language for describing web pages. HTML is not a programming language, it is.
Cascading Style Sheets Orientation Learning Web Design: Chapter 11.
CSS Basic (cascading style sheets)
Css. Definition Cascading style sheet (CSS)  It is a simple mechanism for adding style (e.g. fonts, colors, spacing) to Web documents.
Cascading Style Sheets CSS. Source W3Schools
DYNAMIC HTML What is Dynamic HTML: HTML code that allow you to change/ specify the style of your web pages. Example: specify style sheet, object model.
Introduction to HTML Year 8. What is HTML O Hyper Text Mark-up Language O The language that all the elements of a web page are written in. O It describes.
Introduction to CSS Brendan Knight. What is CSS Cascading Style Sheets (CSS) is a style sheet language used to describe the presentation semantics (the.
CNIT 132 – Week 4 Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of.
CSS Cascading Style Sheets A very brief introduction CSS, Cascading Style Sheets1.
HTML A brief introduction HTML1. HTML, what is? HTML is a markup language for describing web documents (web pages). HTML stands for Hyper Text Markup.
WEEK -1 ACM 262 ACM 262 Course Notes. HTML What is HTML? HTML is a language for describing web pages. HTML stands for Hyper Text Markup Language HTML.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
Chapter 10 Dynamic HTML (DHTML) JavaScript, Third Edition.
HTML5 and CSS3 Illustrated Unit C: Getting Started with CSS.
HTML Tutorial. What is HTML HTML is a markup language for describing web documents (web pages) HTML documents are described by HTML tags Each HTML tag.
1 Introduction to HTML. 2 Definitions  W W W – World Wide Web.  HTML – HyperText Markup Language – The Language of Web Pages on the World Wide Web.
HTML5 and CSS3 Illustrated Unit B: Getting Started with HTML.
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
CSS Introductions. Objectives To take control of the appearance of a Web site by creating style sheets. To use a style sheet to give all the pages of.
WEB FOUNDATIONS CSS Overview. Outline  What is CSS  What does it do  Where are styles stored  Why use them  What is the cascade effect  CSS Syntax.
Working with Cascading Style Sheets
Week-12 (Lecture-1) Cascading Style Sheets (CSS): describe how documents are presented on screens. Types of Style Sheets: External Style Sheet - Define.
Web Basics: HTML/CSS/JavaScript What are they?
Getting Started with CSS
4.01 Cascading Style Sheets
Intro to CSS CS 1150 Fall 2016.
Website Design 3
Cascading Style Sheets - Building a stylesheet
Intro to CSS CS 1150 Spring 2017.
DHTML Javascript Internet Technology.
Web Programming A different world! Three main languages/tools No Java
>> Dynamic CSS Selectors
DHTML Javascript Internet Technology.
Cascading Style Sheets - Building a stylesheet
4.01 Cascading Style Sheets
Web Programming and Design
Web Programming and Design
HTML5 and CSS3 Illustrated Unit B: Getting Started with HTML
Presentation transcript:

COMPSCI 345 / SOFTENG 350 TUTORIAL WEEK 8 | SAM KAVANAGH

AGENDA  HTML Basics  CSS Basics  What is DHTML?  JavaScript Basics  What is the DOM?  Form Validation  Dynamically Changing Visibility  Exercise

HTML, CSS & JAVASCRIPT The three elements of modern web development HTML – Content & Structure CSS – Presentation JavaScript – Behaviour/functionality

HTML – HYPER TEXT MARKUP LANGUAGE HTML is a markup language used for describing web pages Markup languages are used to annotate documents in a way syntactically distinguishable from the text HTML, TeX/LaTeX, Wiki markup etc. HTML uses tags to differentiate between document content

HTML – HYPER TEXT MARKUP LANGUAGE CONT. The individual markup components are called HTML elements White space is ignored Written in ASCII / Unicode so can be edited by most text editors No support: NotePad Syntax highlighting: Notepad++ ( Auto complete: Free HTML Editor ( editor/) editor/ Comprehensive: Adobe Dreamweaver (  The standards for both HTML and CSS are maintained by W3C

OVERVIEW OF TAGS Markup achieved with tags Enclosed in angle brackets Generally come in pairs … For certain ‘void’ elements a closing tag is not required, e.g., In HTML5 the self-closing syntax is simply syntactical sugar, so and are also valid Tags must be correctly nested

CSS – CASCADING STYLE SHEETS CSS is used to control the style and layout of web pages Separates web page content from its design Used in conjunction with HTML HTML is used for describing the content of a web page, CSS is used for describing its presentation

CSS – CASCADING STYLE SHEETS CONT. Three ways to incorporate CSS: Inline – style included as the attribute of an HTML tag: Internal – CSS code is contained in the HTMLs head section: External – Code resides in a separate.css file, which is then referenced in the HTML:

CASCADE RULE When web documents load in a browser, declarations are sorted and given a weighting Declarations with the highest weight are give priority in case of a conflict E.g. an elements text colour is set to blue in the external style sheet, and then set to red using inline-styling

CSS SYNTAX CSS rule has two main parts: Selector: Determines what the rule applies to Usually the HTML element you want to style Declaration: Surrounded by curly braces { } and ends with a semicolon ; Property – the attribute you want to change Value – the value the property will be set to

EXERCISES Use the W3Schools try-it-yourself editor to try styling each of these properties W3Schools.com contains references and interactive tutorials on HTML, CSS, JavaScript and many other web technologies Background – Text – Fonts – Tables – Extra: Try and insert a new column ‘Middlename’ between the two If you can’t figure out how, try and locate the corresponding HTML table tutorial

FORM VALIDATION HTML5 gives you convenient types for form input Date, time, , password etc CSS pseudoclasses can be used to change the appearance of these elements based on whether the input is valid

DHTML What is DHTML? Not a language in itself Don’t write in DHTML markup language, or save in.DHTML file Simply techniques for combining several other technologies JavaScript CSS HTML Example uses Event detection (e.g. mouse-over) Pop-up windows Form validation Displaying/hiding elements

JAVASCRIPT JavaScript is a scripting language very broadly supported by browsers Used to add functionality to the otherwise mostly static pages that can be created with HTML + CSS Dynamically typed tag is used to indicate a block of JavaScript within HTML Not really anything to do with Java, though syntactically alike alert() pops up a dialog.write appends content to the specified HTML

THE DOCUMENT OBJECT MODEL (DOM) The HTML DOM is a standard object model and programming interface for HTML, it defines: The HTML elements as objects The properties of all HTML elements The methods to access all HTML elements The events for all HTML elements Tree structured Mostly accessed using JavaScript

REFERENCING THE DOM WITH JAVASCRIPT In the DOM, HTML elements are objects with properties and methods The id property value of individual elements can be set during their HTML declaration Using JavaScript, we can then refer to different elements in the document by passing this id to the getElementById() method HTML defines several properties such as onclick which allow you to specify events that will trigger JavaScript Like in other languages, JavaScript allows you to define your own functions

DYNAMICALLY CHANGING VISIBILITY WITH DOM Using the visibility CSS property of elements in combination with JavaScript we can dynamically change whether elements appear on a page In this example, the paragraph “myP” will disappear when the button is pressed

EXERCISE Using the techniques covered in this tutorial, create a web page with a single “Login” button When this button is pressed, have the web page display a login form which utilizes form validation

TUTORIAL LINKS W3Schools HTML: CSS: JavaScript: