Presentation is loading. Please wait.

Presentation is loading. Please wait.

Table, List, Blocks, Inline Style. HTLM Table Element A table consists of rows. Each row is divided into data cells (td stands for table data) A tag can.

Similar presentations


Presentation on theme: "Table, List, Blocks, Inline Style. HTLM Table Element A table consists of rows. Each row is divided into data cells (td stands for table data) A tag can."— Presentation transcript:

1 Table, List, Blocks, Inline Style

2 HTLM Table Element A table consists of rows. Each row is divided into data cells (td stands for table data) A tag can contain text, links, images, lists, forms, and other tables.

3 Table Example row 1, cell 1 row 2, cell 2 row 2, cell 1 row 2, cell 2

4 Table Border Attribute By default, the table will be displayed without borders. If you want borders, specify the border attribute: …

5 Table Headers header 1 header 2

6 Table Tags : defines a table caption : specifies a group of one or more columns : specifies column properties for each column within a element : groups the header content in a table : groups the body content in a table : groups the footer content in a table

7 HTML List Ordered and unordered lists: An ordered list starts with the tag. Each item starts with the tag. Example: Red Yellow

8 Description List A description list is a list of items with a description of each term/name The tag defines a description list. is used together with (defines items) and (describes each item) Example: Coffee - black hot drink

9 HTML List Tags : defines an ordered list : defines an unordered list : defines a list item : defines a description list : defines an item in a description list : defines a description of an item in a description list

10 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.,,, Inline elements are displayed without a new line. E.g.,,,,

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

12 element element is an inline element that can be used as a container for text. element usually is used to set style to parts of the text.

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

14 CSS History HTML stated to add formatting to its tags list (such as,,, 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.

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

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

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

18 Selectors Type Selector: the selector string is simply the name of an element type.,,, 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.

19 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, I like FSU!

20 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, I like FSU!

21 More on Class Selectors ID and CLASS selectors can be prefixed by an element type name. Span.special{ background-color: red} In HTML, I like FSU! I like FSU!

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

23 Internal CSS body { background-color : red; } p { color: yellow }.

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


Download ppt "Table, List, Blocks, Inline Style. HTLM Table Element A table consists of rows. Each row is divided into data cells (td stands for table data) A tag can."

Similar presentations


Ads by Google