4.34. Introduction to HTML: basic structure, tags and attributes: Introduction to Node.js and NPM

Página 38

Complete HTML, CSS and Javascript Course

4.34. Introduction to HTML: Basic Structure, Tags and Attributes

HTML, or Hyper Text Markup Language, is the markup language that defines the structure of a web page. It is the backbone of any website and is essential for front-end development. Let's start with the basic structure of an HTML page.

Basic Structure

An HTML page is made up of a series of elements, each represented by a tag. The outermost tag is the <html> tag, which encapsulates the entire content of the page. Within this tag, we have two main sections: <head> and <body>.

The <head> contains meta information about the page, such as the title (which appears in the browser tab), links to CSS stylesheets, JavaScript scripts, and other information that is not directly visible to the user.

The <body> This is where all of the page's visible content resides. This includes text, images, links, forms, buttons and more.

Tags and Attributes

Tags are used to mark the beginning and end of an element. For example, text that you want to appear as a paragraph would be placed between the <p> and </p>. There are many tags in HTML, each with a specific purpose.

In addition, tags can contain attributes, which provide additional information about the element. For example, the <a> (which creates a link) usually contains the 'href' attribute, which specifies the URL the link should point to.

Introduction to Node.js and NPM

Node.js is a JavaScript runtime environment that allows you to run JavaScript code on the server side. This is useful for creating web servers, interacting with databases, and more. Node.js comes with a built-in package manager called NPM (Node Package Manager), which makes it easy to install and manage JavaScript libraries and tools.

What is Node.js?

Node.js is a JavaScript runtime environment built on Google Chrome's V8 JavaScript engine. It allows developers to use JavaScript to write code that runs on the server, not just in the user's browser. This opens up a number of possibilities, including creating web servers, performing I/O operations (such as reading and writing files), and interacting with databases.

What is NPM?

NPM is the default package manager for Node.js. It makes it easy to install and manage JavaScript code libraries, called packages. NPM also allows developers to share and distribute their code with the community. With NPM, you can install packages into your project with a single command, and it will take care of resolving and installing any dependencies.

To use NPM, you need to install Node.js on your computer. Once installed, you can use the 'npm install' command to install packages into your project.

Now answer the exercise about the content:

What is HTML and what is its function?

You are right! Congratulations, now go to the next page

You missed! Try again.

Next page of the Free Ebook:

394.35. Introduction to HTML: basic structure, tags and attributes: Popular frameworks and libraries (React, Angular, Vue)

Earn your Certificate for this Course for Free! by downloading the Cursa app and reading the ebook there. Available on Google Play or App Store!

Get it on Google Play Get it on App Store

+ 6.5 million
students

Free and Valid
Certificate with QR Code

48 thousand free
exercises

4.8/5 rating in
app stores

Free courses in
video, audio and text