MT IT
  • Introduction
  • KEEP IN MIND!!
  • 1️⃣1st month
    • Week 1
      • HTML/CSS
        • HTML
          • HTML Dasar
          • HTML Layouting
          • Learn More
            • Semantic HTML
            • Tables
            • Videos
            • Images
        • CSS
          • CSS Dasar
      • Weekly Review
    • Week 2
      • Bootstrap
        • Tutorial Bootstrap 5
      • Git & Github
      • Responsive
        • Responsive with Bootstrap 5
      • Weekly Review
    • Week 3
      • Javascript
        • Introduction to Javascript
          • What is JavaScript?
          • Brief History of JavaScript
          • How To Add JavaScript to HTML
        • All About Variables
          • Variables
          • Naming JavaScript Variables
          • JavaScript Naming Conventions
          • JavaScript Scope
        • Datatypes
          • What are data types?
          • Primitives and objects
          • Primitive data types
          • Object data types
          • TypeOf Operator
      • Weekly Review
    • Week 4
      • Javascript
        • Data Structures
          • Keyed Collections
          • Indexed collections
        • Equality Comparisons
        • Loops and Iterations
          • The for loop
          • do…while statement
          • while statement
      • Weekly Review
    • Monthly Review
  • 2️⃣2nd Month
    • Week 5
      • Javascript
        • Expressions and Operators
          • Basic operators, maths
          • Assignment operators
          • Comparison operators
          • Logical operators
          • String operators
          • Conditional (ternary) operator
          • Comma operator
        • JavaScript Function
        • Arrow function expressions
        • Built in functions
      • REST - Representational State Transfer
        • API - Application Programming Interface
        • Fetching data from the server
        • The Fetch API
        • Cross-Origin Resource Sharing (CORS)
      • Weekly Review
    • Week 6
      • DOM (Document Object Model)
        • DOM tree
        • Selecting elements
          • getElementById()
          • getElementsByName()
          • querySelector()
        • Manipulating elements
          • createElement()
          • appendChild()
          • textContent
        • Working with Attributes
          • Understanding Relationships Between HTML Attributes & DOM Object’s Properties
          • setAttribute()
          • getAttribute()
          • removeAttribute()
          • hasAttribute()
        • Manipulating Element’s Styles
          • JavaScript Style
          • getComputedStyle()
          • className
          • classList
          • Getting the Width and Height of an Element
        • Working with Events
          • JavaScript Events
          • Handling Events
          • Page Load Events
          • onload
          • Mouse Events
          • Keyboard Events
          • Scroll Events
          • scrollIntoView
      • React JS
        • Getting Started
        • Components Basics
          • Introducing JSX
          • Writing Markup with JSX
          • React Function Components
          • Props vs State
            • State: A Component's Memory
            • How to use Props in React
      • Working with APIs - 1
        • XMLHttpRequest
        • Fetch
      • Weekly Review
    • Week 7
      • Javascript
        • Asynchronous JavaScript
          • Asynchronous JavaScript For Dummies
            • (Pt1): Internals Disclosed!
            • (Pt2): Callbacks
            • (Pt3): Promises
            • (Pt4): Async/Await
        • Callback
        • Promises
          • Promises Basics
          • Promises Chaining
          • Promises Error Handling
        • Async/await
          • async function
        • Tutorial – Learn Callbacks, Promises, & Async/Await in JS by Making Ice Cream
      • React JS
        • Rendering
          • Conditional Rendering
          • Lists and Keys
          • Render Props
        • Hooks
          • useState
          • useEffect
      • Working with APIs - 2
        • Axios
      • React Router Dom
      • Weekly Review
    • Week 8
      • React JS
      • Responsive
      • Chakra UI
      • Firebase
        • Firebase Authentication
      • Weekly Review
    • Monthly Review
  • 3️⃣3rd month
    • Week 9
      • React JS
      • Chakra UI
      • Firebase
      • Axios
      • Weekly Review
    • Week 10
      • React JS
      • Boilerplate
      • Weekly Review
    • Week 11
      • Projects
      • Weekly Review
    • Week 12
      • Projects
      • Weekly Review
    • Project Review
  • 🏁FINAL REVIEW
  • 👇!! Learn More Below !!
  • 🥸Frontend Stack
    • 💻Web Dev
      • React JS
        • Reactstrap
        • React Icons
        • React Router Dom
      • Chakra UI
    • 📱Mobile Dev
      • React Native
        • Introduction
        • Page 1
      • Expo
      • Nativebase
    • 🎽CSS
      • Tailwind
      • Bootstrap
  • ☕Backend Stack
    • Node JS
    • Firebase
      • Authentication
      • Firestore
      • Storage
      • Hosting
      • Cloud Function
      • Emulators
      • RTDB
      • FCM
    • Google Cloud Platform
      • AppEngine
      • Big Query
      • Cloud Functions
      • Cloud Run
      • Cloud Scheduler
      • Cloud SQL
      • Logging
    • Object Relational Mapping (ORM)
      • Sequelize
    • MongoDB
      • MongoDB Realm
    • MySQL
      • Introduction
  • 🦸Fullstack
    • NEXT JS
    • LARAVEL
  • 📦Package
    • Middleware
      • Express JS
    • HTTP client
      • AXIOS
    • 📊Chart
      • Chart.js
      • JSCharting
      • React Google Chart
    • ⏳Date & Time
      • Moment JS
      • Day JS
    • 👨‍💻WYSIWYG Editor
      • Quill JS
      • Slate JS
Powered by GitBook
On this page
  • What is HTML: Common uses and defining features
  • How does HTML work?
  • What are HTML tags and elements?
  • What is HTML5?
  • What is HTML used for?
  1. 1st month
  2. Week 1

HTML/CSS

PreviousWeek 1NextHTML

Last updated 1 year ago

What is HTML: Common uses and defining features

You may have heard the term HTML before, but what does HTML actually mean? is an acronym that stands for HyperText Markup Language. Markup languages are different from programming languages. Whereas programming languages help us modify data, we use markup languages to determine how elements are displayed on a webpage.

HTML has a simple, text-based structure that’s easy for beginners to learn and understand. Here’s an example:

<html>
 <head>
  <title>Page Title</title>
 </head>
 <body>
  <h1>Heading</h1>
  <p>Content</p>
 </body>
</html>

So, what is HTML used for? Web developers use it to organize, format, and display a web page’s content. Read on to learn more about how HTML works, how HTML5 improved its functionality, and the different careers that use it.html

How does HTML work?

HTML is usually stored in files that use the .htm or .html extension. A website can include hundreds or even thousands of these HTML files kept in various directories.

When you visit a web page, its server sends its HTML files to your browser. Your browser then reads the HTML in the files and displays it. Some web applications don’t use static HTML but generate it in response to specific actions on their servers.

We can also add other types of content, like and files, images, and videos, to add more features to a web page. CSS allows us to add stylistic elements (like colors) to a webpage. JavaScript enables interactivity. Together, these three languages form the foundation of .

What are HTML tags and elements?

Think of HTML elements as the building blocks of a web page. Elements are defined by their opening and closing tags and can be nested within other elements. Web developers use elements to structure a web page into sections, headings, and other content blocks. Here’s an example:

<div>
 <h1>Heading</h1>
 <p>The main content</p>
 <ul>
   <li>List item one</li>
   <li>List item two</li>
 </ul>
</div>

In the HTML example above, the first element we see is <div>, which wraps around the other elements. Div is one of the most common HTML elements and is a simple way to separate a page into sections. For example, if you wanted to create two columns on a web page, you could use div elements to define them.

Nested inside the div, we see an <h1> element. H1 elements define the main heading of a web page. The text within a heading will usually be larger and bolder, depending on the styles applied to the page.

The <p> tag creates a paragraph element. There will usually be a margin after the element, again, depending on the styles.

Finally, we see a few sets of nested elements. The <ul> tag creates an unordered list, which does nothing until you nest at least one set of list elements (<li>) within it. A browser would render these elements as something like this:

  • List item one

  • List item two

The HTML elements listed above are some of the most common, but we can use others to add images, tables, and other elements to web pages.

What is HTML5?

  • <video>: The video tag allows developers to embed and stream video from a browser without needing a plugin like Flash or Silverlight

  • <audio>: The audio tag is similar to the video tag in that you can use it to embed and stream sound files from a web browser.

  • <canvas>: The canvas tag defines a section in the HTML used to draw graphics using JavaScript. It can even handle 3D graphics and animation using WebGL.

  • <nav>: HTML5 also added new tags to define specific web page sections, like the nav tag, which defines navigation elements.

The features listed above are only some of the many brought about by HTML5. It was one of the biggest changes in the language’s definition and made way for today’s modern dynamic web pages.

What is HTML used for?

Now that we understand HTML’s tags and elements and the updates brought about by HTML5, let’s take a closer look at what the language can do.

Structuring web pages

With tags and elements, we can define the headings, paragraphs, and other contents of a web page. Browsers come with a built-in stylesheet that visually differentiates these elements. Content surrounded with <h1> tags will have a large, bolded font and its own line. Surrounding text with <h2> tags will make it bold and slightly smaller than the <h1> elements, and so on. Without these tags, the text on the web page would all look the same.

Navigating the internet

Navigating the internet would be much harder without HTML. Imagine having to manually enter the URL of every web page you wanted to visit. This would be our reality without anchor tags. HTML’s anchor tags allow us to link pages to and from each other using the href attribute. Here’s an example:

<a href="https://www.google.com">Google</a>

As you’ve probably guessed, the code snippet above creates a hyperlink to Google. You can also use hyperlinks to link to a specific section of a webpage.

Embedding images and videos

HTML also allows you to not only embed images into a webpage but also adjust their width, height, position, and even the way they’re rendered.

In the past, developers would use Flash to embed videos into a webpage. But, with HTML5’s addition of the <video> tag, that’s no longer necessary.

Along with embedding videos, you can use other HTML attributes to adjust video controls, timestamps, thumbnails, autoplay, and more.

Improving client-side data storage and offline capabilities

HTML5 also improved the language’s offline capabilities. Websites use cookies to store data about users that can be retrieved later when they revisit the site. Cookies work well for small data like authentication tokens and usernames, but HTML5’s addition of localStorage and IndexDB enabled browsers to store more complex data.

Plus, the application cache and cache manifest files you can reference from HTML allow users to browse a website while offline by retaining data on the user’s machine. This allows your web app to continue functioning even if a user’s connection drops.

Game development

While you can’t create video games purely with HTML, the <canvas> element makes it possible to build video games in your browser using CSS and JavaScript. In the past, you could only do this with Flash or Silverlight. But with modern HTML, you can create both 2D and 3D games that run in your browser.

Interacting with native APIs

Another feature of HTML is that it can interact with your operating system, not just with your web browser. These features make it possible to drag files onto a web page to upload them, full-screen a video, and more.

task:

is the latest version of HTML. The update improved the language’s functionality, enabling the use of features that previously required additional software like browser plugins. It also added the ability to create applications using HTML that function offline. Here are some of the tags that HTML5 added to the language:

1️⃣
HTML
CSS
JavaScript
web development
HTML5
LogofreeCodeCamp.org