LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE HTML and CSS 8th Edition Chapter 1: Webpage Building Blocks.

Slides:



Advertisements
Similar presentations
HTML Basics Customizing your site using the basics of HTML.
Advertisements

Website Design.
XHTML Basics.
1. Content – Collective term for all text, images, videos, etc. that you want to deliver to your audience. 2. Structure – How the content is placed on.
MMDE5011 – INTERACTIVE MEDIA PRACTICE 1 WEEK 1: INTRODUCTION TO HTML5
How Tags are used to form your Web Page
Hypertext Markup Language. Platform: - Independent  This means it can be interpreted on any computer regardless of the hardware or operating system.
INTRO TO WEB DEVELOPMENT
Chapter 2 Introduction to HTML5 Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
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.
Introducing HTML & XHTML:. Goals  Understand hyperlinking  Understand how tags are formed and used.  Understand HTML as a markup language  Understand.
Using Cascading Style Sheets (CSS) Dept. of Computer Science and Computer Information CSCI N-100.
LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE HTML and CSS 8th Edition Chapter 2: Working with Webpage Files.
Creating a Simple Page: HTML Overview
Internet Skills An Introduction to HTML Alan Noble Room 504 Tel: (44562 internal)
Online Chapter 1 4 th Edition.  Review elements  Whitespace handling  Rule structure  Linking to an external style sheet  Alternate Style Sheets.
Shows the entire path to the file, including the scheme, server name, the complete path, and the file name itself. Same idea of stating your full name,
Mohammed Mohsen Links Links are what make the World Wide Web web-like one document on the Web can link to several other documents, and those.
HTML (HyperText Markup Language)
.  Entertain  Inform  Educate  Blogs  Sell  Date  Gamble  Religion.
Programming in HTML.  Programming Language  Used to design/create web pages  Hyper Text Markup Language  Markup Language  Series of Markup tags 
Chapter 1 XHTML: Part I The Web Warrior Guide to Web Design Technologies.
Using Html Basics, Text and Links. Objectives  Develop a web page using HTML codes according to specifications and verify that it works prior to submitting.
XHTML1 Building Document Structure Chapter 2. XHTML2 Objectives In this chapter, you will: Learn how to create Extensible Hypertext Markup Language (XHTML)
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.
Chapter 2 HTML Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
Programming in HTML.  Programming Language  Used to design/create web pages  Hyper Text Markup Language  Markup Language  Series of Markup tags 
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE HTML and CSS 8th Edition Chapter 6: Links.
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.
INTRODUCTION. What is HTML? HTML is a language for describing web pages. HTML stands for Hyper Text Markup Language HTML is not a programming language,
Unit 2, cont. September 12 More HTML. Attributes Some tags are modifiable with attributes This changes the way a tag behaves Modifying a tag requires.
HTML: Hyptertext Markup Language Doman’s Sections.
4 Chapter Four Introduction to HTML. 4 Chapter Objectives Learn basic HTML commands Discover how to display graphic image objects in Web pages Create.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 2 Key Concepts 1 Copyright © Terry Felke-Morris.
LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE HTML and CSS 8th Edition Chapter 8: Working with Style Sheets.
2.1 XHTML. Motto High thoughts must have high language. –Aristophanes.
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.
Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley What did we learn so far? 1.Computer hardware and software 2.Computer experience.
CSS THE MISSING MANUAL Introduction. Benefits of CSS Style sheets offer more formatting choices than are offered in straight HTML  EXAMPLE: When you.
IN THIS LESSON, WE WILL BECOME FAMILIAR WITH HTML AND BEGIN CREATING A WEB PAGE IN YOUR COMPUTER HTML – the foundation.
CHAPTER TWO HTML TAGS. 1.Basic HTML Tags 1.1 HTML: Hypertext Markup Language  HTML stands for Hypertext Markup Language.  It is the markup language.
`. Lecture Overview HTML Body Elements Linking techniques HyperText references Linking images Linking to locations on a page Linking to a fragment on.
XP 2 HTML Tutorial 1: Developing a Basic Web Page.
Creating Your 1 st Web Page. Tags Refers to anything between on a webpage Most appear in pairs surrounding content Some appear as empty tags (no closing.
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.
IN THIS LESSON, WE WILL BECOME FAMILIAR WITH HTML AND BEGIN CREATING A WEB PAGE IN YOUR COMPUTER HTML – the foundation.
Basic HTML Page 1. First Open Windows Notepad to type your HTML code 2.
NOTEPAD++ Lab 1 1 Riham ALSmari. Why Notepad++ ?  Syntax highlighting  Tabbed document interface  Zooming  Indentation code  Find and replace over.
HTML Structure & syntax
Intro to HTML CS 1150 Spring 2017.
HTML CS 4640 Programming Languages for Web Applications
Web Architecture & HTML
HTML5 Basics.
Objective % Select and utilize tools to design and develop websites.
Intro to HTML CS 1150 Fall 2016.
Coding, Testing and Valdating a Web Page
XHTML Basics.
AN INTRODUCTORY LESSON TO MAKING A SIMPLE WEB PAGE By: RC Emily Solis
Objective % Select and utilize tools to design and develop websites.
XHTML Basics.
XHTML Basics.
XHTML Basics.
The Most Basic HTML Page
XHTML Basics.
Lesson 2: HTML5 Coding.
5.00 Apply procedures to organize content by using Dreamweaver. (22%)
HTML CS 4640 Programming Languages for Web Applications
Presentation transcript:

LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE HTML and CSS 8th Edition Chapter 1: Webpage Building Blocks

LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE Objectives Identify the basic building blocks of HTML webpages. Distinguish the different parts of HTML markup. Define best practices for building effective websites. Explain best practices for writing HTML. Mark up content with semantic HTML. Improve site accessibility and efficiency using semantic HTML. Explain CSS's role in HTML presentation. Create proper file and folder names.

LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE Webpage Building Blocks A webpage has three main components: –Text content: The bare text that appears on the page. –References to other files: Loads images, video, and audio files, as well as CSS style sheets to control page’s appearance, and JavaScript files that add special behavior to your page. Also links to other HTML pages and assets. –Markup: The HTML elements that describe your text content and make the references work. All three components are text-based, saved in text- only format. Page also includes HTML information about the page itself for browsers and search engines.

LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE Thinking in HTML When writing HTML, you describe your webpage’s content using pre-defined element tags. Examples of predefined elements: –The p element is for paragraphs. –The abbr element is for abbreviations. –The li element is for list items. HTML elements describe what your content is, not how it looks. CSS controls your content’s appearance.

LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE A Basic HTML Page Foundations of a page: –Every webpage begins with the DOCTYPE declaration. –It also includes the html, head, and body elements. –Language code assigned to lang and text between and are both customizable parts of page shell. –Equivalent of a blank sheet of paper. HTML tag structure: –Uses to enclose each HTML tag. –Start tag: marks the beginning of an element. –End tag: marks its end. A few elements, like meta, don’t have an end tag.

LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE The Top and Head of a Webpage Everything above the start tag is instructional information for browsers and search engines: – tells browsers that it is an HTML5 page. Always make it the first line. –html element encloses the rest of the page between and the end tag. –lang="en” indicates English is the page’s default language. –Document head is the area between and. –Title is the text between and. Only part above the body visible to users, displaying on the browser tab, at the very top of the browser window, and typically as the default name of a browser bookmark.

LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE The Body of a Webpage: Your Content Markup surrounding text content doesn’t appear when you view the page in a browser. HTML element tags are essential because they describe your content. Six of the most common HTML element tags: a, article, em, h1, img, and p. Each has its own meaning; for instance, h1 is a heading, a is a link, and p is a paragraph.

LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE Indenting Your HTML The code’s indentation has absolutely no bearing on how the content displays in the browser The pre element is the one exception. However, it’s customary to indent some elements when they are contained in another element. It makes it easier to glean the hierarchy of elements as you read through and work with your code.

LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE Markup: Elements Markup includes: elements, attributes, and values. Elements describe different parts of a webpage. –Most elements can contain both text and other elements. –Elements consist of a start tag, the content, and an end tag. Empty elements (void elements) do not surround any text content. They have a single tag that serves to both open and close the element. Customary to type element names in all lowercase. Uppercase is considered a dated practice.

LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE Markup: Attributes and Values Attributes contain additional information about an element. –Attributes are located inside an element’s start tag. –Type attribute names in lowercase and enclose attribute’s value in quotation marks. –Some attributes only accept specific values. Predefined (or enumerated) values: You must select a value from a standard list of choices. –Be sure to write enumerated values in all lowercase letters.

LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE Markup: Attributes and Values Numeric value: A few attributes require a number value, particularly those describing size and length. –Numeric value never includes a unit type, just the number. –In video or image size, values are understood as pixels. URL values: Some attributes reference other files and must contain values in the form of a URL. Boolean attribute: A special kind of attribute with optional value. If present, it evaluates to true. –If you include a value, set it to the name of the attribute itself. –Boolean attributes are predefined.

LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE Markup: Parents and Children Family tree structure is a key feature of HTML code: –When one element contains another, it is considered the parent element. –The enclosed element is considered the child element. –Any elements contained in the child element are considered descendants of the outer, parent element or ancestor. –When elements contain other elements, each element must be properly nested—fully contained within its parent. –When using an end tag, it should correspond to the previous unclosed start tag. –This structure facilitates both styling elements with CSS and applying JavaScript behavior.

LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE A Webpage’s Text Content A page’s text content is anything besides the markup. HTML text has some differences from regular text: –When viewing the page in a browser, the extra returns and spaces are ignored and the character reference is replaced by the corresponding symbol (©). HTML used to be restricted to ASCII characters. –Accented characters and symbols were created with special character references. –Set the charset value as UTF-8 or utf-8 to mitigate issues with special characters.

LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE Links, Images, and Other Non- Text Content Non-text assets—links, images, and videos—are saved as independent files, referenced in the HTML page, and then displayed by the browser. Browsers can’t handle every kind of file, so plug-ins are installed to provide missing features. Flash is a widespread plug-in for video, but it demands a lot of computing power. Modern browsers have built-in media players, and you can still provide a Flash player as a fallback for older browsers.

LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE File and Folder Names Use lowercase names: Prevents inadvertent typos. –Mixing upper- and lowercase letters makes it harder to type the proper address. Use the proper extension:.html is customary, but.htm also works. –If the page has some other extension, such as.txt, the browser will treat it as text and display the code to the visitor. Separate words with a dash: Never include spaces between words in your file and folder names. –Underscores work too, but dashes are preferred by search engines

LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE URLs URL: Each file on the Internet has a unique URL, the web address, that describes a file’s location and what a browser should do with it. A URL has a scheme, a host, and a path: –Scheme: Tells the browser how to deal with the file. The scheme is followed by a colon and two forward slashes. HTTP: The most common scheme; used to access webpages. HTTPS: Used for secure webpages, such as e-commerce sites. –Host (host name): Where the file is located. –Path: Includes directory names that lead to a file and the file name itself, all of which are optional.

LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE Absolute URLs Absolute URL: Contains all the information that points to a directory or file, including the scheme, the host, and the path. This means you can reference an absolute URL from any webpage on any host with the same URL every time. When referencing a file located on someone else’s web server, always use an absolute URL. Also use absolute URLs for FTP sites or any kind of URL that doesn’t use an HTTP protocol.

LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE Relative URLs Relative URL: Describes location of file in relation to the file that contains the URL reference. Linking to: –File in the same directory: Use file name and extension. –File in subdirectory: Create URL by typing the name of the subdirectory, followed by a forward slash, and then the name and extension of the desired file. –File in higher directory: Use two periods and a forward slash for each directory level above the current file. –Root relative URLs: If files are on a web server, jump straight to the site’s root and drill down to the targeted file.

LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE HTML: Markup with Meaning Semantics: The meaning of a webpage’s content. Semantic HTML: Refers to content that is marked up with the HTML elements that best describe it and without regard for how the content should look. Writing semantic HTML is a cornerstone of an effective website.

LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE The Semantics of Our Basic HTML Page Article element: Holds all content for a self- contained composition. Heading element: HTML provides six heading levels to structure page content. –h1 is most important, h2 is a subheading of h1, h3 is a subheading of h2, and so on. Img element: Primary way to display an image. Alt attribute: Text that displays if the browser can’t load the image or if the page is opened in a text-only browser.

LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE The Semantics of Our Basic HTML Page p element: Marks a paragraph. A paragraph can contain a single sentence or several sentences. em element: Used for “stress emphasis.” a (anchor) element: The basic page defines a link to another page with the a element. –The most powerful element because it links to other pages, specific page sections, and files. HTML doesn’t provide an element for every type of content, instead focusing on elements that cover the vast majority of cases.

LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE Why Semantics Matter Improved accessibility, the practice of making your content available to all users, regardless of their capabilities, and interoperability Improved search engine optimization (SEO) Easier code maintenance and styling with CSS (Often) lighter code and faster pages

LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE A Browser’s Default Display of Webpages Every web browser has a built-in CSS file (a style sheet) that dictates how each HTML element displays by default. Writing your own CSS overwrites these settings. Default presentation varies slightly from browser to browser, but on the whole it is fairly consistent. More importantly, the content’s underlying structure and meaning as defined by your HTML remain the same.

LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE Block-level, Inline, and HTML5 Block-level elements: Display on their own line. Inline elements: Display within a line of text. HTML5 does away with both because HTML is not for styling presentation. Browsers haven’t changed the default display rules for these elements. Even though HTML5 no longer uses “block-level” and “inline,” it helps to know what they mean since they were entrenched in HTML vernacular before HTML5.

LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE Key Takeaways A webpage has three main components: text content, references to other files, and markup. HTML markup is composed of elements, attributes, and values. Write HTML in all lowercase (DOCTYPE is an exception) and surround attribute values with quotes. Create file and folder names in all lowercase. Separate words with a dash instead of a space or underscore.

LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE Key Takeaways Always begin HTML documents with the DOCTYPE declaration so browsers know it’s an HTML5 page. Content goes in the body element. Instructions for the browser and search engines go in the head. Mark up content with semantic HTML. Semantic HTML improves accessibility, site efficiency, and ease of maintenance and styling. CSS controls presentation of HTML content. A browser’s style sheet dictates default presentation of HTML. You can overwrite it with CSS.