CGS 3066: Lecture 2 Web Development and HTML5

Slides:



Advertisements
Similar presentations
Table, List, Blocks, Inline Style
Advertisements

HTML popo.
HyperText Markup Language (HTML). Introduction to HTML Hyper Text Markup Language HTML Example The structure of an HTML document Agenda.
HTML: HyperText Markup Language Hello World Welcome to the world!
INTRODUCTION TO HYPERTEXT MARKUP LANGUAGE 1. Outline  Introduction  Markup Languages  Editing HTML  Common Tags  Headers  Text Styling  Linking.
MR.Mohammed Sharaf al Shareef
 2008 Pearson Education, Inc. All rights reserved. 1 Introduction to HTML.
CpSc 462/662: Database Management Systems (DBMS) (TEXNH Approach) HTML Basics James Wang.
HTML. What is HTML? HTML is a language for describing web pages. HTML stands for Hyper Text Markup Language HTML is a markup language A markup language.
HTML HTML stands for "Hyper Text Mark-up Language“. Technically, HTML is not a programming language, but rather a markup language. Used to create web pages.
HTML history, Tags, Element. HTML: HyperText Markup Language Hello World Welcome to the world!
 2002 Prentice Hall, Inc. All rights reserved.2 Chapter 2 — Introduction to HyperText Markup Language 4: Part I Outline 2.1Introduction 2.2Markup Languages.
1 CSC 121 Computers and Scientific Thinking David Reed Creighton University HTML and Web Pages.
CHAPTER 1 HTML & HTML5 I อ. ยืนยง กันทะเนตร คณะเทคโนโลยีสารสนเทศและการสื่อสาร มหาวิทยาลัยพะเยา 1.
Introduction to HTML. What is a HTML File?  HTML stands for Hyper Text Markup Language  An HTML file is a text file containing small markup tags  The.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
CS105 INTRODUCTION TO COMPUTER CONCEPTS HTML Instructor: Cuong (Charlie) Pham.
HTML: Hyptertext Markup Language Doman’s Sections.
Ali Alshowaish. What is HTML? HTML stands for Hyper Text Markup Language Specifically created to make World Wide Web pages Web authoring software language.
Introduction to HTML Xiangming Mu 9/23/ Learning Objectives Understand basic HTML tags and their attributes Learn to create a simple HTML page.
LEARNING HTML PowerPoint #1 Cyrus Saadat, Webmaster.
HTML HyperText Markup Language ©Richard L. Goldman July 15, 2003.
HTML Basics. HTML Coding HTML Hypertext markup language The code used to create web pages.
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.
XP Review 1 New Perspectives on JavaScript, Comprehensive1 Introducing HTML and XHTML Creating Web Pages with 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, it is a markup.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
1999, COMPUTER SCIENCE, BUU Introduction to HTML Seree Chinodom
INT222 – Internet Fundamentals
01 – HTML (1) Informatics Department Parahyangan Catholic University.
NOTEPAD++ Lab 1 1 Riham ALSmari. Why Notepad++ ?  Syntax highlighting  Tabbed document interface  Zooming  Indentation code  Find and replace over.
HTML Structure & syntax
Fall 2016 CSULA Saloni Chacha
Introduction to HTML.
HTML Basics.
CGS 3066: Lecture 2 Web Development and HTML5
Web Development Part 1.
BHS Web Design Mr. Campbell
Web Development & Design Foundations with HTML5 8th Edition
LAB Work 01 MBA 61062: E-Commerce
Marking Up with XHTML Tags describe how a web page should look
Lecturer (Dept. of Computer Science)
Elements of HTML Web Design – Sec 3-2
HTML: HyperText Markup Language
Elements of HTML Web Design – Sec 3-2
HTML5 – Heading, Paragraph
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
CGS 3066: Web Programming and Design Spring 2016
Chapter 1: Introduction to XHTML (part 1)
Elements of HTML Web Design – Sec 3-2
Internet & Web Engineering Course Code:CS-228 Credit Hours (3+1) Lab 1 Introduction to Markup Language HTML Instructor: Muhammad Zeeshan Haider.
Web Programming– UFCFB Lecture 5
COMPUTING FUNDAMENTALS
HTML (HyperText Markup Language)
Computers and Scientific Thinking David Reed, Creighton University
Marking Up with XHTML Tags describe how a web page should look
Marking Up with XHTML Tags describe how a web page should look
1 Introduction to XHTML.
Introduction to XHTML Cont:.
Html.
Introduction to HTML.
Understand basic HTML and CSS terminology, concepts, and basic operations. Objective 3.01.
Marking Up with XHTML Tags describe how a web page should look
HTML Basics Mr. Fazzalari.
Marking Up with XHTML Tags describe how a web page should look
Lesson 2: HTML5 Coding.
Web Client Side Technologies Raneem Qaddoura
Marking Up with XHTML Tags describe how a web page should look
CGS 3066: Web Programming and Design Fall 2019
Presentation transcript:

CGS 3066: Lecture 2 Web Development and HTML5 1/7/2015 Image source : amplifymm.com

What’s HTML? HTML is a markup language. It tells the web browser what content to display. Separates content from presentation. Uses a pre-defined set of elements to identify content types. Elements contain one or more "tags“. Tags are surrounded by angle brackets, and the "closing" tag is prefixed by a forward slash. 1/7/2015

HTML Page Structure <html> <head> <title>Hello World </title> </head> <body> <p>Welcome to the World </p> </body> </html>

Tree structure of HTML html head body title p

History of HTML In the late 1980s, Tim Berners-Lee, a physicist at CERN devised a way of sharing documents over the internet. Contains only text. HTML+, defined by Marc Andreeseen and Eric Bina, in 1993. Can display images and play video and sounds. From 1993 to 1997, HTML was being defined by the elements that browser software developers chose to implement. The “War” Years

HTML4 The push for standards began after the war years. In particular, the W3C attempted to clean up the definition of HTML. HTML4 is defined in 1999. It can display a variety of content including text, images, music and movies, and animations. Fairly standardized.

HTML5 The new standard for HTML was defined in 2012. Called HTML 5. It is cross-platform. It will display content on a desktop computer, laptop, a tablet, smartphone, a notebook or a Smart TV. All major browsers support most of the HTML5 elements.

<!DOCTYPE> Tells browser which HTML standard to expect. Must appear first in the HTML document. HTML5 has a very simple <!DOCTYPE> element. <!DOCTYPE html> HTML4 <!DOCTYPE> element <!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>

Basics of HTML5 Every HTML document (web page) consists of tags and character data. Tags are elements enclosed in angle brackets. <html>, <body>, <a> </a> </body>, </html>, Opening and ending tags must be used together. Character data is the content between an opening and closing tag. <title>Hello World</title>

HTML Element An element is a combination of a tag and its character data. <title>Hello World</title> <body><p>Welcome to the world></p></body> <a href=“www.google.com”> Google </a> <br/>

HTML Element It is possible to nest elements inside other elements. It is possible to have empty element (no content/character data). HTML tags are not case sensitive. <A> and <a> are the same. By convention, tags are written in lowercase. Better use <html>, <body>, <title>, <p>, </html> Not <HTML>, <BODY>, <TITLE>, <P>, </HTML>

Attributes Attributes provide information about HTML elements. An element can have one or more attributes. id class style href Attributes come in name/value pairs. <a href=“www.google.com”>Go to Google’s website</a>

Attributes Some attributes can be used on any HTML element: class: specifies one or more classnames for an element (refers to a class in a style sheet). id: specifies a unique id for an element. style: specifies an inline CSS style for an element. title: specifies extra information about an element.

Headings Heading are used to show the document structure. <h1>, <h2>, <h3>, <h4>, <h5>, <h6> <h1> defines the most important heading and <h6> defines the least important heading. Browsers automatically add some empty space before and after each heading.

Comment Comments can be added into the HTML code to make it readable and understandable. Browsers will not display any comments. Syntax: <!-- --> E.g., <!-- This is my comment -->

Paragraph Paragraphs are defined with the <p> tag. <p> can have many attributes. <p style=“ ”> Line Break: <br> Use <br> if you want a new line without starting a new paragraph.

Formatting You cannot change the output by adding extra spaces or lines in HTML code. The browser will ignore whitespace. New horizontal line: <hr> New Line tag: <br> Whitespace: &nbsp There are a variety of ways to introduce tab spacing, most of them using CSS.

Special formatting tags Certain text usually has a conventional formatting, HTML has a few special formatting tags, usueful especially for computer code. <pre> - for preformatted text. Forces the browser to render white space as-is. <kbd> - for specifying keyboard input. <samp> - for specifying console output. <code> - for specifying computer code. Monotype font. Ignores whitespace.

Text Formatting Use tags for formatting output. A list of formatting tags: <b>: defines bold text <i>: defines italic text <sub>: defines subscripted text <sup>: defines superscripted text <mark>: defines marked/highlighted text

Hyperlink The <a> tag defines hyperlink. A hyperlink is a word, group of words, or image that you can click on to jump to another web page. The href is the most important attribute, which indicates the link’s destination. E.g., <a href=“http://www.google.com”>Go To Google </a> The target attribute specifies where to open the linked document. _blank: in a new window or tab _self: in the same frame as it was clicked (default)

Images <img> tag is always an empty tag. It contains attributes and has no closing tag. You need to use the src attribute. The value of this attribute is the URL of the image. Syntax: <img src=“sampleImage.JPEG” alt=“hint”> alt defines the text for an image when the image cannot be displayed. The width and height attributes define the size of the image.

HTML Table Element A table consists of rows <tr>. Each row is divided into data cells <td> (td stands for table data) A <td> tag can contain text, links, images, lists, forms, and other tables.

Table Example <table> <tr> <td>row 1, cell 1</td> <td>row 2, cell 2</td> </tr> <td>row 2, cell 1</td> </table>

Table Border Attribute By default, the table will be displayed without borders. If you want borders, specify the border attribute: <table border=“1”> … </table>

Table Headers <tr> <th>header 1</th>

HTML Lists Lists can be ordered and unordered. An unordered list starts with the <ul> tag. An ordered list starts with the <ol> tag. Each item starts with the <li> tag. Example: <ul> <li>Red</li> <li>Yellow</li> </ul>

Description List A description list is a list of items with a description of each term/name. The <dl> tag defines a description list. <dl> is used with <dt> (defines items) and <dd> (describes each item). Example: <dl> <dt>Coffee</dt> <dd>- a hot beverage, gift for programmers.</dd> </dl>

HTML List Tags <ol>: defines an ordered list. <ul>: defines an unordered list. <li>: defines a list item. <dl>: defines a description list. <dt>: defines an item in a description list. <dd>: defines a description of an item in a description list.

Block and Inline Elements HTML elements are either block level elements or inline elements. Block level Elements start with a new line. E.g., <p>, <table>, <div> Inline elements are displayed without a new line. E.g., <b>, <td>, <a>, <img>

<span> element <span> element is an inline element that can be used as a container for text. <span> element usually is used to set style to parts of the text. <p>My mother has <span style="color:blue">blue</span> eyes.</p>

DIV tag The <div> tag defines a division or a section in an HTML document. The <div> tag is used to group block-elements to format them with CSS. <div > <h3>This is a heading in a div element</h3> <p>This is some text in a div element.</p> </div>