Unit 2 - HTML Formatting

Similar documents
Attributes & Images 1 Create a new webpage

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

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

HTML Text Formatting. HTML Session 2 2

Tutorial 2 - HTML basics

Introduction to HTML

o Line Breaks </body> </html> This is heading 1 This is some text. This is heading 2 This is some other text. This is heading 2

Web browsers. 1. Google Chrome - 62% 2. Mozilla Firefox - 15% 3. Internet Explorer - 10% 4. Safari - 5 % 5. Microsoft Edge - 4% 6.

CMPT 165 Unit 2 Markup Part 2

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

c122jan2714.notebook January 27, 2014

Creating Web Pages with SeaMonkey Composer

INTRODUCTION TO HTML5! HTML5 Page Structure!

Bok, Jong Soon

Web Designing HTML5 NOTES

Web Development & Design Foundations with HTML5 & CSS3 Instructor Materials Chapter 2 Test Bank

Web Development & Design Foundations with HTML5 & CSS3 Instructor Materials Chapter 2 Test Bank

A HTML document has two sections 1) HEAD section and 2) BODY section A HTML file is saved with.html or.htm extension

This document provides a concise, introductory lesson in HTML formatting.

Creating Web Pages Using Netscape Composer AGENDA FOR THIS WORKSHOP. 1. How does it all work? 2. What do I need to get started at Fairfield?

Introduction to Multimedia. MMP100 Spring 2016 thiserichagan.com/mmp100

CSC 121 Computers and Scientific Thinking

BASICS OF WEB DESIGN CHAPTER 2 HTML BASICS KEY CONCEPTS

Do It Yourself Website Editing Training Guide

HTML TAG SUMMARY HTML REFERENCE 18 TAG/ATTRIBUTE DESCRIPTION PAGE REFERENCES TAG/ATTRIBUTE DESCRIPTION PAGE REFERENCES MOST TAGS

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

WEBSITE PROJECT 2 PURPOSE: INSTRUCTIONS: REQUIREMENTS:

Web Design and Development ACS Chapter 3. Document Setup

Very Basics of HTML. G day mates during this tutorial I will teach you the basics of HTML.

CSS means Cascading Style Sheets. It is used to style HTML documents.

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

GIMP WEB 2.0 MENUS WEB 2.0 MENUS: HORIZONTAL NAVIGATION BAR CREATING AN HTML LIST

MMGD0204 Web Application Technologies. Chapter 3 HTML - TEXT FORMATTING

HTML Hyper Text Markup Language

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

Table of Contents. MySource Matrix Content Types Manual

CSE 3. Marking Up with HTML. Comics Updates Shortcut(s)/Tip(s) of the Day Google Earth/Google Maps ssh Anti-Spyware

SPEED UP YOUR CODING PROCESS HTML INSIGHTS YOU DIDN T KNOW ABOUT. 1

INTRODUCTION TO WEB USING HTML What is HTML?

Page Layout Using Tables

HTML Hints & Tips. HTML is short for HyperText Markup Language.

Study Guide 2 - HTML and CSS - Chap. 6,8,10,11,12 Name - Alexia Bernardo

Review Question 1. Which tag is used to create a link to another page? 1. <p> 2. <li> 3. <a> 4. <em>

Web Development and Design Foundations with HTML5 8th Edition

5/17/2009. Marking Up with HTML. An HTML Web Page File. Tags for Bold, Italic, and underline. Structuring Documents

INFORMATICA GENERALE 2014/2015 LINGUAGGI DI MARKUP CSS

In the early days of the Web, designers just had the original 91 HTML tags to work with.

CSS MOCK TEST CSS MOCK TEST III

HTML/CSS Lesson Plans

COPYRIGHTED MATERIAL. Contents. Chapter 1: Creating Structured Documents 1

A Balanced Introduction to Computer Science, 3/E

1. Please, please, please look at the style sheets job aid that I sent to you some time ago in conjunction with this document.

ACSC 231 Internet Technologies

Desire2Learn: HTML Basics

Html basics Course Outline

Web Page Creation Part I. CS27101 Introduction to Web Interface Design Prof. Angela Guercio

Enhancing your Page. Text Effects. Paragraph Effects. Headings

Programmazione Web a.a. 2017/2018 HTML5

Designing the Home Page and Creating Additional Pages

CSS Cascading Style Sheets

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

Introduction to the MODx Manager

Lesson 5 Introduction to Cascading Style Sheets

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

Adding Audio and Video Content to Web pages. Audio Content - Add some Audio content to your page. Audio & Video 1

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

HTML+ CSS PRINCIPLES. Getting started with web design the right way

CSS مفاهیم ساختار و اصول استفاده و به کارگیری

Working with HTML. must appear at the very beginning of your webpage. starts the first section of your page

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

Beginners Guide to Snippet Master PRO

HTML BASICS. You can use cut and paste in Notepad as with most applications - Ctrl + C to copy,ctrl + X to cut, Ctrl + V to paste.

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

Using Dreamweaver CS6

ATSC 212 html Day 1 Web Authoring

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

EDITOR GUIDE. Button Functions:...2 Inserting Text...4 Inserting Pictures...4 Inserting Tables...8 Inserting Styles...9

Chapter 4: Marking Up With HTML: A Hypertext tmarkup Language Primer

Certified HTML Designer VS-1027

Chapter 4. Introduction to XHTML: Part 1

Using Dreamweaver 2 HTML

Marking Up with HTML. Tags for Bold, Italic, and underline. An HTML Web Page File. Chapter 4: Marking Up With HTML: A. Formatting with Tags:

Welcome Please sit on alternating rows. powered by lucid & no.dots.nl/student

DAY 4. Coding External Style Sheets

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

Certified HTML5 Developer VS-1029

HTML TUTORIAL ONE. Understanding What XHTML is Not

The University of Hawaii at Manoa Library Webpage Content/Design/Style Guidelines General Site Design... 2

Navigation. Websites need a formalized system of links to allow users to navigate the site

Title: Sep 12 10:58 AM (1 of 38)

CSS Styles Quick Reference Guide

Easy Horizontal Rules and Extra Alignment

**Method 3** By attaching a style sheet to your web page, and then placing all your styles in that new style sheet.

Comm 244 Week 3. Navigation. Navigation. Websites need a formalized system of links to allow users to navigate the site

CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB

Web Structure and Style. MB2030 Section 2 Class 4

The building block of a CSS stylesheet. A rule consists of a selector and a declaration block (one or more declarations).

Dreamweaver Basics Workshop

UNIT II Dynamic HTML and web designing

The content editor has two view modes: simple mode and advanced mode. Change the view in the upper-right corner of the content editor.

Transcription:

Tags, Elements, Breaks, Horizontal Rules 1 All content from this unit should be placed in your 2Elements page. Unit 2 - HTML Formatting HTML provides the structure of the document (consisting of all the individual HTML elements on the page). HTML also provides the semantics of an HTML document. Elements are generally used for a particular meaning. For example, a heading level 1 is more important than a heading level 2. Most formatting and styling on web pages is done using CSS. Browsers format certain HTML elements in a standard way without the need for CSS. Below are examples of common HTML elements, with an explanation of their usage, as well as an example of their basic format when applied to an HTML document. Headings Headings Are Important - Search engines, like Google, use the headings to index the structure and content of your web pages. Users skim your pages by its headings. It is important to use headings to show the document structure. <h1> headings should be used for main headings, followed by <h2> headings, then the less important <h3>, and so on. **NB: Use HTML headings for headings only. Don't use headings to make text BIG or bold. There is a special tag for specifying headings in HTML. There are 6 levels of headings in HTML ranging from <h1> for the most important, to <h6> for the least important. In your 2Elements page change the Title, Heading, and Paragraph to look like this: Include the 6 heading levels as well. <!DOCTYPE html> <html> <head> <title>my Elements Page</title> </head> <body> <a href="1index.html" >Back to Home Page </a> <br>

Tags, Elements, Breaks, Horizontal Rules 2 <h1>elements</h1> <h2>headings</h2> <p><h3> The six different Heading styles in HTML are:</h3> <h1>heading 1</h1> <h2>heading 2</h2> <h3>heading 3</h3> <h4>heading 4</h4> <h5>heading 5</h5> <h6>heading 6</h6></p> <a href="1index.html" >Back to Home Page </a> <br> </body> </html> Save your code and launch the website in Chrome. The <p> Element The <p> element adds a paragraph to the body of your text. It adds white space as a margin at the top and bottom of the paragraph. It ignores spacing in the coding when it displays on the browser. Place the code below, under your last paragraph in your Elements.html page, before your closing </body> tag. <p> This paragraph contains a lot of lines in the source code, but the browser ignores it. </p> <p> This paragraph contains a lot of spaces in the source code, but the browser ignores it. </p>

Tags, Elements, Breaks, Horizontal Rules 3 The Poem Problem This poem will display on a single line: In your Elements page enter the code below above the closing body tag (</body>). <p> My Bonnie lies over the ocean. My Bonnie lies over the sea. My Bonnie lies over the ocean. Oh, bring back my Bonnie to me. </p> The <pre> Element The <pre> element defines preformatted text. The text inside a <pre> element is displayed in a fixed-width font (usually Courier), and it preserves both spaces and line breaks: In your Elements page enter this code above the closing body tag (</body>). <pre> My Bonnie lies over the ocean. My Bonnie lies over the sea. My Bonnie lies over the ocean. Oh, bring back my Bonnie to me. </pre> Tip: It is really important that you refresh your page after each code entry. This is the only way to know if you are making progress, and to learn what each tag does to your page. The <strong> Element To place a strong importance on a piece of text, use the <strong> element. In your Elements page enter the code below, under your last paragraph but before your </body> tag. <p><strong>attention:</strong> Please leave the door open.</p>

Tags, Elements, Breaks, Horizontal Rules 4 The <em> Element You can place an emphasis on text by using the <em> element. In your Elements page enter the code below, under your last paragraph but before your </body> tag. <p>strawberries are absolutely <em>delicious</em>!</p> The <mark> Element You can mark or highlight text by using the <mark> element. Place the<mark> element within the previous paragraph like this: <p>strawberries are absolutely <em><mark>delicious</mark></em>!</p> The <q> and <blockquote> Elements The <q> tag is used for short quotations and browsers usually insert quotations around the <q> element. Type the following code below the previous paragraph. <p>wwf s goal is to: <q>build a future where people live in harmony with nature.</q></p> The <blockquote> element defines a section that is quoted from another source and browsers usually indent <blockquote> elements. Type the following code below the previous paragraph. <p>here is a quote from WWF s website:</p> <blockquote cite=http://www.worldwildlife.org/who/index.html> For 50 years, WWF has been protecting the future of nature. The world's leading conservation organization, WWF works in 100 countries and is supported by 1.2 million members in the United States and close to 5 million globally. </blockquote>

Tags, Elements, Breaks, Horizontal Rules 5 You should see that the quote is indented like this: **NB: Whenever using abbreviations it is a good idea to insert the <abbr> tag with a title attribute (more on this later) like this: The Title attribute shows the viewer text if they hover over the abbreviation. Change the code in your editor to look like the code below. Save and refresh your browser and hover your mouse over the abbreviation WWF you should see a tooltip that provides the meaning for the abbreviation. <p>here is a quote from <abbr title="world Wildlife Fund">WWF's</abbr> website:</p> Save your code and launch the website in Chrome. You should see that the WWF in your browser is underlined. When you mouse over it the browser will display a tool tip of the what you typed in your <abbr Title=> tag. **NB: There is no need to do this for every occurrence of the abbreviation, however, you should do it if the abbreviation appears on different pages within your website because viewers might not view all your pages. Watch the video on this in the S drive: S:\+Shared Data Files\BBT 9\HTML 5\Video Tutorials\Formatting Tips Or watch it here: https://youtu.be/bhkypnb2gw4 The Comment Element You can add comments to your HTML source by using the following syntax: <!-- Write your comments here --> (Please note, the! mark and the 2 dashes are required) Notice that there is an exclamation point (!) in the opening tag, but not the closing tag. Comments are not displayed by the browser, but they can help document your HTML source code. They can be used by the original designer as aids to help with a future task, and they can also be useful to other designers who may want to view your source code and comments.

Tags, Elements, Breaks, Horizontal Rules 6 Hint: You can use comments and extra spaces at the start of each new activity in your editor to assist you if you should have to come back and look for a mistake or to make changes. Type the following into your HTML editor below the blockquote but before the closing body tag (don t forget to include the 2 dashes -- they are required): <!-- This is a comment --> <p>this is a paragraph.</p> <!-- Remember to add more information here --> When you save and refresh your browser all that is seen is the this is a paragraph Why? Line Breaks You can force a line break by using the <br> element. Place the code below, under your last paragraph but before your </body> tag. <p>here is a <br>line break.</p> Your webpage should look like this: **NB another way to create space on your webpage is by using the which is a non breaking space. You can use this between paragraphs, or to indent lines of text. Try it now go to the strawberries line (<p>strawberries are absolutely <em><mark>delicious</em></mark>!</p>) And type this code below the line so that you will have 2 strawberry lines to compare: <p> Strawberries are absolutely <em>delicious</em>!</p> Save your changes and refresh your web page -- What happens? You should notice that you added five line spaces between the line that reads: Attention Please leave the door open. And the Strawberries line. Now copy and paste the same line again. The cut the <p> tag and paste it in front of the 5 commands. Your code should look like this:

Tags, Elements, Breaks, Horizontal Rules 7 <p>strawberries are absolutely <em><mark>delicious</em></mark>!</p> <p> Strawberries are absolutely <em>delicious</em>!</p> <p> Strawberries are absolutely <em>delicious</em>!</p> Save your changes and refresh your web page what happens? You should notice that you added some space between the left margin and the start of your Strawberries line in your webpage. Your webpage should look like this: Thematic Break and Horizontal Rules You can create a paragraph-level thematic break by using the <hr> element. Therefore, this element allows you to separate different topics into logical groups. In early versions of HTML, this element represented a "horizontal rule". However, HTML5 gave it a specific semantic meaning (it represents a paragraph-level thematic break). Still in your Elements page, place the code below, under your last paragraph but before your </body> tag. <p>here's one topic... </p> <hr> <p>here's another topic.</p> There are also ways to enhance the look of these horizontal rules using attributes. You can add thickness, and shadow effects. Later we will also look at using images as horizontal and thematic breaks. The process for adding this element is: type <hr where you want it to appear in your webpage. Then if desired choose a size. Type size = n where n is the

Tags, Elements, Breaks, Horizontal Rules 8 rule s height in pixels. And if desired you can add a width to the rule. Type width = n% where the n represents the % of the document s width. You can also align the rule to the left, right, or center of the page by adding the align attribute thus: align= direction where direction refers to the left, right, or center. However, this attribute only applies if you have made the rule narrower than your page. Also, if you want the rule to be solid you need to add noshade= noshade. Let us try a few examples in your Elements page : <hr size=12 width=50% align=right noshade="noshade"></hr> This example will place a thick rule on the right side of your webpage <hr size=8 width =50% align=left noshade="noshade"></hr> This example will place a heavy line on the left side of the webpage <hr size=4 width=75% align=center></hr> This example will place an unshaded rule in the center of the webpage If you want your lines to have color then you simply add the color="red" inside the hr tag like this: <hr size=4 width=40% align=right noshade="noshade" color="red"></hr> This example will place a red line on the right side of the webpage Create a heading on your Elements.html page below these horizontal lines: <hr><br><h2>my 4 Horizontal Rules</h2><br> Place at least 4 more Horizontal rule examples of your own coding choice under the Heading. Similar to the picture Show your teacher your 4 horizontal rules and have them initial your Activity sheet at #5!

Tags, Elements, Breaks, Horizontal Rules 9 In this activity we have learned about elements (tags) that change the appearance of text on our webpage. Now Go back to the poem and change it using the elements below to discover more options for designing your webpage. <hr><pre> <tt>my<em> Bonnie </em>lies over the ocean. My <em>bonnie</em> lies over the sea. My <em>bonnie</em> lies over the ocean. Oh, bring back my <big><strong><em>bonnie</em></strong></big> to me.</tt> </pre><hr> Notice that the <tt> element changes the font to a typewriter font. Activity 2 Review Questions (Answer in your Activity Sheet at #6) Enter the letter of the correct answer on your Activity Sheet. 1. The heading level that is the biggest is: A. H1 B. H3 C. H5 D. H6 2. The heading level that is the smallest is: A. H1 B. H3 C. H5 D. H6 3. Headings are used to: A. make the Web page longer. B. confuse the user by making information harder to find. C. help organize text and images on the Web page. D. create Web pages. 4. Horizontal rules can be used for decoration or for thematic purpose in a website. Choose the correct method for inserting one into a webpage: A. <HR> B. <hr> </hr> C. <hr> D. hr/;>

Tags, Elements, Breaks, Horizontal Rules 10 5. Horizontal rules can have color. Choose the correct code for adding color to your rule. A. <hr size=4 width=40% align=right noshade="noshade" color="red"></hr> B. <hr size=12 width= 75% align=center noshade= noshade color:red;></hr> C. <hr color=red ></hr> D. <hr size=4 width=40% align=right noshade="noshade" color=red"></hr> Next Lesson: Lists in html