HTML, CSS, JavaScript

Similar documents
11/11/13. HW7: Creativity in Processing. In Processing: JavaScript Mode. Encoding Information: There s more! Basics of HTML #1.

11/13/12. HW9: Creativity in Processing. In Processing: File Export. Encoding Information: There s more! HTML and the Web.

Web Programming HTML CSS JavaScript Step by step Exercises Hans-Petter Halvorsen

CSS how to display to solve a problem External Style Sheets CSS files

Needles in the Haystack: Google and Other Brokers in the Bits Bazaar. Derived from Blown To Bits Chapter 4 with the same Atle

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

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

INTRODUCTION TO WEB USING HTML What is HTML?

CSC 121 Computers and Scientific Thinking

CMPT 165 Unit 2 Markup Part 2

Web Engineering (Lecture 01)

A Balanced Introduction to Computer Science, 3/E

How the Internet Works

Introduction to HTML

HTML (Hypertext Mark-up language) Basic Coding

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

What is CSS? NAME: INSERT OPENING GRAPHIC HERE:

Desire2Learn: HTML Basics

HTML Hyperlinks (Links)

Tutorial. Activities. Code o o. Editor: Notepad Focus : Text manipulation & webpage skeleton. Open Notepad

What is a web site? Web editors Introduction to HTML (Hyper Text Markup Language)

c122jan2714.notebook January 27, 2014

Content Management System User Training

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

11. HTML5 and Future Web Application

HTML & XHTML Tag Quick Reference

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

What You Will Learn Today

INFORMATICA GENERALE 2014/2015 LINGUAGGI DI MARKUP CSS

Markup Language SGML: Standard Generalized Markup Language. HyperText Markup Language (HTML) extensible Markup Language (XML) TeX LaTeX

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

CITS1231 Web Technologies. Introduction to Cascading Style Sheets

MPT Web Design. Week 1: Introduction to HTML and Web Design

AP CS P. Unit 2. Introduction to HTML and CSS

Programmazione Web a.a. 2017/2018 HTML5

Web Publishing with HTML

Html basics Course Outline

Tutorial 2 - HTML basics

Web Programming and Design. MPT Senior Cycle Tutor: Tamara Week 1

CSC Web Programming. Introduction to HTML

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

introduction to XHTML

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

Web Designing HTML5 NOTES

Management Information Systems

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

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

HTML and CSS: An Introduction

Certified HTML5 Developer VS-1029

Chapter 4. Introduction to XHTML: Part 1

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

HTML OBJECTIVES WHAT IS HTML? BY FAITH BRENNER AN INTRODUCTION

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

CSCE 101. Creating Web Pages with HTML5 Applying style with CSS

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

Introduction to Computer Science (I1100) Internet. Chapter 7

TEST NAME: MMWD 4.01 TEST ID: GRADE:09 - Ninth Grade Twelfth Grade SUBJECT:Computer and Information Sciences TEST CATEGORY: My Classroom

HTML, CSS. Kristóf Kovács, Róbert Pálovics, Ferenc Wettl Kristóf Kovács, Róbert Pálovics, Ferenc Wettl HTML, CSS / 28

Basic Web Pages with XHTML (and a bit of CSS) CSE 190 M (Web Programming), Spring 2008 University of Washington Reading: Chapter 1, sections

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

CASCADING STYLE SHEET CSS

HTML. Based mostly on

UI development for the Web.! slides by Anastasia Bezerianos

Introduction, Notepad++, File Structure, 9 Tags, Hyperlinks 1

HTML Text Formatting. HTML Session 2 2

CSS CSS how to display to solve a problem External Style Sheets CSS files CSS Syntax

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

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

BASICS OF WEB DESIGN CHAPTER 2 HTML BASICS KEY CONCEPTS

Hyper Text Markup Language HTML: A Tutorial

Training Sister Hicks

Bridges To Computing

Basic CSS Lecture 17

Your Own Web Page; Quick and Dirty Via Mashup Reminder: Next Quiz on 4/15

CS 350 COMPUTER/HUMAN INTERACTION. Lecture 6

CREATING A WEBSITE USING CSS. Mrs. Procopio CTEC6 MYP1

Introduction to using HTML to design webpages

CS134 Web Site Design & Development. Quiz1

CS144 Notes: Web Standards

Web Programming Week 2 Semester Byron Fisher 2018

Web Technologies - by G. Sreenivasulu Handout - 1 UNIT - I

CSCB20 Week 7. Introduction to Database and Web Application Programming. Anna Bretscher Winter 2017

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

1.264 Lecture 12. HTML Introduction to FrontPage

CSCB20 Week 6. Introduction to Database and Web Application Programming. Anna Bretscher Winter 2016

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

Make a Website. A complex guide to building a website through continuing the fundamentals of HTML & CSS. Created by Michael Parekh 1

Downloads: Google Chrome Browser (Free) - Adobe Brackets (Free) -

Scripting for Multimedia LECTURE 5: INTRODUCING CSS3

UNIX and Operating System Topics

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

With HTML you can create your own Web site. This tutorial teaches you everything about HTML.

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

Syllabus - July to Sept

LING 408/508: Computational Techniques for Linguists. Lecture 14

Introduction to HTML & CSS. Instructor: Beck Johnson Week 2

HTML Tags <A></A> <A HREF=" CNN </A> HREF

Lab 4 CSS CISC1600, Spring 2012

Comp-206 : Introduction to Software Systems Lecture 23. Alexandre Denault Computer Science McGill University Fall 2006

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

Transcription:

HTML, CSS, JavaScript

Encoding Information: There s more! Bits and bytes encode the information, but that s not all Tags encode format and some structure in word processors Tags encode format and some structure in HTML Tags are one form of meta-data Meta-data is information about information

HTML and the Web The Web uses http:// protocol Its asking for a Web page, which usually means a page expressed in hyper-text markup language, or HTML Hyper-text refers to text containing LINKS that allow you to leave the linear stream of text, see something else, and return to the place you left Markup language is a notation to describe how a published document is supposed to look: what kinds of fonts, text color, headings, images, etc. 3

Basics of HTML #1 Rule 1: Content is given directly; anything that is not content is given inside of tags Rule 2: Tags made of < and > and used this way: Attribute&Value <p style="color:red">this is paragraph.</p> Start Content End Tag Tag It produces: This is paragraph. Rule 3: Tags must be paired or self terminated 11/19/17 4

There are great resources out there http://www.w3schools.com/ html/default.asp

There are great resources out there http://www.w3schools.com/html/tryit.asp? filename=tryhtml_intro Let s do it.

Example Write HTML in text editor: notepad++ or TextWrangler The file extension is.html; show it in Firefox or your browser 7

Example: myfirst.html 8

Basics of HTML #2 Rule 4: An HTML file has this structure: <html> <head><title>name of Page</title></head> <body> </body> </html> Actual HTML page description goes here Rule 5: Tags must be properly nested Rule 6: White space is mostly ignored Rule 7: Attributes (style="color:red") preceded by space, name not quoted, value quoted 11/19/17 9

Basics of HTML #3 To put in an image (.gif,.jpg,.png), use 1 tag <img src= cat.jpg" alt= Cat with surprised face"/> Tag Image Source Alt Description End To put in a link, use 2 tags <a href= http://users.soe.ucsc.edu/~dustinadams >Dustin s page</a> Hyper-text reference the link Anchor End More on HTML (including good tutorials) at http://www.w3schools.com/html/default.asp 11/19/17 2011 Larry Snyder, CSE 10

HTML Cheat Sheet: http://www.simplehtmlguide.com/cheatsheet.php Basic Tags <html></html> Creates an HTML document <head></head> Sets off the title and other information that isn t displayed on the web page its <body></body> Sets off the visible portion of the document Body Attributes <body style="background-color:pink"> Sets the background color, using name or hex value <body style="color:black"> Sets the text color, using name or hex value Text Tags <hl></hl> Creates the largest headline <h6></h6> Creates the smallest headline <b></b> Creates bold text <i></i> Creates italic text <tt></tt> Creates teletype, or typewriter-style text <em></em> Emphasizes a word (with italic or bold) <strong></strong> Emphasizes a word (with italic or bold) Links <a href="url"></a> Creates a hyperlink; anchor between tags <a href="url"><img src="url"> </a> Creates hyperlink with image anchor Formatting <p></p> Creates a new paragraph <p style="text-align:left"></p>aligns a paragraph to the left (default), right, or center. <br/> Inserts a line break <blockquote></blockquote> Indents text from both sides <hr /> Inserts a horizontal rule <hr size="3" /> Sets size (height) of rule <hr width="80%" /> Sets width of rule, in percentage or absolute value Lists <dl></dl> Creates a definition list

Which does not apply to HTML? A. It is the language used for the web browser and the web server to communicate over the Internet. B. It is the language used to express how a document should be displayed. C. It is a language that allows for documents to be created that are not linear. (A book with chapters is linear you normally read from start to end in order.) D. All of A-C apply to HTML.

CSS separating style from content Lawrence Snyder 2004

Content vs Style <h1>this is a heading</h1> <em>emphasize this</em> <b>make this bold face</b> <p style="color:red">this is paragraph is red.</p>

From http://www.w3schools.com/css/css_syntax.asp

Adding CSS to your html file <!DOCTYPE html> <html><head> <style> p {color:red;text-align:center;} body {background-image:url( cat.jpg");} </style> </head> <body> <p>hello World!</p> <p>this paragraph is styled with CSS.</p> </body></html>

Using an external CSS <!DOCTYPE html> <html><head> <link rel="stylesheet" type="text/css" href="mystyle.css"> </head> <body> <p>hello World!</p> <p>this paragraph is styled with CSS.</p> </body></html>

mystyle.css p {color:red;text-align:center;} body {background-image:url( cat.jpg");}

Using inline style annotations <!DOCTYPE html> <html><head> </head> <body> <p>hello World!</p> <p style="color:red;text-align:center;">this paragraph is styled with CSS.</p> </body></html>

A. css allows you to separate the specific formatting information from the main body of the document. B. css allows you to change how a lot of html documents will be displayed by changing just a single file C. A & B D. neither A nor B

JavaScript Lawrence Snyder 2004

Puts code right in the web page Syntax similar to Java Has its own set of predefined functions you need to discover. How do we put it in the web page?

<!DOCTYPE html> <html> <head> <script> function myfunction() { document.getelementbyid("demo").innerhtml="goodbye"; } </script> </head> <body> <h1>my Web Page</h1> <p id="demo">hello!</p> <button type="button" onclick="myfunction()">click Me!</button> </body> </html>

<!DOCTYPE html> <html> <body> <h1>my Web Page</h1> <p id="demo">hello!</p> <button type="button" onclick="myfunction()">click Me!</button> <p><strong>note:</strong> myfunction is stored in an external file called "goodbye.js".</p> <script src="goodbye.js"></script> </body> </html>

goodbye.js function myfunction() { document.getelementbyid("demo").innerhtml="goodbye!"; }

<!DOCTYPE html><html><body> <!-- From http://www.w3schools.com/js/tryit.asp?filename=tryjs_ifthenelse --> <p>click the button to get a time-based greeting.</p> <button onclick="myfunction()">try it</button> <p id="demo"></p> <script> function myfunction() { var x=""; var time=new Date().getHours(); if (time<20) { x="good day"; } else { x="good evening"; } document.getelementbyid("demo").innerhtml=x; } </script>

What are you supposed to learn? HTML let s you programmatically indicate how a particular content should be displayed. It can be served up by any HTTP server anywhere in the world. CSS lets you partially separate content from presentation JavaScript puts full power of computing in a web page