Coding, Testing and Valdating a Web Page

Slides:



Advertisements
Similar presentations
HTML: HyperText Markup Language Hello World Welcome to the world!
Advertisements

Website Design.
Chapter 2 HTML Basics Key Concepts
ASHIMA KALRA.  WHAT IS HTML WHAT IS HTML  HTML TAGS HTML TAGS  FORMATTING TAGS FORMATTING TAGS.
HTML5 and CSS3 Illustrated Unit B: Getting Started with HTML
HTML: PART ONE. Creating an HTML Document  It is a good idea to plan out a web page before you start coding  Draw a planning sketch or create a sample.
Hypertext Markup Language (HTML) Created by Sarah Dooley & Amanda Foster Edited and presented by Caroline Hallam September 9, 2014.
Basics of HTML Shashanka Rao. Learning Objectives 1. HTML Overview 2. Head, Body, Title and Meta Elements 3.Heading, Paragraph Elements and Special Characters.
Basics of HTML.
Creating a Simple Page: HTML Overview
HTML history, Tags, Element. HTML: HyperText Markup Language Hello World Welcome to the world!
Learning Web Design: Chapter 4. HTML  Hypertext Markup Language (HTML)  Uses tags to tell the browser the start and end of a certain kind of formatting.
1.  Describe the anatomy of a web page  Format the body of a web page with block-level elements including headings, paragraphs, lists, and blockquotes.
Chapter 2 HTML Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
HTML INTRODUCTION, EDITORS, BASIC, ELEMENTS, ATTRIBUTES.
1. Short History Of HTML HTML was invented in 1990 by a scientist called Tim Berners-Lee. The purpose was to make it easier for scientists at different.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
A Basic Web Page. Chapter 2 Objectives HTML tags and elements Create a simple Web Page XHTML Line breaks and Paragraph divisions Basic HTML elements.
HTML Structure & syntax. Introduction This presentation introduces the following: Doctype declaration HTML Tags, Elements and Attributes Sections of a.
Web Development & Design Foundations with XHTML Chapter 2 HTML/XHTML Basics.
1 Web Application Programming Presented by: Mehwish Shafiq.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 2 Key Concepts 1 Copyright © Terry Felke-Morris.
Week 2: Building a Simple Website IMC 320 Web Publishing Spring 2011.
HTML Basics. HTML Coding HTML Hypertext markup language The code used to create web pages.
Objective: To describe the evolution of the Internet and the Web. Explain the need for web standards. Describe universal design. Identify benefits of accessible.
Lesson 2 – Unit B. Quick review 1. What is the name of the eGCC host that you ftp your files? 2. What type of software do you use to create and edit web.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
CSS IS A LANGUAGE DESIGNED TO TARGET HTML ELEMENTS AND NODES BY TYPE, CLASS, ID AND VALUE, AND CHANGE THEIR VALUES CSS – change how your HTML looks and.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 2 Key Concepts 1 Copyright © Terry Felke-Morris.
Tutorial #1 Using HTML to Create Web Pages. HTML, XHTML, and CSS HTML – HyperText Markup Language The tags the browser uses to define the content of the.
HTML5 and CSS3 Illustrated Unit B: Getting Started with HTML.
Blended HTML and CSS Fundamentals 3 rd EDITION Tutorial 1 Using HTML to Create Web Pages.
CONFIGURING COLOR AND TEXT WITH CSS Chapter 3. Cascading Style Sheets (CSS) Used to configure text, color, and page layout. Launched in 1996 Developed.
HTML Structure & syntax
HTML Extra Markup CS 1150 Spring 2017.
Introduction to HTML.
HTML Basics.
HTML5 Basics.
Section 4.1 Section 4.2 Format HTML tags Identify HTML guidelines
Web Development & Design Foundations with HTML5 8th Edition
Introduction to basic HTML
Web Development & Design Foundations with HTML5 8th Edition
HTML: HyperText Markup Language
Uppingham Community College
INTRODUCTION TO HTML AND CSS
XHTML Basics.
Web Development & Design Foundations with HTML5 8th Edition
Intro to Web Development Class A Review
HTML Robert McIntosh
HTML5 Level I Session II Chapter 2 - How to Code, Test and Validate a Web Page
XHTML Basics.
XHTML Basics.
Unit A.
Intro to Web Development HTML Structure
INTRODUCTION TO HTML AND CSS
Structuring Content in a Web Document
Introduction to HTML5.
HTML Basics Web.
ITI 133: HTML5 Desktop and Mobile Level I
XHTML Basics.
HTML5 Session II Chapter 2 - How to Code, Test and Validate a Web Page Chapter 3 - How to Use HTML to Structure a Web Page
How to code, test, and validate a web page
HTML: Pages and Tools.
HyperText Markup Language
The Most Basic HTML Page
XHTML Basics.
Basics of Web Design Chapter 2 HTML Basics Key Concepts
Lesson 2: HTML5 Coding.
Basics of Web Design Chapter 2 HTML Basics Key Concepts
HTML5 and CSS3 Illustrated Unit B: Getting Started with HTML
Presentation transcript:

Coding, Testing and Valdating a Web Page Chapter 2

Learning Outcomes Use a text editor like Notepad to create and edit HTML files. Test an HTML document that’s stored on your computer or a local server by loading it into a browser. Validate an HTML document using a website like W3C Markup Validation Service. Describe the use of the head and body elements in an HTML document. Describe the use of attributes within HTML tags. Describe the use of HTML comments and whitespace.

Our First HTML5 Web Page: index.html <!DOCTYPE html> <html lang="en"> <head> <title>Page Title Goes Here</title> <meta charset="utf-8"> </head> <body> <p>Hello World!</p> </body> </html>

HTML Basics Most HTML Elements consist of an opening and closing tag set <body> . . . </body> Some HTML Elements do not have a closing tag <br>, <img> Many HTML elements have Attributes consisting of the attribute name, an equal sign and the attribute value enclosed in quotes <html lang="en">, <meta charset="utf-8">

Basic Structure of an HTML5 document DOCTYPE declaration <!DOCTYPE html> <html lang="en"> <head> . </head> <body> </html> Head element Document tree Body element

Head & Body Sections Head Section Contains information that describes the web page document <head> …head section info goes here </head> Body Section Contains text and elements that display in the web page document <body> …body section info goes here </body>

HTML <title> and <meta> tags title and meta tags are coded between the opening and closing head tags <!DOCTYPE html> <html lang="en"> <head> <title>My First HTML5 Web Page</title> <meta charset="utf-8"> </head> <body> <p>Hello World</p> </body> </html>

Body element Everything you see in the browser window has to be in between the body opening and closing tags So, for this page all you will see is Hello World <!DOCTYPE html> <html lang="en"> <head> <title>My First HTML5 Web Page</title> <meta charset="utf-8"> </head> <body> <p>Hello World</p> </body> </html>

Semantic Tagging HTML tags are used to tag content according to the purpose of the content HTML tags are not used to tag content so that it looks a certain way Web Designers call this Semantic Tagging CSS will be used for all presentation  how the content looks or is formatted

Coding HTML Rules of Thumb Although you can code the HTML using lowercase, uppercase, or mixed case, we recommend that you do all coding in lowercase because it’s easier to read. Use whitespace to indent lines of code and make them easier to read.

Common HTML Coding Errors Forgetting to close an HTML element with a closing tag Misspelling tags names Misspelling attribute names Quotation marks that are not paired Incorrect file names and paths

display Property Display = block All HTML elements are either Inline or Block display elements Inline and Block define how an element is displayed in relation to other adjacent content Display = inline An inline element only takes up as much width as necessary, and does not force line breaks; displayed next to adjacent content. Display = block A block element is an element that takes up the full width available, and has a line break before and after it; displayed on separate line from adjacent content.

The Paragraph Element (block) <p> tag <p> …paragraph goes here… </p> Groups sentences and sections of text together. Configures empty space above and below the paragraph

Nesting elements Is is common practice to code elements nested inside each other as long as the interior nested elements are inline elements Correct Example: <p><strong>this is bold text</strong></p> Incorrect Example: <p><strong>this is bold text</p></strong> Never include block elements inside other block elements unless you are building a list, then the list item tags are always inside the list tags OR the outer element is a div tag

Writing Valid HTML Benefit: Check your code for syntax errors Valid code  more consistent browser display W3C HTML Validation Tool http://validator.w3.org Additional HTML5 Validation Tool http://html5.validator.nu

Home Page for the W3C HTML Validator

The errors and warning for an HTML file with a missing > at the end of the img element