Chapter 6 Lists.

Slides:



Advertisements
Similar presentations
Cascading Style Sheets Alternative to HTML tag style.
Advertisements

Table, List, Blocks, Inline Style
HyperText Markup Language (HTML). Introduction to HTML Hyper Text Markup Language HTML Example The structure of an HTML document Agenda.
Presenter: James Huang Date: Sept. 26,  Introduction  Basics  Lists  Links  Forms  CSS 2.
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.
Building a Website: Cascading Style Sheets (CSS) Fall 2013.
Client-Side Internet and Web Programming
Part 3 Introduction to CSS. CSS Text Text Styles h1 {color: green} // rgb(0,255,0), #00ff00 h2{letter-spacing: 0.5cm} // 2px h3 {text-align: right} //
กระบวนวิชา 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.
SSome HTML tags allow you to specify a variety of options, or attributes, along with the basic tag itself. For example, when you begin a paragraph with.
HTML Tags. Objectives Know the commonly used HTML tags Create a simple webpage using the HTML tags that will be discussed.
MORE HTML REMEMBER TO SEARCH W3 SCHOOLS FOR MORE INFO.
WDV 101 Intro to Website Development
Lists, Images, Tables and Links. Lists Unordered List The first item The second item The third item The fourth item Ordered List 1.The first item 2.The.
Tutorial #4 Formatting Text and Links. Tutorial #3 Review - CSS CSS format Selector { property1: value1; /* Comments */ } Embedded, In-Line, and External.
HTML Lesson 5 Hyper Text Markup Language. Assignment 4  Create a new HTML page called index.htm and save it in your HTML_Folder  Use the same format.
CSS Tutorial 1 Introduction Syntax How to use style specifications. Styles.
HTML.
LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE HTML and CSS 8th Edition Chapter 15: Lists.
Unordered Lists Need to make a list of items that aren't numbered? You need.
LISTS AND LINKS Explained By: Sarbjit Kaur. Lecturer, Department of Computer Application, PGG.C.G., Sector: 42, Chandigarh.
Basic Webpage Design Formatting output using Unordered List and Ordered List tag.
1 Cascading Style Sheets
Introduction to Programming
WebD Introduction to CSS By Manik Rastogi.
CSS.
UNORDERED LISTS By J.R. Basham.
Tutorial 1 – Creating Web Pages With HTML
HTML Basics (Part-3).
Client-Side Internet and Web Programming
CGS 3066: Lecture 2 Web Development and HTML5
Web Development Part 1.
BHS Web Design Mr. Campbell
LAB Work 01 MBA 61062: E-Commerce
Organizing Content with Lists and Tables
HTML: HyperText Markup Language
Introduction to the Internet
Lists, Images, Tables and Links
Hyper text markup Language
Session 5: HTML J 0394 – Perancangan Situs Web Program Studi Manajemen
HTML Formatting.
Lists-Tables-Frames Unit - I.
Cascading Style Sheets (Formatting)
Formatted Lists Unordered Lists Usage of Unordered List Ordered Lists
Lists in HTML PowerPoint How to create lists in HTML
Text Elements.
Ordered & Unordered Lists in HTML
HTML Lists CS 1150 Fall 2016.
Formatted Lists Unordered Lists Usage of Unordered List Ordered Lists
Client-Side Internet and Web Programming
Fundamentals of Web Programming
HTML (HyperText Markup Language)
TABLES, LISTS & IMAGES.  Tables are defined with tag.  Table is divided into rows and columns.  Table must have at least one row and one column  Table.
Programming for webpages
Text Elements.
COS 125 DAY 23.
محمد احمدی نیا CSS محمد احمدی نیا
Text Elements.
CGS 3066: Lecture 2 Web Development and HTML5
HTML Lists CS 1150 Spring 2017.
Formatted Lists Unordered Lists Usage of Unordered List Ordered Lists
HTML HyperText Markup Language
Create an Unordered List
Html.
Creating and Editing a Web Page
Text Elements.
COS 125 DAY 13.
Kanida Sinmai CSS – Cascading Style Sheets Kanida Sinmai
Text Elements.
Presentation transcript:

Chapter 6 Lists

Lists HTML can have Unordered Lists, Ordered Lists, or Description Lists Unordered HTML List The first item The second item The third item The fourth item Ordered HTML List HTML Description List Description of item

Unordered HTML Lists An unordered list starts with the <ul> tag. Each list item starts with the <li> tag. The list items will be marked with bullets (small black circles). Unordered List: <ul>   <li>Coffee</li>   <li>Tea</li>   <li>Milk</li> </ul>   Results below Coffee Tea Milk

Unordered HTML Lists - The Style Attribute A style attribute can be added to an unordered list, to define the style of the marker: Style Description list-style-type:disc The list items will be marked with bullets (default) list-style-type:circle The list items will be marked with circles list-style-type:square The list items will be marked with squares list-style-type:none The list items will not be marked

Ordered HTML Lists An ordered list starts with the <ol> tag. Each list item starts with the <li> tag. The list items will be marked with numbers. Ordered List: <ol>   <li>Coffee</li> <li>Tea</li>   <li>Milk</li> </ol>   Results Coffee Tea Milk

Ordered HTML Lists - The Type Attribute A type attribute can be added to an ordered list, to define the type of the marker: Type Description type="1" The list items will be numbered with numbers (default) type="A" The list items will be numbered with uppercase letters type="a" The list items will be numbered with lowercase letters type="I" The list items will be numbered with uppercase roman numbers type="i" The list items will be numbered with lowercase roman numbers

HTML Description Lists A description list, is a list of terms, with a description of each term. The <dl> tag defines a description list. The <dt> tag defines the term (name), and the <dd> tag defines the data (description). Description List: <dl>   <dt>Coffee</dt>   <dd>- black hot drink</dd>   <dt>Milk</dt>   <dd>- white cold drink</dd> </dl> Results Coffee - black hot drink Milk - white cold drink

Nested HTML Lists List can be nested (lists inside lists). <ul>   <li>Coffee</li>   <li>Tea     <ul>       <li>Black tea</li>       <li>Green tea</li>     </ul>   </li>   <li>Milk</li> </ul> Result Coffee Tea Black tea Green tea Milk *** Note: List items can contain new list, and other HTML elements, like images and links, etc.

Horizontal Lists HTML lists can be styled in many different ways with CSS. One popular way, is to style a list to display horizontally: Horizontal List: <!DOCTYPE html> <html> <head> <style> ul#menu li { display:inline; } </style> </head> <body> <h2>Horizontal List</h2> <ul id="menu"> <li>Apples</li> <li>Bananas</li> <li>Lemons</li> <li>Oranges</li> </ul> </body> </html> Results Horizontal List Apples Bananas Lemons Oranges

With a little extra style, you can make it look like a menu: New Style: ul#menu {     padding: 0; } ul#menu li {     display: inline; } ul#menu li a {     background-color: black;     color: white;     padding: 10px 20px;     text-decoration: none;     border-radius: 4px 4px 0 0; } ul#menu li a:hover {     background-color: orange; }

Chapter Summary Use the HTML <ul> element to define an unordered list Use the HTML style attribute to define the bullet style Use the HTML <ol> element to define an ordered list Use the HTML type attribute to define the numbering type Use the HTML <li> element to define a list item Use the HTML <dl> element to define a description list Use the HTML <dt> element to define the description term Use the HTML <dd> element to define the description data Lists can be nested inside lists List items can contain other HTML elements Use the CSS property display:inline to display a list horizontally