Table, List, Blocks, Inline Style

Slides:



Advertisements
Similar presentations
Tables Feb. 14, Tables Great way to organize and display information Laid out in columns and rows Think of an excel spreadsheet Defined with tag.
Advertisements

Farhan Nisar University of Peshawar
Copyright © 2003 Pearson Education, Inc. Slide 3-1 Created by Cheryl M. Hughes The Web Wizards Guide to XML by Cheryl M. Hughes.
Intro to HTML. HTML HTML = HyperText Markup Language Used to define the content of a webpage HTML is made up of tags and attributes Content.
HTML and CSS. HTML Hyper Text Markup Language Tells browser how to display text and images.
HTML popo.
Introduction to HTML & CSS
Cascading Style Sheets (CSS). Cascading Style Sheets With the explosive growth of the World Wide Web, designers and programmers quickly explored and reached.
CSS Cascading Style Sheets. Objectives Using Inline Styles Working with Selectors Using Embedded Styles Using an External Style Sheet Applying a Style.
HTML: HyperText Markup Language Hello World Welcome to the world!
Cascading Style Sheets
HTML Overview - Cascading Style Sheets (CSS). Before We Begin Make a copy of one of your HTML file you have previously created Make a copy of one of your.
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.
© 2004, Robert K. Moniot Chapter 6 CSS : Cascading Style Sheets.
Recognizing the Benefits of Using CSS 1. The Evolution of CSS CSS was developed to standardize display information CSS was slow to be supported by browsers.
กระบวนวิชา 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.
Beginning Web Site Creation: Dreamweaver CS4. XHTMLCSS  Describes the structure  Content  Collection of styles  Formatting body { background-color:
XHTML and CSS Overview. Hypertext Markup Language A set of markup tags and associated syntax rules Unlike a programming language, you cannot describe.
Cascading Style Sheets Scripting with Style. CSS versus HTML  Ways to format in HTML –HTML Tag extensions –Converting Text to images –Page Layout with.
XHTML and CSS Overview. Hypertext Markup Language A set of markup tags and associated syntax rules Unlike a programming language, you cannot describe.
Cascading Style Sheet (CSS) Instructor: Dr. Fang (Daisy) Tang
4.01 Cascading Style Sheets
Tutorial 3: Adding and Formatting Text. 2 Objectives Session 3.1 Type text into a page Copy text from a document and paste it into a page Check for spelling.
© 2012 Adobe Systems Incorporated. All Rights Reserved. LEARNING THE LANGUAGE OF THE WEB INTRODUCTION TO HTML AND CSS.
Cascading Style Sheets (CSS) 1.  What is CSS?  Why CSS?  How to write a CSS? 2.
Cascading Style Sheets. Defines the presentation of one or more web pages Similar to a template Can control the appearance of an entire web site giving.
Learning HTML. HTML Attributes HTML elements can have attributes Attributes provide additional information about an element Class – specifies a class.
ACM 511 HTML Week -1 ACM 511 Course Notes. Books ACM 511 Course Notes.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
CHAPTER 1 HTML & HTML5 I อ. ยืนยง กันทะเนตร คณะเทคโนโลยีสารสนเทศและการสื่อสาร มหาวิทยาลัยพะเยา 1.
Administration, Coverage, Review. Exam Administration Midterm exam is in class from 5:15 – 6:30PM on Thursday Feb 20 th. The exam is open book and open.
Copyright 2007, Information Builders. Slide 1 Understanding Basic HTML Amanda Regan Technical Director June, 2008.
CS134 Web Design & Development Cascading Style Sheets (CSS) Mehmud Abliz.
Css. Definition Cascading style sheet (CSS)  It is a simple mechanism for adding style (e.g. fonts, colors, spacing) to Web documents.
Ali Alshowaish. What is HTML? HTML stands for Hyper Text Markup Language Specifically created to make World Wide Web pages Web authoring software language.
HTML – Organizing Page Content. HTML Images img tag Required attribute: src
HTML – Organizing Page Content. HTML Images img tag Required attribute: src
ECA225 Applied Interactive Programming Cascading Style Sheets, pt 1 ECA 225 Applied Online Programming.
Cascading Style Sheets CSS.  Standard defined by the W3C  CSS1 (released 1996) 50 properties  CSS2 (released 1998) 150 properties (positioning)  CSS3.
CSS Cascading Style Sheets A very brief introduction CSS, Cascading Style Sheets1.
Microsoft Expression Web 3 – Illustrated Unit D: Structuring and Styling Text.
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.
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
1 Lecture 7 Style Sheets: CSS. 2 Motivation HTML markup can be used to represent –Semantics: h1 means that an element is a top-level heading –Presentation:
NASRULLAHIBA.  It is time to take your web designing skills to the next level with Cascading Style Sheets (CSS). They are a way to control the look and.
ECA 228 Internet/Intranet Design I Cascading Style Sheets.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
Introduction to CSS: Selectors
CSS for Styling By Jinzhu Gao.
Organizing Content with Lists and Tables
CSS: Cascading Style Sheets
HTML: HyperText Markup Language
Cao Yuewen SEEM4570 Tutorial 03: CSS Cao Yuewen
INTRODUCTION TO HTML AND CSS
IS 360 Declaring CSS Styles
Intro to CSS CS 1150 Fall 2016.
Introduction to web design discussing which languages is used for website designing
Website Design 3
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.
Cascading Style Sheets - Building a stylesheet
Intro to CSS CS 1150 Spring 2017.
CS134 Web Design & Development
Cascading Style Sheets
INTRODUCTION TO HTML AND CSS
Web Design & Development
Cascading Style Sheets
Cascading Style Sheets - Building a stylesheet
Presentation transcript:

Table, List, Blocks, Inline Style Lecture 3: HTML5 Table, List, Blocks, Inline Style

HTLM 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> </table> <tr> </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>

Table Tags <caption>: defines a table caption <colgroup>: specifies a group of one or more columns <col>: specifies column properties for each column within a <colgroup> element <thead>: groups the header content in a table <tbody>: groups the body content in a table <tfoot>: groups the footer content in a table

HTML List Ordered and unordered lists: An ordered list starts with the <ul> 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 together with <dt> (defines items) and <dd> (describes each item) Example: <dl> <dt>Coffee</dt> <dd>- black hot drink</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

HTML Block Element HTML elements are defined as block level element or as inline element. 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>

<div> Element <div> element is a block level element used as a container for grouping other elements. Since <div> is a block level element, the browser will display a line break before and after it.

<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.

Next Class CSS (Cascading Style Sheets) Inline styles Internal CSS External CSS

CSS History HTML stated to add formatting to its tags list (such as <font>, <b>, <i> <strong>, etc) . This caused some problems? The W3C created CSS and added it to HTML 4.0 with the intent of deprecating all HTML format tags.

Presentation of HTML HTML markup can be used to indicate both semantics of a document and its presentation (such as style and format) HTML never designed for formatting. It defines the semantics of a HTML document. Cascading Style Sheets (CSS) pro vides a mechanism for presentation.

CSS Core Syntax Selector: rule defining which element to style Property: a specific CSS keyword which applies formatting to the selector Value: a specific value for the property Multiple property|value pairs declared inside {}, separated by ‘;’ A rule set consists of two parts: selector string followed by declaration block.

CSS Core Syntax P { font-size: x-large; backgroud-color: yellow } Property name Property value Selector string Property value Property name

Selectors Type Selector: the selector string is simply the name of an element type. <a>, <p>, <ul>, etc. * selector: it is the universal selector which represents every possible element type. * { font-weight: bold}. This specifies a value of bold for the font-weight property of every element in a document.

ID Selectors ID Selector: every element in a HTML has an ID attribute. An element must have an unique ID. If a selector is precede by a (#), then it represents an ID value. The ID value is case sensitive. #p1, #p3 { background-color: red } In HTML, <p id=“p1”> I like FSU! </p>

CLASS Selectors CLASS Selector: almost every element has a class attribute. It preceded by a period (.) The class value is case sensitive. #p4, .takeNote{ font-style:italic } In HTML, <p class=“takeNote”> I like FSU! </p>

More on Class Selectors ID and CLASS selectors can be prefixed by an element type name. Span.special{ background-color: red} In HTML, <span>I like FSU!</span> <span class=“special”>I like FSU!</span>

Descendant Selectors Question: what does this mean? ul span { color : yellow }. This indicates that the text within a <span> element that is part of the content of an unordered list <ul> should be yellow. Class selector can be included in the ancestor list. .special span Question: what does this mean? ul ol li { color : yellow }

Internal CSS <head> <style type=“text/css”> body { background-color : red; } p { color: yellow } . </style>

Next Class More about CSS Text properties Font families Line Boxes Style Rule Cascading and Inheritance Text properties Font families Line Boxes CSS Box Model