You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Links are the defining feature of the web because they allow you to move from one web page to another — enabling the very idea of browsing or surfing.
Writing Links
Links are created using the element. Users can click on anything between the opening tag and the closing tag. You specify which page you want to link to using the href attribute.
Linking to Other Pages on the Sa me Site
href="index.html
Directory Structure
On larger websites it's a good idea to organize your code by placing the pages for each different section of the site into a new folder. Folders on a website are sometimes referred to as directories.
Relative URLs
Relative URLs can be used when linking to pages within your own website. They provide a shorthand way of telling the browser where to find your files.
Email Links
mailto
Opening Links in a New Window
target= _blank
Linking to a Specific Part of the Same Page
hash and the id
A Liquid Layout
The liquid layout uses percentages to specify the width of each box so that the design will stretch to fit the size of the screen.
Layout Grids
Composition in any visual art (such as design, painting, or photography) is the placement or arrangement of visual elements — how they are organized on a page. Many designers use a grid structure to help them position items on a page, and the same is true for web designers.
CSS Frameworks
CSS frameworks aim to make your life easier by providing the code for common tasks, such as creating layout grids, styling forms, creating printer-friendly versions of pages and so on. You can include the CSS framework code in your projects rather than writing the CSS from scratch.
Multiple Style Sheets
@import
Multiple Style Sheets
link
Functions, Methods, Object.
Browsers require very detailed instructions about what we want them to do. Therefore, complex scripts can run to hundreds (even thousands) of lines. Programmers use functions, methods, and objects to organize their code.
WHAT IS A FUNCTION?
Functions let you group a series of statements together to perform a specific task. If different parts of a script repeat the same task, you can reuse the function (rather than repeating the same set of statements).
Declaring a Function
To create a function, you gave it a name and then write the code between a {}
Calling a Function
Just by write the name of the function will call the code in it.
To get a value from the function by return
ANONYMOUS FUNCTIONS & FUNCTION EXPRESSIONS
Expressions produce value. They can be used where values are expected. If a function is placed where a browser expects to see an expression, (e.g., as an argument to a function), then it gets treated as an expression.
HOW MEMORY & VARIABLES WORK
Global variables use more memory. The browser has to remember them for as long as the web page using them is loaded. Local variables are only remembered during the period of time that a function is being executed.