reading-notes

HTML & JS

HTML stands for “Hypertext Markup Language”. It allows the user to create and structure sections, paragraphs, headings, links, and blockquotes for web pages and applications.

HTML is not a programming language, meaning it doesn’t have the ability to create dynamic functionality. Instead, it makes it possible to organize and format documents, similarly to Microsoft Word.

When working with HTML, we use simple code structures (tags and attributes) to mark up a website page. For example, we can create a paragraph by placing the enclosed text within a starting < p > and closing < /p > tag.

< p >This is how you add a paragraph in HTML.< /p >


### How Does HTML Work? HTML documents are files that end with a .html or .htm extension. You can view then using any web browser (such as Google Chrome, Safari, or Mozilla Firefox). The browser reads the HTML file and renders its content so that internet users can view it.

Usually, the average website includes several different HTML pages. For instance: home pages, about pages, contact pages would all have separate HTML documents.

Each HTML page consists of a set of tags (also called elements), which you can refer to as the building blocks of web pages. They create a hierarchy that structures the content into sections, paragraphs, headings, and other content blocks.

Most HTML elements have an opening and a closing that use the < tag >< /tag > syntax. Below, you can see a code example of how HTML elements can be structured:

structre


Overviewing The Most Used HTML Tags

HTML tags have two main types: block-level and inline tags.

Block-level elements take up the full available space and always start a new line in the document. Headings and paragraphs are a great example of block tags.

  1. < html >
  2. < head >
  3. < body >
  4. < div >
  5. < ul > and < li > and there are some other tags.

Inline elements only take up as much space as they need and don’t start a new line on the page. They usually serve to format the inner contents of block-level elements. Links and emphasized strings are good examples of inline tags.

  1. < strong >
  2. < a >< /a > tags and href attributes to indicate the link
  3. without any closing tag.

So…What is HTML?

HTML is the main markup language of the web. It runs natively in every browser and is maintained by the World Wide Web Consortium. You can use it to create the content structure of websites and web applications. It’s the lowest level of frontend technologies, that serves as the basis for styling you can add with CSS and functionality you can implement using JavaScript.


### What’s new in HTML5? introduces a new set of elements that allow you to divide up the parts of a page. The names of these elements indicate the kind of content you will find in them. They are still subject to change, but that has not


### The ABC of programmin

  1. What is a script and how we do one * A SCRIPT IS A SERI ES OF INSTRUCTIONS * To write a script, you need to first state your goal and then list the tasks that need to be completed in order to achieve it.
  2. How do computers fit in with the world around them * COMPUTERS CREATE MODELS OF THE WORLD USING DATA * OBJECTS & PROPERTIES; OBJECTS (THINGS) In computer programming, each physica l thing in the world can be represented as an object. There are two different types of objects here: a hotel and a car. PROPERTIES (CHARACTERISTICS) Both of the cars share common characteristics. In fact, all cars have a make, a color, and engine size. You could even determine their current speed. Programmers call these characteristics the properties of an object. * EVENTS In the real world, people interact with objects. These interactions can change the values of the properties in these objects. * METHODS Methods represent things people need to do with objects. They can retrieve or update the values of an object’s properties. PUTTING IT ALL TOGETHER Computers use data to create models of things in the real world. The events, methods, and properties of an object all relate to each other: Events can trigger methods, and methods can retrieve or update an object’s properties.

    HOW A BROWSER SEES A WEB PAGE In order to understand how you can change the content of an HTML page using JavaScript, you need to know how a browser interprets the HTML code and applies styling to it.