A brief intro to HTML and JS.

This is my reading notes for Code Fellows.

A brief intro to HTML and JS.

What is Html and CSS?

HTML CSS  
HTML stands for Hyper Text Markup Language CSS stands for Cascading Style Sheets  
HTML is the standard markup language for    
creating Web pages CSS describes how HTML elements are to be displayed on screen, paper, or in other media  
HTML describes the structure of a Web page CSS saves a lot of work. It can control the layout of multiple web pages all at once
HTML consists of a series of elements External stylesheets are stored in CSS files  
HTML elements tell the browser how to  
display the content  
HTML elements label pieces of content such  
as “this is a heading”, “this is a  
paragraph”, “this is a link”, etc  

How can you access the internet?

Browser

People access websites using software called a web browser. Popular examples include Firefox, Internet Explorer, Safari, Chrome, and Opera. In order to view a web page, users might type a web address into their browser, follow a link from another site, or use a bookmark.

Web Servers When you ask your browser for a web page, the request is sent across the Internet to a special computer known as a web server which hosts the website.

Screen readers Screen readers are programs that read out the contents of a computer screen to a user. They are commonly used by people with visual impairments.


Small sites use HTML and CSS

Large Sites also use data bases to store info eg: PHP, ASP.nt, Java, Ruby. (however these do not influence what the user sees!)

How Web Works


Structures.

- elements further use tags who act as containers.
- they are made up of two words i.e. **name and value**
 
<html>
    <body>
        <h1>This is the Main Heading</h1>
        <p>This text might be an introduction to the rest of
        the page. And if the page is a long one it might
        be split up into several sub-headings.<p>
        <h2>This is a Sub-Heading</h2>
        <p>Many long articles have sub-headings so to help
        you follow the structure of what is being written.
        There may even be sub-sub-headings (or lower-level
        headings).</p>
        <h2>Another Sub-Heading</h2>
        <p>Here you can see another sub-heading.</p>
    </body>
</html>

Extra Mark-up.

Evolution of html

Because there have been several versions of HTML, each web page should begin with a DOCTYPE declaration to tell a browser which version of HTML the page is using (although browsers usually display the page even if it is not included).

evolution of html pic

Comments.

If you want to add a comment to your code that will not be visible in the user’s browser, you can add the text between these characters: <!-- comment goes here -->.

ID.

` <p id="pullquote"> `

Every HTML element can carry the id attribute. It is used to uniquely identify that element from other elements on the page. Its value should start with a letter or an underscore (not a number or any other character). It is important that no two elements on the same page have the same value for their id attributes (otherwise the value is no longer unique).

Class.

` <p class="important"> ` Every HTML element can also carry a class attribute.Sometimes, rather than uniquely identifying one element within a document, you will want a way to identify several elements as being different from the other elements on the page.

Html layout.

Traditional HTML Layouts. Traditional HTML Layouts

New Html Layouts. New Html Layouts.


What is Javascript?

JavaScript (JS) is a lightweight, interpreted, or just-in-time compiled programming language with first-class functions. While it is most well-known as the scripting language for Web pages, many non-browser environments also use it, such as Node.js, Apache CouchDB and Adobe Acrobat. JavaScript is a prototype-based, multi-paradigm, single-threaded, dynamic language, supporting object-oriented, imperative, and declarative (e.g. functional programming) styles.

How does JS fit into the web structure?

js

So what can it really do?

The core client-side JavaScript language consists of some common programming features that allow you to do things like:

What are API’s

Browser APIs are built into your web browser, and are able to expose data from the surrounding computer environment, or do useful complex things. For example:

Tools & resources

JS shells

Run JS


Input Output in plain JavaScript

JS io


Home