Skip to content

Latest commit

 

History

History
80 lines (44 loc) · 1.99 KB

File metadata and controls

80 lines (44 loc) · 1.99 KB

HTML

HTML Tables

HTML tables allow web developers to arrange data into rows and columns.

Define an HTML Table

  1. The < table> tag defines an HTML table.

  2. Each table row is defined with a < tr> tag. Each table header is defined with a < th> tag. Each table data/cell is defined with a < td> tag.

  3. By default, the text in < th> elements are bold and centered.

  4. By default, the text in elements are regular and left-aligned.

HTML Table - Add a Border

To add a border to a table, use the CSS border property:

HTML Table - Collapsed Borders

To let the borders collapse into one border, add the CSS border-collapse property:

HTML Table - Add Cell Padding

  1. Cell padding specifies the space between the cell content and its borders.

  2. If you do not specify a padding, the table cells will be displayed without padding.

  3. To set the padding, use the CSS padding property:

js

Functions, Methods, and Objects

CREATING OBJECTS USING CONSTRUCTOR SYNTAX

CREATE & ACCESS OBJECTS CONSTRUCTOR NOTATION

ADDING AND REMOVING PROPERTIES

RECAP: WAYS TO CREATE OBJECTS

THIS (IT IS A KEYWORD)

RECAP: STORING DATA

arrays are objects

WHAT ARE BUILT-IN OBJECTS?

  • Browsers come with a set of built-in objects that represent things like the browser window and the current web page shown in that window. These built-in objects act like a toolkit for creating interactive web pages.

THE BROWSER OBJECT MODEL: THE WINDOW OBJECT

  • The window object represents the current browser window or tab. It is the topmost object in the Browser Object Model, and it contains other objects that tell you about the browser.

USING THE BROWSER OBJECT MODEL

THE DOCUMENT OBJECT MODEL: THE DOCUMENT OBJECT

USING THE DOCUMENT OBJECT

GLOBAL OBJECTS: STRING OBJECT

WORKING WITH STRINGS

DATA TYPES REVISITED

GLOBAL OBJECTS:NUMBER OBJECT

WORKING WITH DECIMAL NUMBERS

GLOBAL OBJECTS:MATH OBJECT

MATH OBJECT TO CREATE RANDOM NUMBERS