The University of Tulsa

Slides:



Advertisements
Similar presentations
HTML and CSS. HTML Hyper Text Markup Language Tells browser how to display text and images.
Advertisements

CSS-Formatting Review Cascading Style Sheets addstyle to your HTML web pages.
Cascading Style Sheets
CSS The basics { }. CSS Cascading Style Sheets - language used to – describe html appearance & formatting Style Sheet - file that describes – how html.
/k/k 1212 Cascading Style Sheets Part one Marko Boon
Today CSS HTML A project.
Presenter: James Huang Date: Sept. 26,  Introduction  Basics  Lists  Links  Forms  CSS 2.
Murach's PHP and MySQL, C1© 2010, Mike Murach & Associates, Inc.Slide 1.
Slide 1 MIS3023 Professor: Akhilesh Bajaj The University of Tulsa.
Very quick intro HTML and CSS. Sample html A Web Title.
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.
Cascading Style Sheets By: Valerie Kuna. What are Cascading Style Sheets? Cascading Style Sheets (CSS) are a standard for specifying the presentation.
Advance CSS (Menu and Layout) Miftahul Huda. CSS Navigation MENU It's truly remarkable what can be achieved through CSS, especially with navigation menus.
CSS BASICS. CSS Rules Components of a CSS Rule  Selector: Part of the rule that targets an element to be styled  Declaration: Two or more parts: a.
Recognizing the Benefits of Using CSS 1. The Evolution of CSS CSS was developed to standardize display information CSS was slow to be supported by browsers.
1 Dreamweaver CS5 intermediate class by Cookie Setton Build a CSS website WITHOUT TABLES Just when you thought you were starting to understand HTML coding,
Cascade Style Sheet Demo. Cascading Style Sheets Cascading Style Sheets (CSS) is a simple mechanism for adding style (e.g., fonts, colors, spacing) to.
กระบวนวิชา CSS. What is CSS? CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to.
Class four: the box model and positioning. is an HTML tag which allows you to create an element out of inline text. It doesn’t mean anything! try it:
Unit 20 - Client Side Customisation of Web Pages
CSS normally control the html elements. Three Ways to Insert CSS There are three ways of inserting a style sheet: External style sheet Internal style.
Web Design with Cascading Style Sheet Lan Vu. Overview Introduction to CSS Designing CSS Using Visual Studio to create CSS Using template for web design.
CSS Basics LIS Webteam April 8, Why CSS? What’s wrong with HTML? Structure vs Style Early web design used hacks to style webpages with HTML – like.
Learning HTML. HTML Attributes HTML elements can have attributes Attributes provide additional information about an element Class – specifies a class.
Lecture 2 - HTML and CSS Review SFDV3011 – Advanced Web Development 1.
Chapter 1 Murach's JavaScript and jQuery, C1© 2012, Mike Murach & Associates, Inc.Slide 1.
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.
Creating Web Documents CSS examples (do more later) Lab/Homework: Read chapters 15 & 16. Work on Project 3, do postings.
CSS (Cascading Style Sheets). CSS CSS – Cascading Style Sheets – Cascade because of the way CSS rules can stack on top of each other. Allows you to add.
CONFIGURING COLOR AND TEXT WITH CSS Chapter 3. Cascading Style Sheets (CSS) Used to configure text, color, and page layout. Launched in 1996 Developed.
WebD Introduction to CSS By Manik Rastogi.
CSS.
CS3220 Web and Internet Programming CSS Basics
4.01 Cascading Style Sheets
( Cascading style sheet )
CSS Rule Selector Declaration Block Value Attribute Name body {
© 2017 Akhilesh Bajaj, All Rights Reserved
>> Introduction to CSS
>> CSS Rules Selection
© 2016, Mike Murach & Associates, Inc.
Introduction to Web programming
Cascading Style Sheets (Layout)
Cascading Style Sheets
Introduction to Web programming
TOPICS Chrome Dev Tools Process for Building a Static Website
CSS Borders and Margins.
Software Engineering for Internet Applications
>> Dynamic CSS Selectors
DynamicHTML Cascading Style Sheet Internet Technology.
Cascade Style Sheet Demo W3Schools. com: w3schools
HTML5 Level I Session I Chapter 1 - Introduction to Web Development
The Internet 10/6/11 Cascading Style Sheets
DynamicHTML Cascading Style Sheet Internet Technology.
Web Development & Design Foundations with H T M L 5
HTML and CSS MIS 2402 Jeremy Shafer Department of MIS
How to use the CSS box model for spacing, borders, and backgrounds
CS3220 Web and Internet Programming CSS Basics
Introduction to web development Murach's HTML and CSS, 4th Edition
Part 1: Cascading Style Sheets
How JavaScript and jQuery are used to enhance web pages
Basics of Web Design Chapter 10 Form Basics Key Concepts
Lecture Review What is a hybrid app? What does a UI framework do?
How to code, test, and validate a web page
CS3220 Web and Internet Programming CSS Basics
4.01 Cascading Style Sheets
Web Programming and Design
Introduction to Cascading Style Sheets (CSS)
Introduction to Styling
Cascade Style Sheet Demo W3Schools. com: w3schools
© 2017, Mike Murach & Associates, Inc.
Presentation transcript:

The University of Tulsa Introduction to HTML5/CSS3 and JavaScript Akhilesh Bajaj The University of Tulsa © 2017, 2018 Akhilesh Bajaj, All Rights Reserved

A static web page (index.html)

How a web server processes a static web page

How JavaScript fits into this architecture Murach's JavaScript (2nd Ed.), C1 © 2015, Mike Murach & Associates, Inc.

A dynamic web page at amazon.com

How a web server processes a dynamic web page SQL PHP

An HTML file (index.html) in a browser with no CSS applied to it HTML represents the content shown, not HOW it is shown CSS = Cascading Style Sheets, control the appearance Or HOW the content is shown

The code for the HTML file named index.html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Join Email List</title> <link rel="stylesheet" href="email_list.css"> <script src="email_list.js"></script> </head> <body> <main> <h1>Please join our email list</h1> <form id="email_form" name="email_form" action="join.html" onsubmit="return validateEmailForm()" method="get"> <label for="email_address1">Email Address:</label> <input type="email" id="email_address1" name="email_address1" required> <span id="email_address1_error" class = "blue">*</span> <br> <label for="email_address2">Re-enter Email Address:</label> <input type="email" id="email_address2" name="email_address2" title="Re-Enter the same address“ placeholder="Re-enter the address" required> <span id="email_address2_error" class = "blue">*</span> <label for="first_name">First Name:</label> <input type="text" id="first_name" name="first_name" required> <span id="first_name_error" class = "green">*</span> <label for="birth_date">Birth Date:</label> <input type="date" id="birth_date" name="birth_date" required> <span id="birth_date_error" class = "green">*</span> <label for="color_choice">Select Color:</label> <input type="color" id = "color_choice" value="#00FF00"> <label> </label> <input type="submit" id="join_list" value="Join our List"> <input type="reset" id = "reset_list" name = "reset_list"> </form> </main> </body> </html>

The CSS File called email_list.css body { font-family: Arial, Helvetica, sans-serif; background-color: white; margin: 0 auto; width: 670px; border: 5px solid green; padding: 0 2em 1em; } h1 { color: gray; margin-bottom: .5em; label { float: left; width: 11em; text-align: right; input { margin-left: 1em; input[text]{ border-style: groove; span { color: red; /* #first_name_error { color:green; */ .green{ .blue{ color:blue; .big { font-size:300%;

The code for the JavaScript file email_list.js var $ = function(id) { return document.getElementById(id); }; var validateEmailForm = function() { var emailAddress1 = $("email_address1").value; var emailAddress2 = $("email_address2").value; //DEBUG alert("value of email address 1 is "+ emailAddress1); //DEBUG alert("value of email address 2 is "+ emailAddress2); $("email_address1_error").firstChild.nodeValue = ""; $("email_address2_error").firstChild.nodeValue = ""; $("first_name_error").firstChild.nodeValue = ""; if (emailAddress1 !== emailAddress2) { $("email_address2_error").firstChild.nodeValue = "This entry must equal first entry."; return false; } return true; window.onload = function() { $("email_address1").focus(); InClass: Play with the CSS file so that email fields are separated from others

HTML div and span elements <div> elements are generic block elements that are given an ID and/or a class, so they can be referenced in the CSS and javascript code <span> elements are generic inline elements that are also given an ID or a class, for the same reasons.

The primary HTML5 semantic elements or Tags A page that’s structured with HTML5 elements

The HTML in a web browser Murach's JavaScript (2nd Ed.), C1 © 2015, Mike Murach & Associates, Inc.

The basic HTML attributes HTML that uses these attributes

HTML that can be selected by type, id, or class Murach's JavaScript (2nd Ed.), C1 © 2015, Mike Murach & Associates, Inc.

CSS rule sets that select by type, id, and class Murach's JavaScript (2nd Ed.), C1 © 2015, Mike Murach & Associates, Inc.

The HTML elements in a browser Murach's JavaScript (2nd Ed.), C1 © 2015, Mike Murach & Associates, Inc.

Two ways to provide styles Murach's JavaScript (2nd Ed.), C1 © 2015, Mike Murach & Associates, Inc.

A head element that includes two style sheets Murach's JavaScript (2nd Ed.), C1 © 2015, Mike Murach & Associates, Inc.

The URL for downloading the normalize.css style sheet Murach's JavaScript (2nd Ed.), C1 © 2015, Mike Murach & Associates, Inc.

In Class Assignment Create an Interactive Web Application that allows the user to input -Sales Price(> 0) & Sales tax Percent(between 0.01 and 99.99) & Shipping charges (>0) It displays the Sales Tax and the Total Price. Use HTML5 fields for error checking, CSS for a professional look and JavaScript for the calculations.