Unsupported browser

This site was designed for modern browsers and tested with Internet Explorer version 10 and later.

It may not look or work correctly on your browser.

How to Create Presentation Slides With HTML and CSS

Kingsley Ubah

As I sifted through the various pieces of software that are designed for creating presentation slides, it occurred to me: why learn yet another program, when I can instead use the tools that I'm already familiar with?

We can easily create beautiful and interactive presentations with HTML, CSS, and JavaScript, the three basic web technologies. In this tutorial, we'll use modern HTML5 markup to structure our slides, we'll use CSS to style the slides and add some effects, and we'll use JavaScript to trigger these effects and reorganize the slides based on click events.

This tutorial is perfect for those of you new to HTML5, CSS, and JavaScript, who are looking to learn something new by building. After this you could even learn to build an HTML5 slide deck or a dynamic HTML with JavaScript PPT . The sky is the limit. 

Wondering how to create an HTML slideshow? Here's the final preview of the presentation HTML tutorial slides we're going to build:

Have you checked out HTML tutorial slides? It's a good example of HTML PPT slides for download.

Let's begin.

1. Create the Directory Structure

Before we get started, let's go ahead and create our folder structure; it should be fairly simple. We'll need:

  • css/style.css
  • js/scripts.js

This is a simple base template. Your files remain blank for the time being. We'll fix that shortly.

2. Create the Starter Markup

Let's begin by creating the base markup for our presentation page. Paste the following snippet into your index.html file.

lang="en">
charset="UTF-8">
name="viewport" content="width=device-width, initial-scale=1.0">
http-equiv="X-UA-Compatible" content="ie=edge">
Document</title>
rel="stylesheet" href="css/style.css">
rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" integrity="sha512-9usAa10IRO0HhonpyAIVpjrylPvoDwiPUiKdWk5t3PyolY1cOd4DSE0Ga+ri4AuTroPR5aQvXU9xC6qOPnzFeg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
class="container"
div id="presentation-area">
src="js/index.js" type="text/javascript"></script>

From the base markup, you can tell that we are importing Font Awesome Icons, our stylesheet ( style.css ), and our JavaScript ( index.js ).

Now we'll add the HTML markup for the actual slides inside the <div> wrapper:

class="presentation">
class="slide show">
class="heading">
class="content grid center">
class="title">
/> All You Need To Know
class="slide">
class="heading">
class="content grid center">
class="title">
class="sub-title">
Lecture No. 1</p>
My Email Address</p>
href="">[email protected]</a></p>

We have seven slides in total, and each slide is composed of the heading section and the content section.

Only one slide will be shown at a time. This functionality is handled by the .show class, which will be implemented later on in our stylesheet. Using JavaScript, later on, we'll dynamically add the .show class to the active slide on the page.

Below the slides, we'll add the markup for our slide's counter and tracker:

id="presentation-area">
class="counter">

Later on, we'll use JavaScript to update the text content as the user navigates through the slides.

Finally, we'll add the slide navigator just below the counter:

id="presentation-area">
class="navigation">
id="full-screen" class="btn-screen show">
class="fas fa-expand"></i>
id="small-screen" class="btn-screen">
class="fas fa-compress"></i>
id="left-btn" class="btn">
class="fas fa-solid fa-caret-left"></i>
id="right-btn" class="btn">
class="fa-solid fa-caret-right"></i>

This section consists of four buttons responsible for navigating left and right and switching between full-screen mode and small-screen mode. Again, we'll use the class .show to regulate which button appears at a time.

That'll be all for the HTML part. Now, let's move over to styling.

3. Make It Pretty

Our next step takes place within our stylesheet. We'll be focusing on both aesthetics and functionality here. To make each slide translate from left to right, we'll need to target the class .show with a stylesheet to show the element.

Here's the complete stylesheet for our project:

{
: 0;
: 0;
: border-box;
: sans-serif;
: all 0.5s ease;
{
: 100vw;
: 100vh;
: flex;
: center;
: center;
{
: 2rem;
li,
{
: 1.2em;
{
: #212121;
: 100%;
: 100%;
: relative;
: flex;
: center;
: center;
{
: 1000px;
: 500px;
: relative;
: purple;
.presentation {
: 100%;
: 100%;
: hidden;
: #ffffff;
: relative;
.counter {
: absolute;
: -30px;
: 0;
: #b6b6b6;
.navigation {
: absolute;
: -45px;
: 0;
.full-screen {
: 100%;
: 100%;
: hidden;
.full-screen .counter {
: 15px;
: 15px;
.full-screen .navigation {
: 15px;
: 15px;
.full-screen .navigation .btn:hover {
: #201e1e;
: #ffffff;
.full-screen .navigation .btn-screen:hover {
: #201e1e;
button {
: 30px;
: 30px;
: none;
: none;
: 0.5rem;
: 1.5rem;
: 30px;
: center;
: pointer;
.btn {
: #464646;
: #ffffff;
: 0.25rem;
: 0;
: scale(0);
.btn.show {
: 1;
: scale(1);
: visible;
.btn-screen {
: transparent;
: #b6b6b6;
: hidden;
{
: 1;
: scale(1);
: visible;
{
: #ffffff;
: 0px 10px 30px rgba(0, 0, 0, 0.1);
.content {
: 2em;
: 100%;
: calc(100% - 100px);
: 11;
.content.grid {
: grid;
.content.grid.center {
: center;
: center;
: center;
.title {
: 3em;
: purple;
.sub-title {
: 2.5em;
: purple;
p {
: 1.25em;
: 1rem;
.slide {
: absolute;
: 0;
: 0;
: 100%;
: 100%;
: #ffffff;
: 0;
: scale(0);
: none;
{
: 1;
: scale(1);
: visible;
.heading {
: 2rem;
: purple;
: 2em;
: bold;
: #ffffff;

4. Enable Slide Navigation

Whenever we click on the left or right icon, we want the next slide or previous slide to appear. We also want to be able to toggle between full-screen mode and small-screen mode.

Furthermore, we want the slide's counter to display the accurate slide number on every slide. All these features will be enabled with JavaScript.

Inside js/index.js , we'll begin by storing references to the presentation wrapper, the slides, and the active slide:

slidesParentDiv = document.querySelector('.slides');
slides = document.querySelectorAll('.slide');
currentSlide = document.querySelector('.slide.show');

Next, we'll store references to the slide counter and both of the slide navigators (left and right icons):

slideCounter = document.querySelector('.counter');
leftBtn = document.querySelector('#left-btn');
rightBtn = document.querySelector('#right-btn');

Then store references to the whole presentation container and both button icons for going into full screen and small screen mode:

presentationArea = document.querySelector('#presentation-area');
fullScreenBtn = document.querySelector('#full-screen');
smallScreenBtn = document.querySelector('#small-screen');

Now that we're done with the references, we'll initialize some variables with default values:

screenStatus = 0;
currentSlideNo = 1
totalSides = 0;

screenStatus represents the screen orientation. 0 represents a full screen mode, and 1 represents a small screen mode.

currentSlideNo represents the current slide number, which as expected is the first slide. totalSlides is initialized with 0, but this will be replaced by the actual number of our slides.

Moving the Presentation to the Next and Previous Slides

Next, we'll add click event listeners to the left button, right button, full screen button, and small screen button:

.addEventListener('click', moveToLeftSlide);
.addEventListener('click', moveToRightSlide);
.addEventListener('click', fullScreenMode);
.addEventListener('click', smallScreenMode);

We bind corresponding functions that will run when the click event is triggered on the corresponding element.

Here are the two functions responsible for changing the slide:

moveToLeftSlide() {
tempSlide = currentSlide;
= currentSlide.previousElementSibling;
.classList.remove('show');
.classList.add('show');
moveToRightSlide() {
tempSlide = currentSlide;
= currentSlide.nextElementSibling;
.classList.remove('show');
.classList.add('show');

In the function moveToLeftSlide , we basically access the previous sibling element (i.e. the previous slide), remove the .show class on the current slide, and add it to that sibling. This will move the presentation to the previous slide.

We do the exact opposite of this in the function moveToRightSlide . Because nextElementSibling is the opposite of previousElementSibling , we'll be getting the next sibling instead.

Code for Showing the Presentation in Full Screen and Small Screen

Recall that we also added click event listeners to the full screen and small screen icons. Here's the function responsible for toggling full-screen mode:

fullScreenMode() {
.classList.add('full-screen');
.classList.remove('show');
.classList.add('show');
= 1;
smallScreenMode() {
.classList.remove('full-screen');
.classList.add('show');
.classList.remove('show');
= 0;

Recall that presentationArea refers to the element that wraps the whole presentation. By adding the class full-screen to this element, we trigger the CSS that will expand it to take up the whole screen.

Since we're now in full-screen mode, we need to show the icon for reverting back to the small screen by adding the class .show to it. Finally, we update the variable screenStatus to 1.

For the smallScreenMode function, we do the opposite—we remove the class full-screen , show the expand button icon, and update screenStatus .

Hiding the Left and Right Icons on the First and Last Slides

Now, we need to invent a way to hide the left and right buttons when we're on the first slide and last slide respectively.

We'll use the following two functions to achieve this:

hideLeftButton() {
(currentSlideNo == 1) {
.classList.remove('show');
else {
.classList.add('show');
hideRightButton() {
(currentSlideNo === totalSides) {
.classList.remove('show');
else {
.classList.add('show');

Both these functions perform a very simple task: they check for the current slide number and hide the left and right buttons when the presentation is pointing to the first and last slide respectively.

Updating and Displaying the Slide Number

Because we're making use of the variable currentSlideNo to hide or show the left and right button icons, we need a way to update it as the user navigates through the slides. We also need to display to the user what slide they are currently viewing.

We'll create a function getCurrentSlideNo to update the current slide number:

getCurrentSlideNo() {
counter = 0;
.forEach((slide, i) => {
++
(slide.classList.contains('show')){
= counter;

We start the counter at 0, and for each slide on the page, we increment the counter. We assign the active counter (i.e. with the class .show ) to the currentSlideNo variable.

With that in place, we create another function that inserts some text into the slide counter:

setSlideNo() {
.innerText = `${currentSlideNo} of ${totalSides}`

So if we were on the second slide, for example, the slide's counter would read: "2 of 6".

Putting Everything Together

To ensure that all of these functions run in harmony, we'll run them in a newly created init function that we'll execute at the start of the script, just below the references:

();
init() {
();
= slides.length
();
();
();

We must also run init() at the bottom of both the moveToLeftSlide and moveToRightSlide functions:

moveToLeftSlide() {
();
moveToRightSlide() {
();

This will ensure that the init function runs every time the user navigates left or right in the presentation.

Wrapping Up

I hope this tutorial helped you understand basic web development better. Here we built a presentation slideshow from scratch using HTML, CSS, and JavaScript. It's a great way to get into creating dynamic HTML with JavaScript PPT 

With this project, you should have learned some basic HTML, CSS, and JavaScript syntax to help you with web development.

Kingsley Ubah

gallery w3resource

HTML BASICS Slides Presentation

Click to access all Slides..

This slide presentation shows basics of HTML.

HTML and XHTML are the foundation of all web development. HTML is used as the graphical user interface in client-side programs written in JavaScript. Server-side languages like PHP and Java also receive data from web pages and use HTML as the output mechanism. The emerging Ajax technologies likewise use HTML and XHTML as their visual engine. HTML was once a very loosely-defined language with very little standardization, but as it has become more important, the need for standards has become more apparent. Regardless of whether you choose to write HTML or XHTML, understanding the current standards will help you provide a solid foundation that will simplify all your other web coding. Fortunately HTML and XHTML are actually simpler than they used to be, because much of the functionality has moved to CSS.

Common Elements

Every page (HTML or XHTML shares certain elements in common.) All are essentially plain text files, with the .html extension. HTML files should not be created with a word processor, but in some type of editor that creates plain text. Every page has a large container (HTML or XHTML) and two major subcontainers, the head and the body. The head area contains information useful behind the scenes, such as CSS formatting instructions and JavaScript code. The body contains the part of the page that is visible to the user.

Tags and Attributes

An HTML document is based on the notion of tags. A tag is a piece of text inside angle brackets (<>). Tags typically have a beginning and an end, and usually contain some sort of text inside them. For example, a paragraph is normally denoted like this:

The <p> indicates the beginning of a paragraph. Text is then placed inside the tag, and the end of the paragraph is denoted by an end tag, which is similar to the start tag but with a slash (</p>.) It is common to indent content in a multi-line tag, but it is also legal to place tags on the same line:

Tags are sometimes enhanced by attributes, which are name value pairs that modify the tag. For example, the tag (used to embed an image into a page) usually includes the following attributes:

The src attribute describes where the image file can be found, and the alt attribute describes alternate text that is displayed if the image is unavailable.

Nested tags

Tags can be (and frequently are) nested inside each other. Tags cannot overlap, so <a><b></a></b> is not legal, but <a><b></b></a> is fine.

HTML VS XHTML

HTML has been around for some time. While it has done its job admirably, that job has expanded far more than anybody expected. Early HTML had very limited layout support. Browser manufacturers added many competing standards and web developers came up with clever workarounds, but the result is a lack of standards and frustration for web developers. The latest web standards (XHTML and the emerging HTML 5.0 standard) go back to the original purpose of HTML: to describe the structure of the data only, and leave all formatting to CSS (Please see the DZone CSS Refcard Series). XHTML is nothing more than HTML code conforming to the stricter standards of XML. The same style guidelines are appropriate whether you write in HTML or XHTML (but they tend to be enforced in XHTML):

Most of the requirements of XHTML turn out to be good practice whether you write HTML or XHTML. I recommend using XHTML strict so you can validate your code and know it follows the strictest standards.

XHTML has a number of flavors. The strict type is recommended, as it is the most up-to-date standard which will produce the most predictable results. You can also use a transitional type (which allows deprecated HTML tags) and a frameset type, which allows you to add frames. For most applications, the strict type is preferred.

HTML Template

The following code can be copied and pasted to form the foundation of a basic web page:

The structure of your web pages is critical to the success of programs based on those pages, so use a validating tool to ensure you haven't missed anything

Validating Tool Description
WC3 The most commonly used validator is online at http://validator.w3.org this free tool checks your page against the doctype you specify and ensures you are following the standards. This acts as a 'spell-checker' for your code and warns you if you made an error like forgetting to close a tag.
HTML Tidy There's an outstanding free tool called HTML tidy which not only checks your pages for validity, but also fixes most errors automatically. Download this tool at http://tidy.sourceforge.net/ or (better) use the HTML validator extension to build tidy into your browser.
HTML Validator extension The extension mechanism of Firefox makes it a critical tool for web developers. The HTML Validator extension is an invaluable tool. It automatically checks any page you view in your browser against both the w3 validation engine and tidy. It can instantly find errors, and repair them on the spot with tidy. With this free extension available at http://users.skynet. be/mgueury/mozilla/ , there's no good reason not to validate your code.

USEFUL OPEN SOURCE TOOLS

Some of the best tools for web development are available through the open source community at no cost at all. Consider these application as part of your HTML toolkit:

Open
Source
Tool
Description
Aptana http://www.aptana.com/ This free programmer's editor (based on Eclipse) is a full-blown IDE customized for HTML / XHTML, CSS, JavaScript, and Ajax. It offers code completion, syntax highlighting, and FTP support within the editor.
Web
Developer
Toolbar
https://www.addons.mozilla.org/en-US/firefox/addon/60 This Firefox extension adds numerous debugging and web development tools to your browser.
Firebug https://addons.mozilla.org/en-US/firefox/addon/1843 is an add-on that adds full debugging capabilities to the browser. The firebug lite version even works with IE.

PAGE STRUCTURE ELEMENTS

The following elements are part of every web page.

Element Description
<html></html> Surrounds the entire page
<head></head> Contains header information (metadata, CSS styles, JavaScript code)
<title></title> Holds the page title normally displayed in the title bar and used in search results
<body></body> Contains the main body text. All parts of the page normally visible are in the body

KEY STRUCTURAL ELEMENTS

Most pages contain the following key structural elements:

Element Name Description
<h1>
</h1>
Heading 1Reserved fo strongest emphasis
<h2>
</h2>
Heading 2Secondary level heading. Headings go down to level 6, but <h1> through <h3> are most common
<p>
</p>
ParagraphMost of the body of a page should be enclosed in paragraphs
<div>
</div>
DivisionSimilar to a paragraph, but normally marks a section of a page. Divs usually contain paragraphs

LISTS AND DATA

Web pages frequently incorporate structured data so HTML includes several useful list and table tag

Element Name Description
<ul></ul> Unordered list Normally these lists feature bullets (but that can be changed with CSS)
<ol></ol> Ordered list These usually are numbered, but this can be changed with CSS
<li></li> List item Used to describe a list item in an unordered list or an ordered list
<dl></dl> Definition list Used for lists with name-value pairs
<dt></dt> Definition term The name in a name-value pair. Used in definition lists
<dd></dd> Definition description The value (or definition) of a name, value pair
<table></table> Table Defines beginning and end of a table
<tr></tr> Table row Defines a table row. A table normally consists of several <tr> pairs (one per row)
<td></td> Table data Indicates data in a table cell. <td> tags occur within <tr> (which occur within <table>)
<th></th> Table heading Indicates a table cell to be treated as a heading with special formatting

Standard List Types

HTML supports three primary list types. Ordered lists and unordered lists are the primary list types. By default, ordered lists use numeric identifiers, and unordered lists use bullets.

However, you can use the list-style-type CSS attribute to change the list marker to one of several types.

Lists can be nested inside each other

Definition lists

The special definition list is used for name / value pairs. The definition term (dt) is a word or phrase that is used as the list marker, and the definition data is normally a paragraph:

Use of tables

Tables were used in the past to overcome the page-layout shortcomings of HTML. That use is now deprecated in favor of CSS-based layout. Use tables only as they were intended, to display tabular data.

A table mainly consists of a series of table rows (tr.) Each table row consists of a number of table data (td) elements. The table heading (th) element can be used to indicate a table cell should be marked as a heading.

The rowspan and colspan attributes can be used to make a cell span more than one row or column.

Each row of a table should have the same number of columns, and each column should have the same number of rows. Use of the span attribute may require adjustment to other rows or columns.

LINKS AND IMAGES

Links and images are both used to incorporate external resources into a page. Both are reliant on URIs (Universal Resource Indicators), commonly referred to as URLs or addresses.

<a> (anchor) The anchor tag is used to provide the basic web link:

In this example, http://www.example.com is the site to be visited. The text "link to example.com" will be highlighted as a link.

absolute and relative references

<link>

The link tag is used primarily to pull in external CSS files:

<img>

The img tag is used in to attach an image. Valid formats are .jpg, .png, and .gif. An image should always be accompanied by an alt attribute describing the contents of the image.

Image formatting attributes (height, width, and align) are deprecated in favour of CSS.

SPECIALTY MARKUP

HTML / XHTML includes several specialty tags. These are used to describe special purpose text. They have default styling, but of course the styles can be modified with CSS.

<quote>

The quote tag is intended to display a single line quote:

Quote is an inline tag. If you need a block level quote, use <blockquote>.

<pre>

The <pre> tag is used for pre-formatted text. It is sometimes used for code listings or ASCII art because it preserves carriage returns. Pre-formatted text is usually displayed in a fixed-width font.

<code>

The code format is used to manage pre-formatted text, especially code listings. It is very similar to pre.

<blockquote>

This tag is used to mark multi-line quotes. Frequently it is set off with special fonts and indentation through CSS. It is a block-level tag.

<span>

The span tag is a vanilla inline tag. It has no particular formatting of its own. It is intended to be used with a class or ID when you want to apply style to an inline chunk of code.

The em tag is used for standard emphasis. By default, <em> italicizes text, but you can use CSS to make any other type of emphasis you wish.

<strong>

This tag represents strong emphasis. By default, it is bold, but you can modify the formatting with CSS.

Forms are the standard user input mechanism in HTML / XHTML. You will need another language like JavaScript or PHP to read the contents of the form elements and act upon them.

Form Structure

A number of tags are used to describe the structure of the form. Begin by looking over a basic form:

The <form></form> pair describes the form. In XHTML strict, you must indicate the form's action property. This is typically the server-side program that will read the form. If there is no such program, you can set the action to null ("") The method attribute is used to determine whether the data is sent through the get or post mechanism.

Most form elements are inline tags, and must be encased in a block element. The fieldset is designed exactly for this purpose. Its default appearance draws a box around the form. You can have multiple fieldsets inside a single form.

You can add a legend inside a fieldset. This describes the purpose of the fieldset.

A label is a special inline element that describes a particular field. A label can be paired with an input element by putting that element's ID in the label's for attribute.

The input element is a general purpose inline element. It is meant to be used inside a form, and it is the basis for several types of more specific input. The subtype is indicated by the type attribute. Input elements usually include an id attribute (used for CSS and JavaScript identification) and / or a name attribute (used in server-side programming.) The same element can have both a name and an id.

This element allows a single line of text input:

Passwords display just like textboxes, except rather than showing the text as it is typed, an asterisk appears for each letter. Note that the data is not encoded in any meaningful way. Typing text into a password field is still entirely unsecure.

Radio Button

Radio buttons are used in a group. Only one element of a radio group can be selected at a time. Give all members of a radio group the same name value to indicate they are part of a group.

Attaching a label to a radio button means the user can activate the button by clicking on the corresponding label. For best results, use the selected attribute to force one radio button to be the default.

Checkboxes are much like radio buttons, but they are independent. Like radio buttons, they can be associated with a label.

Hidden fields hold data that is not visible to the user (although it is still visible in the code) It is primarily used to preserve state in server-side programs.

Note that the data is still not protected in any meaningful way.

Buttons are used to signal user input. Buttons can be created through the input tag:

This will create a button with the caption "launch the missiles." When the button is clicked, the page will attempt to run a JavaScript function called "launchMissiles()" Standard buttons are usually used with JavaScript code on the client. The same button can also be created with this alternate format:

This second form is preferred because buttons often require different CSS styles than other input elements. This second form also allows an <img> tag to be placed inside the button, making the image act as the button.

The reset button automatically resets all elements in its form to their default values. It doesn't require any other attributes.

Select / option

Drop-down lists can be created through the select / option mechanism. The select tag creates the overall structure, which is populated by option elements.

The select has an id (for client-side code) or name (for serverside code) identifier. It contains a number of options. Each option has a value which will be returned to the program. The text between <option> and </option> is the value displayed to the user. In some cases (as in this example) the value displayed to the user is not the same as the value used by programs.

Multiple Selections

You can also create a multi-line selection with the select and option tags:

DEPRECATED FORMATTING TAGS

Certain tags common in older forms of HTML are no longer recommended as CSS provides much better alternatives.

The font tag was used to set font color, family (typeface) and size. Numerous CSS attributes replace this capability with much more flexible alternatives. See the CSS refcard for details.

I (italics)

HTML code should indicate the level of emphasis rather than the particular stylistic implications. Italicizing should be done through CSS. The <em> tag represents emphasized text. It produces italic output unless the style is changed to something else. The <i> tag is no longer necessary and is not recommended. Add font-style: italic to the style of any element that should be italicized.

Like italics, boldfacing is considered a style consideration. Use the <strong> tag to denote any text that should be strongly emphasized. By default, this will result in boldfacing the enclosed text. You can add bold emphasis to any style with the font-weight: bold attribute in CSS.

DEPRECATED TECHNIQUES

In addition to the deprecated tags, there are also techniques which were once common in HTML that are no longer recommended.

Frames have been used as a layout mechanism and as a technique for keeping one part of the page static while dynamically loading other parts of the page in separate frames. Use of frames has proven to cause major usability problems. Layout is better handled through CSS techniques, and dynamic page generation is frequently performed through server-side manipulation or AJAX.

Table-based design

Before CSS became widespread, HTML did not have adequate page formatting support. Clever designers used tables to provide an adequate form of page layout. CSS provides a much more flexible and powerful form of layout than tables, and keeps the HTML code largely separated from the styling markup.

HTML ENTITIES

Sometimes you need to display a special character in a web page. HTML has a set of special characters for exactly this purpose. Each of these entities begins with the ampersand(&) followed by a code and a semicolon.

CharacterNameCodeNote
Non-breaking space   Adds white space
< Used to display HTML code or mathematics
> Greater than>Used to display HTML code or mathematics
& Ampersand&If you're not displaying an entity but really want the & symbol
©Copyright ©Copyright symbol
® Registered trademark®Registered trademark

HTML 5 / CSS3 PREVIEW

New technologies are on the horizon. Firefox 3.5 now has support for significant new HTML 5 features, and CSS 3 is not far behind. While the following should still be considered experimental, they are likely to become very important tools in the next few years. Firefox 3.5, Safari 4 (and a few other recent browsers) support the following new features:

Audio and video tags

Finally the browsers have direct support for audio and video without plugin technology. These tags work much like the img tag.

The HTML 5 standard currently supports Ogg Theora video, Ogg Vorbis audio, and wav audio. The Ogg formats are opensource alternatives to proprietary formats, and plenty of free tools convert from more standard video formats to Ogg. The autoplay option causes the element to play automatically. The controls element places controls directly into the page.

The code between the beginning and ending tag will execute if the browser cannot process the audio or video tag. You can place alternate code here for embedding alternate versions (Flash, for example)

The canvas tag offers a region of the page that can be drawn upon (usually with Javascript.) This creates the possibility of real interactive graphics without requiring plugins like Flash.

This is actually a CSS improvement, but it's much needed. It allows you to define a font-face in CSS and include a ttf font file from the server. You can then use this font face in your ordinary CSS and use the downloaded font. If this becomes a standard, we will finally have access to reliable downloadable fonts on the web, which will usher in web typography at long last.

Follow us on Facebook and Twitter for latest update.

It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.

https://www.w3resource.com/slides/basics-of-html-5.php

  • Weekly Trends and Language Statistics
  • HTML Tutorial
  • HTML Exercises
  • HTML Attributes
  • Global Attributes
  • Event Attributes
  • HTML Interview Questions
  • DOM Audio/Video
  • HTML Examples
  • Color Picker
  • A to Z Guide
  • HTML Formatter

HTML Tags – A to Z List

HTML tags are fundamental elements used to structure and format the content on web pages. It provides the necessary instructions to the web browsers to render text, images, links, and other media content.

What are HTML Tags?

HTML tags are the basic building blocks of any website. They are used to create web pages in various formats. HTML tags are enclosed in angle brackets < > and typically come in pairs, i.e. an opening tag and a closing tag. The closing tag has same text as the opening tag, but has an additional forward-slash ( / ) character. The opening tag specifies the beginning of an element, while the closing tag marks the end. For Example: <p> is an opening tag for a paragraph, and </p> is its corresponding closing tag. Most tags come in pairs, with opening and closing tags, although some tags don’t need to be closed (self-closing tags). Examples of self-closing tags are – <img>, <br>, …, etc. Essential tags f or defining the HTML document structure are  <!DOCTYPE html>, <html>, <head>, and  <body> .

Let’s see a basic example using the HTML tags.

Example:  Basic example demonstrating the HTML tags.

This guide provides an A to Z list of HTML tags , making it a valuable resource for both beginners and experienced web developers.

A to Z HTML Tags

Let us see the extensive list of HTML tags, from A to Z. Whether you are just starting out or need a quick reference, this list has you covered. Each tag in HTML has a specific purpose, for example- defining the document type with  <!DOCTYPE html>  and create hyperlinks with  <a> . Some tags, like  <abbr>  and  <acronym> , provide useful information to browsers, translation systems, and search engines. Others, like  <address> , indicate contact information. This list includes descriptions, syntax, and examples for each tag, helping you understand and utilize them effectively in your web development journey.

TagsDescriptionSyntaxExample
According to the HTML specification or standards, every HTML document requires a document type declaration.< !DOCTYPE html >
The abbreviation tag in HTML is used to define the abbreviation or short form of an element.<abbr title=” “> … </abbr>
The acronym tag in HTML is used to define the acronym that gives useful information to browsers, translation systems, and search engines.<acronym title=” “> … </acronym>
The address tag in HTML indicates the contact information of a person or an organization.<address> … </address>
The anchor tag in HTML is used to create a hyperlink on the webpage.<a herf=” “> …</a>
The applet tag in HTML was used to embed Java applets into any HTML document, discontinued starting from HTML 5.<applet>….</applet>
This area tag is used in an HTML document to map a portion of an image to make it clickable by the end-user.<area>
The <article> tag is one of the new sectioning elements in HTML5. The tag is used to represent an article.<article>..</article>
The <aside> tag is used to describe the main object of the web page in a shorter way like a highlighter.<aside>..</aside>
It is a useful tag if you want to add audio such as songs, interviews, etc. on your webpage.<audio>..</audio>
The HTML base tag is used to specify a base URI, or URL, for relative links. This URL will be the base URL for every link on the page.<base href = ” “>
This tag is used to set the default text-color, font-size, & font-family of all the text in the browser. Not supported in HTML5.<basefont>
The bdi tag refers to Bi-Directional Isolation. It differentiates a text from other text that may be formatted in a different direction.<bdi> … </bdi>
The bdo stands for Bi-Directional Override. This tag is used to specify the text direction or used to change the current direction.<bdo dir> Contents… </bdo>
The bgsound tag is used to play the soundtrack in the background.<bgsound src=””>
The big tag in HTML is used to increase the selected text size by one larger than the surrounding text. In HTML 5.<big> Contents… </big>
The blockquote tag in HTML is used to display the long quotations (a section that is quoted from another source).<blockquote> Contents… </blockquote>
The body tag in HTML is used to define the main content present inside an HTML page.<body> Contents… </body>
The bold tag in HTML is used to specify the bold text without any extra importance.<b>… </b>
The break tag inserts a single carriage return or breaks in the document. This element has no end tag.<br>
The button tag in HTML is used to define the clickable button. <button> tag is used to submit the content.<button type = “button”>
The caption tag is used to specify the caption of a table. Only one caption can be specified for one table.<caption align = “value”></caption>
It can be used to draw paths, boxes, texts, gradients, and add images.<canvas id = “script”> Contents</canvas>
The center tag in HTML is used to set the alignment of text in the center. Not supported in HTML5.<center> Contents.</center>
The cite tag in HTML is used to define the title of a work. It displays the text in italic format.<cite>Content</cite>
The code tag in HTML is used to define the piece of computer code.<code>Contents</code>
It is useful for applying styles to entire columns, instead of repeating the styles for each column, and for each row<colgroup> Column lists </colgroup>
The col tag in HTML is used to set the column properties for each column within a colgroup tag.<col attribute = “value”>
The comment tag is used to insert comments in the HTML code.<!–…–>
The data element gives an address to a given content with a machine-readable translator.<data value=””> Contents </data>
The datalist tag is used to provide an autocomplete feature & used with an input tag so that users can easily fill the data in the forms using select the data.<datalist>Contents</datalist>
The dd tag is used to denote the description or definition of an item in a description list.<dd>Contents</dd>
The define tag in HTML represents the definition element and is used to represent a defining instance in HTML.<dfn>Contents</dfn>
Delete tag is used to mark a portion of text which has been deleted from the document.<del>Contents</del>
This tag is used to create an interactive widget that the user can open or close.<details>Contents</details>
This tag is used to create a popup dialog and models on a web page. This tag is new in HTML5.<dialog open> Contents… </dialog>
The dir tag is used to make a list of directory titles. It is not supported in HTML 5 <ul> or CSS are used instead of <dir> tag.<dir> Lists… </dir>
The div tag is used in HTML to make divisions of content in the web page (text, images, header, footer, navigation bar, etc).<div>Content</div>
The dl tag in HTML is used to represent the description list. In HTML4.1, it defines definition list and in HTML5, it defines description list.<dl> Contents… </dl>
The dt tag in HTML is used to specify the description list. It is used inside the <dl> element. It is usually followed by a <dd> tag.<dt> Content… </dt>
It is used as a container for embedding plug-ins such as flash animations.<embed attributes>
The fieldset tag in HTML5 is used to make a group of related elements in the form, and it creates the box over the elements.<fieldset>Contents</fieldset>
The figurecaption tag in HTML is used to set a caption to the figure element in a document. This tag is new in HTML5.<figcaption> Figure caption </figcaption>
The figure tag in HTML is used to add self-contained content like illustrations, diagrams, photos, or codes listed in a document.<figure> Image content… </figure>
The font tag in HTML plays an important role in the web page to create an attractive and readable web page.<font attribute = “value”> Content </font>
The footer tag in HTML is used to define a footer of HTML document. This section contains the footer information.<footer> … </footer>
This form is used basically for the registration process, logging into your profile on a website or creating your profile on a website, etc …<form> Form Content… </form>
HTML Frames are used to divide the web browser window into multiple sections. Not supported in HTML5.<frame/>
The frameset element contains one or more frame elements. It is used to specify the number of rows and columns in a frameset with their pixel of spaces.<frameset cols = “pixels|%|*”>
The head tag in HTML is used to define the head portion of the document which contains information related to the document.<head>…</head>
The header tag is used to contain the information related to the title and heading of the related content.<header> …</header>
An HTML heading tag is used to define the headings of a page. These 6 heading elements are h1, h2, h3, h4, h5, and h6; with h1 being the highest level and h6 being the least.<h1>Heading1</h1><h2>Heading2</h2>
The hgroup tag in HTML is used to wrap one or more heading elements from <h1> to <h6>, such as the headings and sub-headings.<hgroup> … </hgroup>
The hr tag in HTML stands for horizontal rule and is used to insert a horizontal rule.<hr>
The html tag in HTML is used to define the root of HTML and XHTML documents.<html> Contents </html>
The iframe tag defines a rectangular region within the document in which the browser can display a separate document.<iframe src=”URL” title=”description”></iframe>
HTML Image, how to add the image in HTML. In earlier times, the web pages only contains textual content, which made them appear quite boring and uninteresting.<img src=”url” alt=”some_text” width=”” height=””>
The input tag is used within < form> element to declare input controls that allow users to input data.<input type = “value” …. />
The ins tag is typically used to mark a range of text that has been added to the document.<ins> Contents… </ins>
The index tag is used to query any document through a text field.<isindex prompt=”search”>
This tag is generally used to display a technical term, phrase, the important word in a different language.<i> Contents</i>
The text enclosed within kbd tag is typically displayed in the browser’s default monospace font.<kbd> text content … </kbd>
The keygen tag in HTML is used to specify a key-pair generator field in a form. When a form is submitted then two keys are generated, the private key and a public key.<keygen name = “name”>
The label tag in HTML is used to provide a usability improvement for mouse users.<label> form content… </label>
The legend tag is used to define the title for the child contents. The legend elements are the parent element.<legend> Text </legend>
The list tag in HTML is used to define the list item in an HTML document. It is used within an Ordered List <ol> or Unordered List <ul>.<li> List Items </li>
The main tag is used to give the main information of a document. The content inside the <main> element should be unique for the document.<main>Coontents</main>
The mark tag in HTML is used to define the marked text. It is used to highlight the part of the text in a paragraph.<mark> Contents… </mark>
The marquee tag in HTML is used to create scrolling text or images on a webpage. It scrolls either horizontally or vertically.<marquee>Contents</marquee>
The menuitem tag is used to define a command or menu that the user can utilize from the popup item. Not supported in HTML5.<menuitem label=”” icon=”” type> </menuitem>
The meta tag is regularly used to give watchwords, portrayals, author data, and other metadata that might be utilized by the program to deliver the document accurately or in simple words, it provides important information about a document.<meta attribute-name=”value”>
It is used to define the scale for measurement in a well-defined range and also supports a fractional value.<meter attributes…> </meter>
The nav tag is used for declaring the navigational section in HTML documents. Websites typically have sections dedicated to navigational links, which enables users to navigate the site.<nav> Links… </nav>
The no break tag is used to create a single line text, that does not matter how long the statement is, this tag is used with <wbr> tag.<nobr> Statement </nobr>
The noembed tag is used to show that the browser is not supported by <embed> tag.<noembed> Element </noembed>
The noscript tag in HTML is used to display the text for those browsers which does not support the script tag or the browsers disable the script by the user.<noscript> Contents… </noscript>
The object tag is an HTML tag used to display multimedia like audio, videos, images, PDFs, and Flash on web pages.<object>…</object>
This tag is used to create a group of the same category options in a drop-down list.<optgroup>…</optgroup>
The option tag in HTML is used to choose an option from a Drop-Down menu.<option> Contents… </option>
The output tag in HTML is used to represent the result of a calculation performed by the client-side script such as JavaScript.<output> Results… </output>
The <p> tag in HTML defines a paragraph. These have both opening and closing tags.<p> Content </p>
The param tag in HTML is used to define a parameter for plug-ins which is associated with <object> element.<param name=”” value=””>
In HTML, phrase tag is used to indicate the structural meaning of a block of text.<em> Text Content </em>
The pre tag in HTML is used to define the block of preformatted text which preserves the text spaces.<pre> Contents… </pre>
It is used to represent the progress of a task. It is also defined how much work is done and how much is left to download a thing.<progress attributes…> </progress>
The q tag is a standard quotation tag and is used for short quotations.<q> Contents… </q>
The rp tag in HTML is used to provide parentheses around a ruby main text which defines the information.<rp>[</rp> Explaination… <rp>]</rp>
The rt tag in HTML is used to define the explanation of the ruby annotation which is a small text, attached to the main text.<rt> Explanation… </rt>
The ruby tag in HTML is used to specify the ruby annotation which is a small text, attached with the main text to specify the meaning of the main text.<ruby attributes> Contents… </ruby>
This tag is used to specify that the text content is no longer correct or accurate. This tag is similar but slightly different from <del> tag.<s> Contents… </s>
It is a phrase tag used to define the sample output text from a computer program.<samp> Contents… </samp>
The script tag in HTML is used to define the client-side script.<script> Script Contents… </script>
Section tag defines the section of documents such as chapters, headers, footers, or any other sections.<section> Section Contents </section>
The small tag in HTML is used to set small font sizes. It decreases the font size by one size (from medium to small, from x-large to large).<small> Contents… </small>
The source tag in HTML is used to attach multimedia files like audio, video, and pictures.<source src=”” type=””> </source>
The spacer tag is used to create some white space. Not-supporte in HTML5 .<spacer type=”” size=””>
The HTML span element is a generic inline container for inline elements and content.<span class=””>Some Text</span>
HTML strike tag, along with understanding its implementation through the example. The <strike> tag defines a strike or line through Text.<strike> Contents </strike>
The strong tag in HTML is the parsed tag and is used to show the importance of the text. Make that text bold.<strong> Contents… </strong>
The style tag in HTML helps us to design the web page.<tagname style=”property:value;”>
<sub>subscript text</sub><sup>superscript text</sup>
The <summary> tag in HTML is used to define a summary for the <details> element.<summary> Content </summary>
HTML SVG Basics, & their implementation through the examples. SVG stands for Scalable Vector Graphics.<svg height=”” width=””>
HTML Table, various ways to implement it, & will also understand its usage through the examples. HTML Table is an arrangement of data in rows and columns, or possibly in a more complex structure.<table>… </table>
The tbody tag in HTML is used to make a group of the same type of content of the body element.<tbody> // Table contents </tbody>
The table data tag is used to define a standard cell in an HTML table.<td>……..</td>
The template tag in HTML is used to store the HTML code fragments, which can be cloned and inserted in an HTML document.<template> Contents </template>
This tag is used in HTML table with header and body which is known as “thead” and “tbody”.<tfoot> // Table footer contents… </tfoot>
The table header tag in HTML is used to set the header cell of a table. Two types of cells in the HTML table Header & Standard.<th> Contents… </th>
This tag is used in HTML tables as head and body which are known as thead and tbody.<thead>Table head Contents…</thead>
The time tag is used to display the human-readable date/time. It can also be used to encode dates and times in a machine-readable form.<time attribute> Time… </time>
The title tag in HTML is used to define the title of HTML document. It sets the title in the browser toolbar.<title> Title name </title>
The table row tag is used to define a row in an HTML table. The <tr> element contains multiple <th> or <td> elements.<tr>…..</tr>
The tracking tag specifies text tracks for media components audio and video.<track attribute>
The tt tag is the abbreviation of teletype text. This tag is depreciated from HTML 5. It was used for marking Keyboard input.<tt> Contents… </tt>
The underline tag in HTML stands for underline, and it’s used to underline the text enclosed within the <u> tag.<u> Contents… </u>
It is a phrase tag used to specify the variable in a mathematical equation or in a computer program.<var> Contents… </var>
HTML5 Video, along with knowing the different ways to add the videos to the HTML page.<video src=”” controls> </video>
The wbr tag is used to define the position within the text which is treated as a line break by the browser.<wbr>
The XMP tag is used to create any content in letter format.<xmp> statement </xmp>

HTML Tags – FAQs

How do html tags work.

HTML tags instruct web browsers on how to render content. For example, <p> tags define paragraphs, <a> tags create hyperlinks, and <img> tags embed images. Attributes within tags provide additional information or modify the tag’s behavior.

What are some common HTML tags and their uses?

<h1> to <h6>: Headings of different levels. <p>: Paragraphs of text. <a>: Creates hyperlinks to other web pages or resources. <img>: Embeds images into the web page. <ul>, <ol>, <li>: Creates unordered (bullet) and ordered (numbered) lists.

What are semantic HTML tags?

Semantic HTML tags (<header>, <footer>, <nav>, <main>, <article>, <section>, etc.) provide meaning to the content they enclose, aiding accessibility, SEO (Search Engine Optimization), and structuring of web pages beyond mere presentation.

Which HTML tag is used to define a table?

The <table> tag is used to define tables in HTML. It contains other tags such as <tr> (table row), <th> (table header cell), and <td> (table data cell) to structure tabular data.

What are self-closing HTML tags?

Self-closing tags do not require a closing tag because they don’t contain any content. Examples include <br> for line breaks and <img> for images.

Can HTML tags be nested?

Yes, HTML tags can be nested within each other to create complex structures. For example, you can place a <ul> (unordered list) inside a <div> or <li> (list item) inside an <ol> (ordered list).

How can I learn more about HTML tags?

To learn more about HTML tags, refer to this article individual tags. Additionally, practice creating web pages and experimenting with different tags to understand their behavior and usage better.

This A to Z guide of HTML tags serves as a comprehensive resource, whether you’re a beginner just starting your web development journey or an experienced developer looking for a quick reference. Remember, the power of HTML lies in its simplicity and versatility. By mastering these tags, you can create engaging, accessible, and SEO-friendly websites that not only look good but also function seamlessly.

Web developers starting sometimes need a simple, quick reference list of basic HTML tags. We have an article on the Most used HTML tags- Most commonly used tags in HTML.

HTML is the foundation of webpages, is used for webpage development by structuring websites and web apps.You can learn HTML from the ground up by following this HTML Tutorial and HTML Examples .

Similar Reads

  • Web Technologies

Please Login to comment...

  • How to Underline in Discord
  • How to Block Someone on Discord
  • How to Report Someone on Discord
  • How to add Bots to Discord Servers
  • GeeksforGeeks Practice - Leading Online Coding Platform

Improve your Coding Skills with Practice

 alt=

What kind of Experience do you want to share?

  • [email protected]

Bootstraphunter

Free and Premium Bootstrap Templates and Themes

How to Create Presentation Slides with HTML and CSS

  • March 15, 2022

As I sifted through the various pieces of software that are designed for creating presentation slides, it occurred to me: why learn yet another program, when I can instead use the tools that I’m already familiar with? 

We can easily create beautiful and interactive presentations with HTML, CSS and JavaScript, the three basic web technologies. In this tutorial, we’ll use modern HTML5 markup to structure our slides, we’ll use CSS to style the slides and add some effects, and we’ll use JavaScript to trigger these effects and reorganize the slides based on click events. 

This tutorial is perfect for those of you new to HTML5, CSS and JavaScript, who are looking to learn something new by building.

Here’s the final preview of the presentation slide we’re going to build:

You can also find the complete source code in the GitHub repo .

Let’s begin.

Table of Contents

1. Create the Directory Structure

Before we get started, let’s go ahead and create our folder structure; it should be fairly simple. We’ll need:

index.html css/style.css js/scripts.js

This is a simple base template. Your files remain blank for the time being. We’ll fill that shortly.

2. Create the Starter Markup

Let’s begin by creating the base markup for our presentation page. Paste the following snippet into your index.html file.

<!DOCTYPE html> <html lang=”en”> <head> <meta charset=”UTF-8″> <meta name=”viewport” content=”width=device-width, initial-scale=1.0″> <meta http-equiv=”X-UA-Compatible” content=”ie=edge”> <title>Document</title> <link rel=”stylesheet” href=”css/style.css”>

<!– Font Awesome Icon CDN –> <link rel=”stylesheet” href=”https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css” integrity=”sha512-9usAa10IRO0HhonpyAIVpjrylPvoDwiPUiKdWk5t3PyolY1cOd4DSE0Ga+ri4AuTroPR5aQvXU9xC6qOPnzFeg==” crossorigin=”anonymous” referrerpolicy=”no-referrer” /> </head> <body> <div class=”container” <div id=”presentation-area”> <!– slides go here –> </div> </div> <script src=”js/index.js” type=”text/javascript”></script> </body> </html>

From the base markup, you can tell that we are importing Font Awesome Icons, our stylesheet ( style.css ) and our JavaScript ( index.js ). 

Now we’ll add the HTML markup for the actual slides inside the <div> wrapper:

<section class=”presentation”>

<!– Slide 1 –> <div class=”slide show”> <div class=”heading”> Presentation on C# </div> <div class=”content grid center”> <h3 class=”title”> What is C# ? <br /> All You Need To Know </h3> </div> </div>

<!– Slide 1 –> <div class=”slide”> <div class=”heading”> Overview </div> <div class=”content grid center”> <h3 class=”title”> Introduction to C+ </h3> <p class=”sub-title”> Basic and Advanced Concepts </p> <p>Lecture No. 1</p> <p>My Email Address</p> <p><a href=””> [email protected] </a></p> </div> </div>

<!– Add 5 more slides here –> </section>

We have seven slides in total, and each slide is comprised of the heading section and the content section.

Only one slide will be shown at a time. This functionality is handled by the .show class which will be implemented later on in our stylesheet. 

Using JavaScript, later on, we’ll dynamically add the .show class to the active slide on the page.

Below the slides, we’ll add the markup for our slide’s counter and tracker:

<div id=”presentation-area”> <!– <section class=”slides”><-></section> –> <section class=”counter”> 1 of 6 </section> </div>

Later on, we’ll use JavaScript to update the text content as the user navigates through the slides.

Finally, we’ll add the slide navigator just below the counter:

<div id=”presentation-area”> <!– <section class=”slides”><-></section> –> <!– <section class=”counter”><-></section> –> <section class=”navigation”> <button id=”full-screen” class=”btn-screen show”> <i class=”fas fa-expand”></i> </button>

<button id=”small-screen” class=”btn-screen”> <i class=”fas fa-compress”></i> </button>

<button id=”left-btn” class=”btn”> <i class=”fas fa-solid fa-caret-left”></i> </button>

<button id=”right-btn” class=”btn”> <i class=”fa-solid fa-caret-right”></i> </button> </section> </div>

This section consists of four buttons responsible for navigating left and right and switching between full-screen mode and small-screen mode. Again, we’ll use the class .show to regulate which button appears at a time.

That’ll be all for the HTML part, let’s move over to styling.

3. Make It Pretty

Our next step takes place within our stylesheet. We’ll be focusing on both aesthetics as well as functionality here. To make each slide translate from left to right, we’ll need to target the class .show with a stylesheet to show the element.

Here’s the complete stylesheet for our project:

* { margin: 0; padding: 0; box-sizing: border-box; font-family: sans-serif; transition: all 0.5s ease; }

body { width: 100vw; height: 100vh; display: flex; align-items: center; justify-content: center; }

ul { margin-left: 2rem; }

ul li, a { font-size: 1.2em; }

.container { background: #212121; width: 100%; height: 100%; position: relative; display: flex; align-items: center; justify-content: center; }

#presentation-area { width: 1000px; height: 500px; position: relative; background: purple; }

/* Styling all three sections */ #presentation-area .presentation { width: 100%; height: 100%; overflow: hidden; background: #ffffff; position: relative; }

#presentation-area .counter { position: absolute; bottom: -30px; left: 0; color: #b6b6b6; }

#presentation-area .navigation { position: absolute; bottom: -45px; right: 0; }

/* On full screen mode */ #presentation-area.full-screen { width: 100%; height: 100%; overflow: hidden; }

#presentation-area.full-screen .counter { bottom: 15px; left: 15px; }

#presentation-area.full-screen .navigation { bottom: 15px; right: 15px; }

#presentation-area.full-screen .navigation .btn:hover { background: #201e1e; color: #ffffff; }

#presentation-area.full-screen .navigation .btn-screen:hover { background: #201e1e; } /* End full screen mode */

/* Buttons */ .navigation button { width: 30px; height: 30px; border: none; outline: none; margin-left: 0.5rem; font-size: 1.5rem; line-height: 30px; text-align: center; cursor: pointer; }

.navigation .btn { background: #464646; color: #ffffff; border-radius: 0.25rem; opacity: 0; transform: scale(0); }

.navigation .btn.show { opacity: 1; transform: scale(1); visibility: visible; }

.navigation .btn-screen { background: transparent; color: #b6b6b6; visibility: hidden; }

.btn-screen.show { opacity: 1; transform: scale(1); visibility: visible; }

.btn-screen.hover { color: #ffffff; box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.1); } /* End Buttons */

/* content */ .presentation .content { padding: 2em; width: 100%; height: calc(100% – 100px); z-index: 11; }

.presentation .content.grid { display: grid; }

.presentation .content.grid.center { justify-content: center; align-items: center; text-align: center; }

.content .title { font-size: 3em; color: purple; }

.content .sub-title { font-size: 2.5em; color: purple; }

.content p { font-size: 1.25em; margin-bottom: 1rem; } /* End Content Stylesheet */

/* Slide */ .presentation .slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #ffffff; opacity: 0; transform: scale(0); visibility: none; }

.slide.show { opacity: 1; transform: scale(1); visibility: visible; }

.slide .heading { padding: 2rem; background: purple; font-size: 2em; font-weight: bold; color: #ffffff; }

4. Enable Slide Navigation

Whenever we click on the left or right icon, we want the next slide or previous slide to appear. We also want to be able to toggle between full-screen mode and small-screen mode. 

Furthermore, we want the slide’s counter to display the accurate slide number on every slide. All these features will be enabled with JavaScript.

Inside js/index.js , we’ll begin by storing references to the presentation wrapper, the slides, and the active slide:

let slidesParentDiv = document.querySelector(‘.slides’); let slides = document.querySelectorAll(‘.slide’); let currentSlide = document.querySelector(‘.slide.show’);

Next, we’ll store references to the slide counter and both of the slide navigators (left and right icons):

var slideCounter = document.querySelector(‘.counter’); var leftBtn = document.querySelector(‘#left-btn’); var rightBtn = document.querySelector(‘#right-btn’);

Then store references to the whole presentation container and both button icons for going into full screen and small screen mode:

let presentationArea = document.querySelector(‘#presentation-area’); var fullScreenBtn = document.querySelector(‘#full-screen’); var smallScreenBtn = document.querySelector(‘#small-screen’);

Now that we’re done with the references, we’ll initialize some variables with default values:

var screenStatus = 0; var currentSlideNo = 1 var totalSides = 0;

screenStatus represents the screen orientation. 0 represents a full screen mode and 1 represents a small screen mode. 

currentSlideNo represents the current slide number, which as expected is the first slide. totalSlides is initialized with 0, but this will be replaced by the actual number of our slides.

Moving the Presentation to the Next and Previous Slides

Next, we’ll add click event listeners to the left button, right button, full screen button and small screen button:

leftBtn.addEventListener(‘click’, moveToLeftSlide); rightBtn.addEventListener(‘click’, moveToRightSlide);

fullScreenBtn.addEventListener(‘click’, fullScreenMode); smallScreenBtn.addEventListener(‘click’, smallScreenMode);

We bind corresponding functions that will run when the click event is triggered on the corresponding element.

Here are the two functions responsible for changing the slide:

function moveToLeftSlide() { var tempSlide = currentSlide; currentSlide = currentSlide.previousElementSibling; tempSlide.classList.remove(‘show’); currentSlide.classList.add(‘show’); }

function moveToRightSlide() { var tempSlide = currentSlide; currentSlide = currentSlide.nextElementSibling; tempSlide.classList.remove(‘show’); currentSlide.classList.add(‘show’); }

In the function moveToLeftSlide, we basically access the previous sibling element (ie. the previous slide), remove the .show class on the current slide and add it to that sibling. This will move the presentation to the previous slide.

We do the exact opposite of this in the function moveToRightSlide. Because nextElementSibling is the opposite of previousElementSibling, we’ll be getting the next sibling instead.

Code for Showing the Presentation in Full Screen and Small Screen

Recall that we also added click event listeners to the full screen and small screen icons.

Here’s the function responsible for toggling full-screen mode:

function fullScreenMode() { presentationArea.classList.add(‘full-screen’); fullScreenBtn.classList.remove(‘show’); smallScreenBtn.classList.add(‘show’);

screenStatus = 1; }

function smallScreenMode() { presentationController.classList.remove(‘full-screen’); fullScreenBtn.classList.add(‘show’); smallScreenBtn.classList.remove(‘show’);

screenStatus = 0; }

Recall that presentationArea refers to the element that wraps the whole presentation. By adding the class full-screen to this element, we trigger the CSS that will expand it to take up the whole screen. 

Since we’re now in full-screen mode, we need to show the icon for reverting back to the small screen by adding the class .show to it. Finally, we update the variable screenStatus to 1.

For the smallScreenMode function, the opposite is done – we remove the class full-screen, show the expand button icon, and reupdate screenStatus.

Hidding Left and Right Icons in First and Last Slides 

Now, we need to invent a way to hide both the left and right buttons when we’re on the first slide and last slide respectively.

We’ll use the following two functions to achieve this:

function hideLeftButton() { if(currentSlideNo == 1) { toLeftBtn.classList.remove(‘show’); } else { toLeftBtn.classList.add(‘show’); } }

function hideRightButton() { if(currentSlideNo === totalSides) { toRightBtn.classList.remove(‘show’); } else { toRightBtn.classList.add(‘show’); } }

Both these functions perform a very simple task: they check for the current slide number and hide the left and right buttons when the presentation is pointing to the first and last slide respectively.

Updating and Displaying Slide Number

Because we’re making use of the variable currentSlideNo to hide or show the left and right button icons, we need a way to update it as the user navigates through the slides. 

We also need to display to the user what slide he or she is currently viewing.

We’ll create a function getCurrentSlideNo to update the current slide number:

function getCurrentSlideNo() { let counter = 0;

slides.forEach((slide, i) => { counter++

if(slide.classList.contains(‘show’)){ currentSlideNo = counter; } });

We start the counter at 0, and for each slide on the page, we increment the counter. We assign the active counter (ie. with the class .show) to the currentSlideNo variable. 

With that in place, we create another function that inserts some text into the slide counter:

function setSlideNo() { slideNumber.innerText = `${currentSlideNo} of ${totalSides}` }

So if we were on the second slide for example, the slide’s counter will read as: 2 of 6

Putting Everything Together

To ensure that all of these functions run in harmony, we’ll run them in a newly created init function that we’ll execute at start of the script, just below the references:

function init() {

getCurrentSlideNo(); totalSides = slides.length setSlideNo(); hideLeftButton(); hideRightButton(); }

We must also run init() at the bottom of both the moveToLeftSlide and moveToRightSlide functions:

function moveToLeftSlide() { // other code

function moveToRightSlide() { // other code

This will ensure that the function init runs every time the user navigates left or right in the presentation.

Wrapping Up

I hope this tutorial helped you understand basic web development better. Here we built a presentation slideshow from scratch using HTML, CSS and JavaScript.

With this project, you should have learned some basic HTML, CSS and JavaScript syntax to help you with web development. 

Recent Posts

  • How Flatlogic Started Their Business
  • Gulp is back – did it ever leave?
  • Solving Memory Leaks in Node.js has Never Been Easier, Introducing the Latest Version of N|Solid
  • Svelte 5 is almost here
  • JSR isn’t another tool, it’s a fundamental shift

DEV Community

DEV Community

Emma Bostian ✨

Posted on Jan 11, 2019

How To Build A Captivating Presentation Using HTML, CSS, & JavaScript

Building beautiful presentations is hard. Often you're stuck with Keynote or PowerPoint, and the templates are extremely limited and generic. Well not anymore.

Today, we're going to learn how to create a stunning and animated presentation using HTML, CSS, and JavaScript.

If you're a beginner to web development, don't fret! This tutorial will be easy enough to keep up with. So let's slide right into it!

Getting started

We're going to be using an awesome framework called Reveal.js . It provides robust functionality for creating interesting and customizable presentations.

  • Head over to the Reveal.js repository and clone the project (you can also fork this to your GitHub namespace).

GitHub

  • Change directories into your newly cloned folder and run npm install to download the package dependencies. Then run npm start to run the project.

Localhost

The index.html file holds all of the markup for the slides. This is one of the downsides of using Reveal.js; all of the content will be placed inside this HTML file.

Themes

Built-In Themes

Reveal includes 11 built-in themes for you to choose from:

Themes

Changing The Theme

  • Open index.html
  • Change the CSS import to reflect the theme you want to use

VS Code

The theme files are:

  • solarized.css

Custom Themes

It's quite easy to create a custom theme. Today, I'll be using my custom theme from a presentation I gave called "How To Build Kick-Ass Website: An Introduction To Front-end Development."

Here is what my custom slides look like:

Slides

Creating A Custom Theme

  • Open css/theme/src inside your IDE. This holds all of the Sass files ( .scss ) for each theme. These files will be transpiled to CSS using Grunt (a JavaScript task runner). If you prefer to write CSS, go ahead and just create the CSS file inside css/theme.
  • Create a new  .scss file. I will call mine custom.scss . You may have to stop your localhost and run npm run build to transpile your Sass code to CSS.
  • Inside the index.html file, change the CSS theme import in the <head> tag to use the name of the newly created stylesheet. The extension will be  .css , not  .scss .
  • Next, I created variables for all of the different styles I wanted to use. You can find custom fonts on Google Fonts. Once the font is downloaded, be sure to add the font URL's into the index.html file.

Here are the variables I chose to use:

  • Title Font: Viga
  • Content Font: Open Sans
  • Code Font: Courier New
  • Cursive Font: Great Vibes
  • Yellow Color: #F9DC24
  • Add a  .reveal class to the custom Sass file. This will wrap all of the styles to ensure our custom theme overrides any defaults. Then, add your custom styling!

Unfortunately, due to time constraints, I'll admit that I used quite a bit of  !important overrides in my CSS. This is horrible practice and I don't recommend it. The reveal.css file has extremely specific CSS styles, so I should have, if I had more time, gone back and ensured my class names were more specific so I could remove the  !importants .

Mixins & Settings

Reveal.js also comes with mixins and settings you can leverage in your custom theme.

To use the mixins and settings, just import the files into your custom theme:

Mixins You can use the vertical-gradient, horizontal-gradient, or radial-gradient mixins to create a neat visual effect.

All you have to do is pass in the required parameters (color value) and voila, you've got a gradient!

Settings In the settings file, you'll find useful variables like heading sizes, default fonts and colors, and more!

Content

The structure for adding new content is:

.reveal > .slides > section

The <section> element represents one slide. Add as many sections as you need for your content.

Vertical Slides

To create vertical slides, simply nest sections.

Transitions

There are several different slide transitions for you to choose from:

To use them, add a data-transition="{name}" to the <section> which contains your slide data.

Fragments are great for highlighting specific pieces of information on your slide. Here is an example.

To use fragments, add a class="fragment {type-of-fragment}" to your element.

The types of fragments can be:

  • fade-in-then-out
  • fade-in-then-semi-out
  • highlight-current-blue
  • highlight-red
  • highlight-green
  • highlight-blue

You can additionally add indices to your elements to indicate in which order they should be highlighted or displayed. You can denote this using the data-fragment-index={index} attribute.

There are way more features to reveal.js which you can leverage to build a beautiful presentation, but these are the main things which got me started.

To learn more about how to format your slides, check out the reveal.js tutorial . All of the code for my presentation can be viewed on GitHub. Feel free to steal my theme!

Top comments (18)

pic

Templates let you quickly answer FAQs or store snippets for re-use.

lkopacz profile image

  • Joined Oct 2, 2018

I really love reveal.js. I haven't spoken in a while so I haven't used it. I've always used their themes and never thought about making my own. This is probably super useful for company presentations, too. I'm SO over google slides. Trying to format code in those is a nightmare LOL

emmabostian profile image

  • Location Stockholm
  • Education Siena College
  • Work Software Engineer at Spotify
  • Joined Dec 21, 2018

Yeah it is time consuming, but the result is much better

sandordargo profile image

  • Location Antibes, France
  • Work Senior Software Engineer at Spotify
  • Joined Oct 16, 2017

The best thing in this - and now I'm not being ironic - is that while you work on a not so much technical task - creating a presentation - you still have to code. And the result is nice.

On the other hand, I know what my presentation skills teachers would say. Well, because they said it... :) If you really want to deliver a captivating presentation, don't use slides at all. Use the time to prepare what you want to say.

I'm not that good - yet, but taking their advice, if must I use few slides, with little information on them and with minimal graphical distractions. My goal is to impress them by what I say, not is what behind my head.

I'm going to a new training soon, where the first day we have to deliver a presentation supported by slides at a big auditorium and the next day we have to go back and forget about the slides and just get on stage and speak. I can't wait for it.

myterminal profile image

  • Location Lake Villa, IL
  • Education Bachelor in Electronics Engineering
  • Work Computer & Technology Enthusiast
  • Joined Oct 8, 2017

How about github.com/team-fluxion/slide-gazer ?

It's my fourth attempt at creating a simple presentation tool to help one present ideas quickly without having to spend time within a presentation editor like Microsoft PowerPoint. It directly converts markdown documents into elegant presentations with a few features and is still under development.

davinaleong profile image

  • Location Singapore
  • Work Web Developer at FirstCom Solutions
  • Joined Jan 15, 2019

Yup, RevealJS is awesome !

Previously I either used PPT or Google Slides. One is a paid license and the other requires an internet connection.

The cool thing about it is that since it's just HTML files behind the scenes, the only software you need to view it with is a web browser. Has amazing syntax-highlighting support via PrismJS. And as a web developer, it makes it simple to integrate other npm packages if need be...

I actually just used it to present a talk this week!

wuz profile image

  • Email [email protected]
  • Location Indianapolis, IN
  • Education Purdue University
  • Pronouns he/him
  • Work Senior Frontend Engineer at Whatnot
  • Joined Aug 3, 2017

Great article, Emma! I love Reveal and this is a great write up for using it!

bhupesh profile image

  • Location New Delhi, India 🇮🇳
  • Joined Dec 5, 2018

I think its a coincidence 😅 I was just starting to think to use reveal.js and suddenly you see this post 🤩

jeankaplansky profile image

  • Location Saratoga Springs,NY
  • Education BA, University of Michigan
  • Work Documentarian
  • Joined Sep 7, 2018

Check out slides.com If you want to skip the heavy lifting and/or use a presentation platform based on reveal.js.

Everything is still easy to customize. The platform provides a UI to work from and an easy way to share your stuff.

BTW - I have no affiliation with slides.com, or even a current account. I used the service a few years back when I regularly presented and wanted to get over PowerPoint, Google Slides, Prezi, etc.

  • Location Toronto, ON
  • Education MFA in Art Video Syracuse University 2013 😂
  • Work Rivalry
  • Joined May 31, 2017

Well I guess you get to look ultra pro by skipping the moment where you have to adjust for display detection and make sure your notes don’t show because you plugged your display connector in 😩 But If the conference has no wifi then we’re screwed I guess

httpjunkie profile image

  • Location Palm Bay, FL
  • Education FullSail University
  • Work Developer Relations Manager at MetaMask
  • Joined Sep 16, 2018

I like Reveal, but I still have not moved past using Google docs slides because every presentation I do has to be done yesterday. Hoping that I can use Reveal more often this year as I get more time to work on each presentation.

jude_johnbosco profile image

  • Email [email protected]
  • Location Abuja Nigeria
  • Work Project Manager Techibytes Media
  • Joined Feb 19, 2019

Well this is nice and I haven't tried it maybe because I haven't spoken much in meet ups but I think PowerPoint is still much better than going all these steps and what if I have network connection issues that day then I'm scrolled right?

sethusenthil profile image

Using Node and Soket.io remote control (meant to be used on phones) for my school's computer science club, it also features some more goodies which are helpful when having multiple presentations. It can be modded to use these styling techniques effortlessly. Feel free to fork!

SBCompSciClub / prez-software

A synchronized role based presentation software using node, prez-software.

TODO: Make system to easily manage multiple presentations Add Hash endocing and decoding for "sudo" key values TODO: Document Code

Run on Dev Server

npm i nodemon app.js Nodemon? - A life saving NPM module that is ran on a system level which automatically runs "node (file.js)" when files are modified. Download nodemon by running npm i -g nodemon

Making a Presentation

  • Copy an existing presentation folder
  • Change the folder name (which should be located at public/slides) with the name day[num of day] ex(day2)

Making a Slide

Making a slide is pretty simple. Just add a HTML section. <section> <!--slide content--> </section> inside the span with the class of "prez-root". Also keep in mind that you will need to copy and pate the markup inside the prez root to the other pages (viewer & controller).

Adding Text

You may add text however you desire, but for titles use the…

Awesome post! I’m glad I’m not the only one who likes libraries. 😎

julesmanson profile image

  • Location Los Angeles
  • Education Engineering, Physics, and Math
  • Joined Sep 6, 2018

Fantastic post. I just loved it.

kylegalbraith profile image

  • Location France
  • Work Co-Founder of Depot
  • Joined Sep 2, 2017

Awesome introduction! I feel like I need to give this a try the next time I create a presentation.

Some comments may only be visible to logged-in visitors. Sign in to view all comments.

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink .

Hide child comments as well

For further actions, you may consider blocking this person and/or reporting abuse

iamrule profile image

How to JS: Automate testing with Selenium

Roel - Aug 28

dasswarup profile image

How to implement push notifications in React Native (Android)

Swarup Das - Sep 19

itshayder profile image

How to Start Freelancing?

its_hayder - Sep 19

ahmetilhn profile image

Prevents re-execution of large javascript functions that have been processed once with the same parameter.

Ahmet İlhan - Aug 27

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Create beautiful stories

WebSlides makes HTML presentations easy. Just the essentials and using lovely CSS.

WebSlides 1.5.0 Github

Why WebSlides?

Good karma & Productivity.

An opportunity to engage.

WebSlides is about good karma. This is about telling the story, and sharing it in a beautiful way. HTML and CSS as narrative elements.

Work better, faster.

Designers, marketers, and journalists can now focus on the content. Simply choose a demo and customize it in minutes.

WebSlides is really easy

Each parent <section> in the #webslides element is an individual slide.

Code is clean and scalable. It uses intuitive markup with popular naming conventions. There's no need to overuse classes or nesting. Making an HTML presentation has never been so fast .

→ Simple Navigation

Slide counter, 40 + beautiful components, vertical rhythm, 500 + svg icons, webslides demos.

Contribute on Github . View all ›

Thumbnail Netflix's Culture

If you need help, here's just some tutorials. Just a basic knowledge of HTML is required:

  • Components · Classes .
  • WebSlides on Codepen .
  • WebSlides Media: images, videos...

WebSlides Files

Built to expand

The best way to inspire with your content is to connect on a personal level:

  • Background images: Unsplash .
  • CSS animations: Animate.css .
  • Longforms: Animate on scroll .

Ready to Start?

Create your own stories instantly. 120+ premium slides ready to use.

Free Download Pay what you want.

People share content that makes them feel inspired. WebSlides is a very effective way to engage young audiences, customers, and teams.

@jlantunez , @ant_laguna , and @luissacristan .

Navigation Menu

Search code, repositories, users, issues, pull requests..., provide feedback.

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly.

To see all available qualifiers, see our documentation .

  • Notifications You must be signed in to change notification settings

Create HTML presentations in seconds —

webslides/WebSlides

Folders and files.

NameName
560 Commits

Repository files navigation

Webslides = create stories with karma.

MIT License

Finally, everything you need to make HTML presentations, landings, and longforms in a beautiful way. Just a basic knowledge of HTML and CSS is required. Designers, marketers, and journalists can now focus on the content. — https://webslides.tv/demos .

Simply choose a demo and customize it in seconds. Latest version: webslides.tv/webslides-latest.zip .

What's in the download?

The download includes demos and images (devices and logos). All content is for demo purposes only. Images are property of their respective owners.

  • Navigation (horizontal and vertical sliding): remote presenters, touchpad, keyboard shortcuts, and swipe.
  • Slide counter.
  • Permalinks: go to a specific slide.
  • Click to nav.
  • Simple CSS alignments. Put content wherever you want (vertical centering...)
  • 40+ components: background images/videos, quotes, cards, covers...
  • Flexible blocks with auto-fill and equal height.
  • Fonts: Roboto, Maitree (Serif), and San Francisco.
  • Vertical rhythm (use multiples of 8).
  • Code is clean and scalable. It uses intuitive markup with popular naming conventions. There's no need to overuse classes or nesting.
  • Each parent <section> in the #webslides element is an individual slide.

Vertical Sliding

Css syntax (classes).

  • Typography: .text-landing , .text-data , .text-intro ...
  • Background Colors: .bg-primary , .bg-apple , .bg-blue ...
  • Background Images: .background , .background-center-bottom ...
  • Cards: .card-50 , .card-40 ...
  • Flexible Blocks: .flexblock.clients , .flexblock.metrics ...

You can add:

  • Unsplash photos
  • animate.css
  • particles.js
  • Animate on scroll (Useful for longform articles)
  • Do not miss our demos .
  • Plugin Docs
  • Plugin Development
  • WebSlides was created by @jlantunez using Cactus .
  • Javascript: @Belelros and @LuisSacristan .
  • Based on SimpleSlides , by @JennSchiffer .

Releases 12

Used by 192.

@everhopingandwaiting

Contributors 14

@Antonio-Laguna

  • JavaScript 49.3%
  • Skip to main content
  • Skip to search
  • Skip to select language
  • Sign up for free
  • Português (do Brasil)

HTML: HyperText Markup Language

HTML (HyperText Markup Language) is the most basic building block of the Web. It defines the meaning and structure of web content. Other technologies besides HTML are generally used to describe a web page's appearance/presentation ( CSS ) or functionality/behavior ( JavaScript ).

"Hypertext" refers to links that connect web pages to one another, either within a single website or between websites. Links are a fundamental aspect of the Web. By uploading content to the Internet and linking it to pages created by other people, you become an active participant in the World Wide Web.

HTML uses "markup" to annotate text, images, and other content for display in a Web browser. HTML markup includes special "elements" such as <head> , <title> , <body> , <header> , <footer> , <article> , <section> , <p> , <div> , <span> , <img> , <aside> , <audio> , <canvas> , <datalist> , <details> , <embed> , <nav> , <search> , <output> , <progress> , <video> , <ul> , <ol> , <li> and many others.

An HTML element is set off from other text in a document by "tags", which consist of the element name surrounded by " < " and " > ". The name of an element inside a tag is case-insensitive. That is, it can be written in uppercase, lowercase, or a mixture. For example, the <title> tag can be written as <Title> , <TITLE> , or in any other way. However, the convention and recommended practice is to write tags in lowercase.

The articles below can help you learn more about HTML.

Key resources

If you're new to web development, be sure to read our HTML Basics article to learn what HTML is and how to use it.

For articles about how to use HTML, as well as tutorials and complete examples, check out our HTML Learning Area .

In our extensive HTML reference section, you'll find the details about every element and attribute in HTML.

Beginner's tutorials

Our HTML Learning Area features multiple modules that teach HTML from the ground up — no previous knowledge required.

This module sets the stage, getting you used to important concepts and syntax such as looking at applying HTML to text, how to create hyperlinks, and how to use HTML to structure a web page.

This module explores how to use HTML to include multimedia in your web pages, including the different ways that images can be included, and how to embed video, audio, and even entire other webpages.

Representing tabular data on a webpage in an understandable, accessible way can be a challenge. This module covers basic table markup, along with more complex features such as implementing captions and summaries.

Forms are a very important part of the Web — these provide much of the functionality you need for interacting with websites, e.g. registering and logging in, sending feedback, buying products, and more. This module gets you started with creating the client-side/front-end parts of forms.

Provides links to sections of content explaining how to use HTML to solve very common problems when creating a web page: dealing with titles, adding images or videos, emphasizing content, creating a basic form, etc.

Advanced topics

The crossorigin attribute, in combination with an appropriate CORS header, allows images defined by the <img> element to be loaded from foreign origins and used in a <canvas> element as if they were being loaded from the current origin.

Some HTML elements that provide support for CORS , such as <img> or <video> , have a crossorigin attribute ( crossOrigin property), which lets you configure the CORS requests for the element's fetched data.

The preload value of the <link> element's rel attribute allows you to write declarative fetch requests in your HTML <head> , specifying resources that your pages will need very soon after loading, which you therefore want to start preloading early in the lifecycle of a page load, before the browser's main rendering machinery kicks in. This ensures that they are made available earlier and are less likely to block the page's first render, leading to performance improvements. This article provides a basic guide to how preload works.

HTML consists of elements , each of which may be modified by some number of attributes . HTML documents are connected to each other with links .

Browse a list of all HTML elements .

Elements in HTML have attributes . These are additional values that configure the elements or adjust their behavior in various ways.

Global attributes may be specified on all HTML elements , even those not specified in the standard . This means that any non-standard elements must still permit these attributes, even though those elements make the document HTML5-noncompliant.

HTML elements are usually "inline-level" or "block-level" elements. An inline-level element occupies only the space bounded by the tags that define it. A block-level element occupies the entire space of its parent element (container), thereby creating a "block box".

HTML comments are used to add explanatory notes to the markup or to prevent the browser from interpreting specific parts of the document.

The <audio> and <video> elements allow you to play audio and video media natively within your content without the need for external software support.

HTML is comprised of several kinds of content, each of which is allowed to be used in certain contexts and is disallowed in others. Similarly, each context has a set of other content categories it can contain and elements that can or can't be used in them. This is a guide to these categories.

Historical information on quirks mode and standards mode.

Related topics

This article covers most of the ways you use CSS to add color to HTML content, listing what parts of HTML documents can be colored and what CSS properties to use when doing so.

The HTML Presentation Framework

Created by Hakim El Hattab and contributors

html presentation tags

Hello There

reveal.js enables you to create beautiful interactive slide decks using HTML. This presentation will show you examples of what it can do.

Vertical Slides

Slides can be nested inside of each other.

Use the Space key to navigate through all slides.

Down arrow

Basement Level 1

Nested slides are useful for adding additional detail underneath a high level horizontal slide.

Basement Level 2

That's it, time to go back up.

Up arrow

Not a coder? Not a problem. There's a fully-featured visual editor for authoring these, try it out at https://slides.com .

Pretty Code

Code syntax highlighting courtesy of highlight.js .

Even Prettier Animations

Point of view.

Press ESC to enter the slide overview.

Hold down the alt key ( ctrl in Linux) and click on any element to zoom towards it using zoom.js . Click again to zoom back out.

(NOTE: Use ctrl + click in Linux.)

Auto-Animate

Automatically animate matching elements across slides with Auto-Animate .

Touch Optimized

Presentations look great on touch devices, like mobile phones and tablets. Simply swipe through your slides.

Add the r-fit-text class to auto-size text

Hit the next arrow...

... to step through ...

... a fragmented slide.

Fragment Styles

There's different types of fragments, like:

fade-right, up, down, left

fade-in-then-out

fade-in-then-semi-out

Highlight red blue green

Transition Styles

You can select from different transitions, like: None - Fade - Slide - Convex - Concave - Zoom

Slide Backgrounds

Set data-background="#dddddd" on a slide to change the background color. All CSS color formats are supported.

Image Backgrounds

Tiled backgrounds, video backgrounds, ... and gifs, background transitions.

Different background transitions are available via the backgroundTransition option. This one's called "zoom".

You can override background transitions per-slide.

Iframe Backgrounds

Since reveal.js runs on the web, you can easily embed other web content. Try interacting with the page in the background.

Marvelous List

  • No order here

Fantastic Ordered List

  • One is smaller than...
  • Two is smaller than...

Tabular Tables

ItemValueQuantity
Apples$17
Lemonade$218
Bread$32

Clever Quotes

These guys come in two forms, inline: The nice thing about standards is that there are so many to choose from and block:

“For years there has been a theory that millions of monkeys typing at random on millions of typewriters would reproduce the entire works of Shakespeare. The Internet has proven this theory to be untrue.”

Intergalactic Interconnections

You can link between slides internally, like this .

Speaker View

There's a speaker view . It includes a timer, preview of the upcoming slide as well as your speaker notes.

Press the S key to try it out.

Export to PDF

Presentations can be exported to PDF , here's an example:

Global State

Set data-state="something" on a slide and "something" will be added as a class to the document element when the slide is open. This lets you apply broader style changes, like switching the page background.

State Events

Additionally custom events can be triggered on a per slide basis by binding to the data-state name.

Take a Moment

Press B or . on your keyboard to pause the presentation. This is helpful when you're on stage and want to take distracting slides off the screen.

  • Right-to-left support
  • Extensive JavaScript API
  • Auto-progression
  • Parallax backgrounds
  • Custom keyboard bindings

- Try the online editor - Source code & documentation

Create Stunning Presentations on the Web

reveal.js is an open source HTML presentation framework. It's a tool that enables anyone with a web browser to create fully-featured and beautiful presentations for free.

Presentations made with reveal.js are built on open web technologies. That means anything you can do on the web, you can do in your presentation. Change styles with CSS, include an external web page using an <iframe> or add your own custom behavior using our JavaScript API .

The framework comes with a broad range of features including nested slides , Markdown support , Auto-Animate , PDF export , speaker notes , LaTeX support and syntax highlighted code .

Ready to Get Started?

It only takes a minute to get set up. Learn how to create your first presentation in the installation instructions !

Online Editor

If you want the benefits of reveal.js without having to write HTML or Markdown try https://slides.com . It's a fully-featured visual editor and platform for reveal.js, by the same creator.

Supporting reveal.js

This project was started and is maintained by @hakimel with the help of many contributions from the community . The best way to support the project is to become a paying member of Slides.com —the reveal.js presentation platform that Hakim is building.

html presentation tags

Slides.com — the reveal.js presentation editor.

Become a reveal.js pro in the official video course.

Computer Science GCSE GURU

HTML Structure and Presentation

Web pages are typically created using three components, HTML , CSS and JavaScript.

HTMLProvides the and structure of each page
CSSA language used to style the HTML content
JavaScriptA scripting language used to provide additional , interactivity and behaviours

There is a special relationship between HTML and CSS.  HTML can exist without CSS, but CSS is pointless without any HTML to style.

Hypertext Markup Language (HTML)

HTML is markup language used to create web pages.

HTML pages are interpreted by a web browser .

HTML tags are added to each element of content in order to provide meaning and context.

Further HTML tags can be used to divide a page into logical sections (divisions), making different layouts possible when combined with CSS.

Images, tables and hyperlinks are also included using HTML.

Although it is entirely possible to make a website just using HTML, it would look bland and unappealing.

To create web pages that are visually stunning and easy to use, we need to use another language called CSS.

Example of HTML

<p> This is a very short paragraph. </p>

Cascading Style Sheets (CSS)

CSS is a presentation language.  Its purpose is to provide a web browser with styling instructions for the HTML.

CSS can be included directly in the HTML tags, in the head section of the HTML, or in an entirely separate document (CSS style sheet).

CSS is a very powerful tool, enabling very complex and unique designs to be made possible.

Take a look at the CSS Zen Garden website to see how changing CSS can make a dramatic difference to the appearance of HTML.

Example of CSS

p { color: blue }

Related Theory

  • Digital Currencies (Cryptocurrencies)
  • Hypertext Transfer Protocol (HTTP)
  • Internet Service Provider
  • IP and MAC addresses
  • Uniform Resource Locator (URL)
  • Web Browser

Related Quizzes

  • The Internet

Sign up for Guru News

Popular downloads.

html presentation tags

Security Cheat Sheet

  • All Quizzes
  • Computer Science Glossary
  • Our YouTube Channel
  • GCSE GURU Revision Tips +

Small Print

  • Cookie Policy
  • Privacy Policy
  • Terms and Conditions

Downloads Shop

  • Information & Terms

Copyright © Computer Science GCSE GURU

Computer Science GCSE GURU

Teach Computer Science

HTML Structure and Presentation

Ks3 computer science.

11-14 Years Old

48 modules covering EVERY Computer Science topic needed for KS3 level.

GCSE Computer Science

14-16 Years Old

45 modules covering EVERY Computer Science topic needed for GCSE level.

A-Level Computer Science

16-18 Years Old

66 modules covering EVERY Computer Science topic needed for A-Level.

GCSE Creating web pages using HTML and CSS (14-16 years)

  • An editable PowerPoint lesson presentation
  • Editable revision handouts
  • A glossary which covers the key terminologies of the module
  • Topic mindmaps for visualising the key concepts
  • Printable flashcards to help students engage active recall and confidence-based repetition
  • A quiz with accompanying answer key to test knowledge and understanding of the module

A-Level Designing Web pages using HTML and CSS (16-18 years)

Html structure.

HTML (Hypertext Markup Language) is the recognised markup language utilised in forming web pages.  It defines the composition of web pages by using markup.  HTML elements are the primary units of HTML pages and are denoted by tags.  HTML tags label parts of content like headings, paragraphs, and tables.  Browsers do not show the HTML tags, but they are used in the background in order to deliver the content of the page.

HTML tags are element names enclosed by angle brackets.  HTML tags usually come in pairs.  The first tag in a pair is the start tag, and the second tag is the end tag.  The end tag is written like the start tag, but with a forward slash inserted before the tag name.  The start tag is sometimes also called the opening tag, and the end tags are the closing tag.

All HTML documents must start with a document type declaration: <!DOCTYPE html>.  The HTML document itself begins with <html> and ends with </html>.  The visible part of the HTML document is between <body> and </body>.

HTML tags are not case sensitive.

HTML Attributes

All HTML elements can have attributes, which provide additional information about the element, and are always specified in the start tag.  They usually come in name/value pairs.

CSS (Cascading Style Sheets) defines how HTML elements are to be presented on any given screen, paper or other media.  It saves the developer a lot of work since it can control the layout of multiple web pages simultaneously.

Ways to add CSS to HTML Elements

  • Inline – used to apply a unique style to a single HTML element. It uses the style attribute of an HTML element.
  • Internal – used to describe a style for one HTML page. It is indicated in the <head> section of an HTML page, within a <style> element.
  • External – used to define the style for multiple HTML pages by using an external CSS file. You can change the look of an entire website by changing one file.  This is the most common way to add CSS to HTML elements.

HTML Structure vs. HTML Presentation

The composition of a webpage could be regarded as a mixture of the following four elements:

  • Content is the general term used for all the browser-displayed information elements—such as text, audio, still images, animation, video, multimedia, and files belonging to web pages. It does not require any additional presentational markups or styles in order to fully relay its message.
  • Structure is the name given to the practice of using HTML in content to transmit substance, and also to define how blocks of information are structured in relation to one another. Examples include: “This is a list,” (i, d, k), “This is heading and subheading,” (<h1>, <h2>, …, <h6>), “This section is related to,” (<a>), etc.
  • Presentation of Style refers to anything related to how the content and structure is presented. Examples include size, color, margins, borders, layout, location, etc.
  • Behaviour or Interactivity is the implementation of client-side script to generate a two-way flow of information between the webpage and its users. JavaScript is an example of this.

Most of the time it is difficult to clearly distinguish content from the structure.  For example, the <img> tag, as a structural element, is used to produce graphical content.  In practice, the composition of a webpage can simply be viewed as a mixture of three elements: Structure, Presentation and Behavior.

The following terms are often used in correspondence with one another: separation of content and presentation, separation of meaning and presentation, and separation of structure and presentation.  Nonetheless, all of these terms basically make reference to the separation of the content (which is made meaningful by structure and presentation), or simply acknowledge the separation of the structure (HTML) and the presentation (CSS) of any given webpage.

The main goal of HTML 4.01 is the separation of structure and presentation,  as specified in section 2.4.1 of HTML 4.01.

HTML structure and presentation are essential for the proper functioning of web pages

Further Readings:

  • HTML element

An Introduction to HTML for Beginners

Joan Ayebola

HTML, which stands for HyperText Markup Language, serves as the foundation of web development. It enables you to create interactive web pages, structure content, and effectively communicate your message.

In this guide, we'll explore HTML comprehensively, addressing essential questions to provide a strong foundation for budding web developers.

The Crucial Role of HTML in Web Development

HTML plays an essential role in web development as it defines the structure and content of web pages. It serves as the backbone upon which websites are built.

HTML accomplishes this by utilizing a system of tags and elements, each serving a unique purpose.

How Do I Write HTML Code?

Writing HTML code is a matter of understanding HTML tags.

Tags are enclosed within angle brackets, each comprising an opening and closing part. They function as building blocks that define the structure of your web page.

Think of them as the bricks and mortar of web development. Understanding their roles is essential for web development.

How to Create a Website Using HTML?

Creating a website using HTML involves several key steps. Let's go over them in the following sections.

Website Planning

Before you start coding, take time to plan your website thoroughly.

Identify your target audience, outline the content and structure of your site and design a layout that aligns with your goals.

Keep in mind that the visual design can be enhanced with CSS (Cascading Style Sheets), a topic we'll explore later in your web development journey.

Writing HTML Code

Open a text editor, such as Visual Studio Code or Sublime Text, and begin writing HTML code.

Start with the basic structure, including <!DOCTYPE html> , <html> </html> , <head> </head> , and <body> </body> .

Then, populate the body with your content.

Saving as .html

Save your HTML files with a .html extension to indicate that they are web pages. Proper file naming is essential for organizing your project.

Local Testing

To see how your website looks and functions, open your HTML files in a web browser. This local testing phase allows you to fine-tune your design and layout.

Hosting and Publishing

For your website to be accessible on the internet, you'll need web hosting services. Various providers offer hosting, and you'll typically obtain a domain name (for example, www.yourwebsite.com) to point to your hosted site.

How to Start HTML Code?

Starting HTML code is straightforward. Let's go over each step in the following sections.

Text Editor Selection

Choose a text editor that suits your needs. Popular options include Visual Studio Code, Sublime Text, and Atom. These editors offer features like syntax highlighting and autocompletion tailored to web development.

HTML5 Declaration

Initiate your HTML document with <!DOCTYPE html> . This declaration signifies the use of HTML5, the latest HTML standard.

Building the Structure

Inside the <html> </html> tags, create your HTML structure.

The <head> </head> section contains metadata, including the page title, and the <body> </body> section houses the visible content of your web page.

Adding Metadata

Within the <head> </head> section, utilize the <meta> tag to specify the character encoding, ensuring proper rendering.

How Do I Run HTML Code Step by Step?

Executing HTML code is straightforward, thanks to modern web browsers. Here's a step-by-step guide:

Save Your HTML File

Ensure that your HTML file is saved with a .html extension. This signals to your computer that it's an HTML document.

Double-Click to Open

Double-click the HTML file, and your default web browser will automatically open it. Your browser renders the HTML, displaying your web page.

Alternative Browsers

If you prefer a specific web browser, you can right-click the HTML file and choose "Open with" to select your preferred browser.

Inspect and Debug

Modern web browsers come equipped with built-in developer tools that enable you to inspect and debug your HTML, CSS, and JavaScript.

Access these tools by right-clicking on your web page and selecting "Inspect" or by pressing F12 or Ctrl+Shift+I (Windows) or Cmd+Option+I (Mac).

How Do You Write "Hello" in HTML?

Displaying "Hello" on a web page is straightforward. You can use the <h1> tag to create a top-level heading, as demonstrated earlier.

HTML offers multiple ways to present "Hello." For instance:

Or you can use a paragraph tag:

Both options result in "Hello!" being displayed on your web page. The choice depends on the context and your styling preferences.

It's worth noting that HTML has six levels of headings, ranging from <h1> (the highest) to <h6> (the lowest). Headings are used to structure content hierarchically, with <h1> representing the main heading and <h6> representing subheadings.

How to Create an HTML File with an Example?

Creating an HTML file is your gateway to web development. Here's an expanded step-by-step guide:

Choose a Text Editor

Select a text editor that suits your workflow and preferences. Modern editors offer features like syntax highlighting and autocompletion, enhancing your coding experience.

Structure Your HTML

Begin your HTML document with <!DOCTYPE html> , followed by <html> </html> tags to enclose your content. Inside the <head> </head> section, set metadata, such as the page title and character encoding, using the <meta> tag.

Add Content

Within the <body> </body> section, insert your content. Experiment with various HTML tags to format your content, including headings, paragraphs, lists, links, and images.

Save with .html Extension

Save your file with a .html extension. This naming convention ensures that your computer recognizes it as an HTML document.

Preview Locally

Double-click the HTML file to open it in your web browser. This provides an instant preview of your webpage, allowing you to see how it appears to your audience.

Introducing CSS for Styling

While HTML defines the structure of your web page, CSS (Cascading Style Sheets) is used for styling. You can link an external CSS file to your HTML to control the design and layout of your webpage. For example:

This separation of content (HTML) and presentation (CSS) is a fundamental practice in web development.

How Do You Write a Sentence in HTML?

To create a sentence in HTML, you can employ the <p> (paragraph) tag, as mentioned earlier. However, HTML offers flexibility, allowing you to use other inline tags for shorter text snippets. Here's an example:

Alternatively, for shorter text, you can use the <span> tag:

The <p> tag is typically used for paragraphs, while the <span> tag is more versatile and is often used for inline elements within a sentence or paragraph. Choose the tag that suits the context of your content.

Additional HTML Elements to Explore

While we've covered the basics, HTML offers a plethora of elements and attributes for creating rich and interactive web experiences. Here are some additional HTML elements you can explore:

HTML provides elements like <form> , <input> and <button> to create user-friendly forms for collecting data.

You can use <table> , <tr> , <td> and other related tags to structure tabular data.

Embed images, audio, and video using <img> , <audio> , and <video> tags.

Links and Anchors

Create hyperlinks using the <a> tag to connect web pages and external resources.

Use <ul> for unordered lists, <ol> for ordered lists and <li> for list items.

Semantic Tags

HTML5 introduced semantic elements like <header> , <nav> , <section> , <article> and <footer> to enhance the structure and accessibility of web pages.

Further refine your document with meta tags, including those for specifying character encoding, viewport settings, and author information.

In closing, HTML is your gateway to web development. It provides the foundation upon which you can build stunning web experiences and effectively communicate with your audience.

Whether you're embarking on creating a personal blog, launching an e-commerce site, or showcasing your portfolio, HTML forms the foundation of your online presence.

As you progress in web development, remember that HTML is just the beginning of your journey. Complement your HTML skills with CSS for styling and JavaScript for interactivity. This approach empowers you to create dynamic and engaging websites that captivate the attention of your audience.

In your pursuit of web development excellence, embrace the challenges and endless possibilities presented by HTML and the ever-evolving field of web technologies. Stay curious, never stop learning, and remain current with the latest standards and best practices. Connect with me on Twitter .

HI, I am Joan, a frontend developer and technical writer who's deeply passionate about open-source technologies. With several years of experience in the industry, I have been involved in various projects, contributing code, and writing technical documentation to empower developers worldwide. When not coding or writing, I enjoy crocheting, reading and listening to podcasts. If you enjoy reading my tech articles, consider <a href="https://www.buymeacoffee.com/joanayebola">buying me a coffee</a> to help me more contents and projects for developers.

If this article was helpful, share it .

Learn to code for free. freeCodeCamp's open source curriculum has helped more than 40,000 people get jobs as developers. Get started

  • Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers
  • Advertising & Talent Reach devs & technologists worldwide about your product, service or employer brand
  • OverflowAI GenAI features for Teams
  • OverflowAPI Train & fine-tune LLMs
  • Labs The future of collective knowledge sharing
  • About the company Visit the blog

Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Get early access and see previews of new features.

HTML Tags: Presentational vs Structural

I found many different views on many articles on presentation tags, with some people thinking all tags are presentational , but some others do not think so.

For example: in the HTML 5 specification, they do not think <small> is presentational.

In this list of tags - which are all HTML 5 supported - which tag is presentational and which is not?

Who decides which HTML tag is presentational and Which is not - and how do they make that decision? Is it a particularly large group such as the W3C or is it based on groups of web developers, i.e. the web community? Also, between the two, which advice we should follow for deciding which tags are presentational?

If a tag is valid as according to the W3C in accepted doctypes, then what are the pros to not using any xhtml tag from any point of view?

in user/usability/accessibility point of view

if we use more HTML tags then pages without CSS will better.

in developer point of view

if we make use of more available tags in HTML, than we do not need to use <span class=className">

it takes more time to write and it uses more charter space than tags in HTML and CSS both.

For example:

instead of using:

We can use:

it looks cleaner, it is easier to use , it uses less characters - which will reduce the page size - and it is more readable in source. It also does not break the rule of content and presentation separation.

We can also do this:

and whenever we want to change font-weight then we can change css only in both examples.

If a tag is considered valid by w3c in their recognized doctypes, then what are the pros to not using any X/HTML presentational tags which are not directly recognized by either the W3C, or by the HTML specifications?

Can we change any design parameters without changing anything in HTML? Does this fit within the meme of content and presentation separation?

If any HTML tag breaks the rule of separation, then does not the css property Content break as well?

see this article .

Why are the HEIGHT and WIDTH attributes for the IMG element permitted?. does it not break the rule of separation? A good debate on this matter can be found here .

  • semantic-markup

Scott Conover's user avatar

3 Answers 3

W3C decides the semantics of tags. The specification documents of HTML5 gives conditions on the use of the various tags.

To continue with your example, there is nothing wrong with using <b> to bold some text unless:

The text being bolded is a single entity already represented by a tag:

Incorrect: <label for="name"><b>Name:</b></label> Correct: (Use CSS to style the element) label { font-weight: bold; } <label for="name">Name:</label>

The text is being bolded to put added emphasis and weight on a section or words of a block of text.

Incorrect: <p>HTML has been created to <b>semantically</b> represent documents.</p> Correct: (Use <strong> ) <p>HTML has been created to <strong>semantically</strong> represent documents.</p>

The following is an example of proper use of the <b> tag:

Correct: <p>You may <b>logout</b> at any time.</p>

I realize that there doesn't seem to be a lot of difference between the above example and the one using <strong> as the proper example. To simply explain it, the word semantically plays an important role in the sentence and its emphasis is being strengthened by bold font, while logout is simply bolded for presentation purposes.

The following would be an improper usage.

Incorrect: <p><b>Warning:</b> Following the procedure described below may irreparably damage your equipment.</p> Correct: (This is used to add strong emphasis, therefore use <strong> ) <p><strong>Warning:</strong> Following the procedure described below may irreparably damage your equipment.</p>

Using <span class="bold"> is markup-smell and simply shouldn't be allowed. The <span> element is used to apply style on inline elements when a generic presentation tag (ie.: <b> doesn't apply) For example to make some text green:

Incorrect: <p>You will also be happy to know <span class="bold">ACME Corp</span> is a <span class="eco-green">certified green</span> company.</p> Correct: (Explanation below) <p>You will also be happy to know <b>ACME Corp</b> is a <em class="eco-green">certified green</em> company.</p>

The reason here why you would want to use <em> as opposed to <span> for the word green is because the color green here is used to add emphasis on the fact that ACME Corp is a certified green company.

The following would be a good example of the use of a <span> tag:

Correct: <p>You may press <kbd>CTRL+G</hbd> at any time to change your pen color to <span class="pen-green">green</span>.</p>

In this example, the word green is styled in green simply to reflect the color, not to add any emphasis ( <em> ) or strong emphasis ( <strong> ).

Community's user avatar

  • Even using <b> for "(required)" or "ACME Corp" is wrong. It should be something like <span class="required"> and <span class="company"> respectively, which describes what those strings are; they're not "a bold", whatever that is. :-) –  C. K. Young Commented Feb 14, 2010 at 5:58
  • As for "ducks", that's what <dfn> is for. :-) Style it with bold if you prefer, but seriously, I wouldn't use wiki markup as the model of "right markup". –  C. K. Young Commented Feb 14, 2010 at 6:01
  • @Chris Jester-Young: <span> IS NEVER semantic. It is a generic element used when the element represented doesn't fit any other category. While I agree that <span class="required"> would be the proper way to go here, I have to disagree for the company, as it is used once. In the case of a company listing or a particular page where the company has a certain meaning, then <span class="company"> would be the way to go. You are also right about <dfn> , I forgot about that element. Finding another example... –  Andrew Moore Commented Feb 14, 2010 at 6:04
  • @Andrew: <span> itself is not semantic. It's the classes you attach to it that's semantic. The point of <span> and <div> is that they're (supposed to be) free of overloaded presentational assumptions. –  C. K. Young Commented Feb 14, 2010 at 6:07
  • @Chris Jester-Young: correct, but the classes attached to them need to have a meaning related to the data enclosed in them. By using <span class="company"> , you are implying that the company has an importance in the data structure of the document, while in this case it is simply part of the text and not a meaningful entity. –  Andrew Moore Commented Feb 14, 2010 at 6:09

The whole distinction between "presentation" elements versus "structure" element is, in my opinion, a matter of common sense, not something defined by W3C or anyone else. :-P

An element that describes what its content is (as opposed to how it should look) is a structure element. Everything else is, by definition, not structural, and therefore a presentation element.

Now, I'll answer the second part of your post. I understand this is a contentious topic, but I'll speak my mind anyway.

Well-made HTML should not concern itself with how it should look. That's the job of the stylesheet. The reason it should leave it to the stylesheet, is so you can deliver one stylesheet for desktop computers, another one for netbooks, smartphones, "dumbphones" (for lack of a better term), Kindles, and (if you care about accessibility, and you should) screen readers.

By using presentation markup in your HTML, you force a certain "look" across all these different types of media, removing the ability of the designer to choose a look that works best for such devices. This is micromanagement of the worst sort, and designers will hate you for it. :-)

To use your example, instead of using <b> , you should ask yourself what the boldness is supposed to express. If you're trying to express a section title, use one of the header tags ( <h1> through <h6> ). If you're trying to express strong emphasis, use <strong> . You get the idea. Express the what , not the how ; leave the how to the stylesheet designers.

</soapbox>

C. K. Young's user avatar

  • 1 To me, <small> is not semantic (I disagree with the "accepted answer"; fine print can have its own class, and it's not called "small"), but, I understand that reasonable people disagree about this. I would still avoid using <small> . To your first point, I agree that <b> is less evil than <span class="boldText"> . But to whatever extent the class can be amended to specify a "what", even better. –  C. K. Young Commented Feb 14, 2010 at 6:05
  • 1 @Jitendra: <br /> is semantic if the data represented by the parent entity contains a line-break and <br /> is used to represent it. <hr /> is semantic if the data represented by the parent entity contains a section break or a page break and <hr /> is used to represent it (this is debatable). If used purely for display purposes, the tag has no semantic value. I would still classify <hr /> as presentational, but not <br /> –  Andrew Moore Commented Feb 14, 2010 at 6:37
  • 1 @Jitendra: I think both <br> and <hr> have a place in structural markup. (Line breaks are used for flowing poetry a certain way, for example. Think of how one lays out a haiku.) I try to use them very sparingly, though. –  C. K. Young Commented Feb 14, 2010 at 6:45
  • 1 @Jitendra: When looking at document semantics, always look if the data represented by the entity/attribute has a meaning to the data structure of the document or not. Using content: to add quotes around text located in a <q> element doesn't affect data structure (it is a quote after all the " are purely display elements, the quote itself is the data). Using the width and height attributes CAN affect data structure when the width/height of an image has meaning in the data structure. Therefore, it is semantic to use the attributes when it is meaningful to the document... –  Andrew Moore Commented Feb 14, 2010 at 6:48
  • 1 ... the border attribute for example never adds to the data meaning of a document. Same applies to the fgcolor and bgcolor attribute of the <body> element. If width and height attribute has no intrinsic value to the data meaning of the element and is used purely for presentation purposes, you should style it using CSS. –  Andrew Moore Commented Feb 14, 2010 at 6:50

It's not that presentational elements should be avoided, it's that markup should be as semantic as possible. When designing a document structure, default styling should be considered a secondary affect. If an element is used solely for presentation, it's not semantic, no matter what element is used.

The example usage of <b> isn't semantic, because <b> imparts no meaning. <span class="boldtext"> also isn't semantic. As such, their usage is mixing presentation into the structure.

outis's user avatar

Your Answer

Reminder: Answers generated by artificial intelligence tools are not allowed on Stack Overflow. Learn more

Sign up or log in

Post as a guest.

Required, but never shown

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy .

Not the answer you're looking for? Browse other questions tagged css xhtml w3c semantic-markup html or ask your own question .

  • The Overflow Blog
  • Detecting errors in AI-generated code
  • Where developers feel AI coding tools are working—and where they’re missing...
  • Featured on Meta
  • User activation: Learnings and opportunities
  • Preventing unauthorized automated access to the network
  • Announcing the new Staging Ground Reviewer Stats Widget

Hot Network Questions

  • Bridge in a walled garden
  • Load center and main breaker sharing same lugs at service entrance
  • Musicians wearing Headphones
  • What is the point of "what is the point?" argument in re determinism?
  • How to print a Windows relative path from a Windows .lnk file as a Linux relative path?
  • How to Use the Function from @AlainMatthes (https://tex.stackexchange.com/a/58735/278762) with 50 Teeth?
  • Can a floppy disk be wiped securely using the Windows format command with the passes-parameter?
  • How to understand Mary and Joseph fleeing to Egypt in light of Deuteronomy 17:16?
  • Is there an equivalent to the Shadow Weave in Eberron?
  • Possible distinction between operator-valued scalar & vectors functions in QM
  • Why doesn't SpaceX use a normal blast trench like Saturn V?
  • If a professor wants to hire a student themselves, how can they write a letter of recommendation for other universities?
  • I need a temporary hoist and track system to lift a dead chest freezer up through a tight stairwell
  • Should punctuation (comma, period, etc.) be placed before or after the inches symbol when listing heights?
  • Adjective separated from it's noun
  • Is it even possible to build a beacon to announce we exist?
  • How to find extreme points of region from inequalities using wolfram mathematica?
  • Why is China not mentioned in the Fallout TV series despite its significant role in the games' lore?
  • Making sense of NAND latch circuit diagram
  • Tic-tac-toe encode them all
  • How much total energy is available in/on the Earth?
  • Flight qs101 has been only flying butterflies over an airport recently. What is this about?
  • Is p→p a theorem in intuitionistic logic?
  • How do I link a heading containing spaces in Markdown?

html presentation tags

Craig Buckler

5 of the Best Free HTML5 Presentation Systems

Share this article

Google Slides Template

Frequently asked questions (faqs) about html5 presentation systems.

  • it’s quicker to add a few HTML tags than use a WYSIWYG interface
  • you can update a presentation using a basic text editor on any device
  • files can be hosted on the web; you need never lose a PPT again
  • you can easily distribute a presentation without viewing software
  • it’s not PowerPoint and your audience will be amazed by your technical prowess.
  • you require web coding skills
  • positioning, effects and transitions are more limited
  • few systems offer slide notes (it’s a little awkward to show them separately)
  • it’s more difficult to print handouts
  • S5 — A Simple Standards-Based Slide Show System ( download )
  • CSSS — CSS-based SlideShow System ( download )
  • Slides ( download )
  • HTML5Rocks (no direct downloads, but you can copy the source)

What are the key features to look for in an HTML5 presentation system?

When choosing an HTML5 presentation system, consider features such as ease of use, customization options, and compatibility with various devices. The system should have an intuitive interface that allows you to create presentations without any coding knowledge. Customization options are important for personalizing your presentation to match your brand or style. Additionally, the system should be compatible with different devices, including desktops, laptops, tablets, and smartphones, to ensure your audience can view your presentation without any issues.

How does HTML5 improve the presentation experience compared to traditional methods?

HTML5 enhances the presentation experience by offering interactive and dynamic content. Unlike traditional methods, HTML5 allows for the integration of multimedia elements like videos, audio, and animations directly into the presentation. This makes the presentation more engaging and interactive for the audience. Additionally, HTML5 presentations are web-based, meaning they can be accessed from any device with an internet connection, providing convenience and flexibility for both the presenter and the audience.

Are HTML5 presentations compatible with all browsers?

HTML5 presentations are generally compatible with all modern web browsers, including Google Chrome, Mozilla Firefox, Safari, and Microsoft Edge. However, there may be slight variations in how different browsers render HTML5 content. Therefore, it’s always a good idea to test your presentation on multiple browsers to ensure it displays correctly.

Can I use HTML5 presentation systems for professional purposes?

Yes, HTML5 presentation systems are suitable for a variety of professional purposes. They can be used for business presentations, educational lectures, product demonstrations, and more. The ability to incorporate multimedia elements and interactive features makes HTML5 presentations a powerful tool for conveying complex information in an engaging and understandable way.

How can I make my HTML5 presentation accessible to all users?

To make your HTML5 presentation accessible, ensure that all content is readable and navigable for users with different abilities. This includes providing alternative text for images, captions for videos, and using clear and simple language. Additionally, make sure your presentation is responsive, meaning it adjusts to fit different screen sizes and orientations.

Can I convert my existing PowerPoint presentations to HTML5?

Yes, many HTML5 presentation systems offer the ability to import and convert PowerPoint presentations. This allows you to leverage your existing content while benefiting from the enhanced features and capabilities of HTML5.

Do I need to know how to code to use HTML5 presentation systems?

While having some knowledge of HTML5 can be beneficial, many HTML5 presentation systems are designed to be user-friendly and do not require any coding skills. These systems often feature drag-and-drop interfaces and pre-designed templates to help you create professional-looking presentations with ease.

Can I share my HTML5 presentations online?

Yes, one of the major advantages of HTML5 presentations is that they can be easily shared online. You can publish your presentation on your website, share it via email, or even embed it in a blog post or social media update.

Are HTML5 presentations secure?

HTML5 presentations are as secure as any other web content. However, it’s important to follow best practices for web security, such as using secure hosting platforms and regularly updating your software to protect against potential vulnerabilities.

Can I track the performance of my HTML5 presentations?

Yes, many HTML5 presentation systems include analytics features that allow you to track viewer engagement and behavior. This can provide valuable insights into how your audience interacts with your presentation, helping you to improve and refine your content over time.

Craig is a freelance UK web consultant who built his first page for IE2.0 in 1995. Since that time he's been advocating standards, accessibility, and best-practice HTML5 techniques. He's created enterprise specifications, websites and online applications for companies and organisations including the UK Parliament, the European Parliament, the Department of Energy & Climate Change, Microsoft, and more. He's written more than 1,000 articles for SitePoint and you can find him @craigbuckler .

SitePoint Premium

HTML PPT: Meaning, Versions, Tags, Pros, Cons

HTML, or Hypertext Markup Language, is the standard language used to create web pages. It structures content on the web by defining elements like headings, paragraphs, links, images, and more. HTML uses tags, written in angle brackets, to tell a browser how to display content. For example, the <p> tag is used for paragraphs, while the <a> tag creates hyperlinks.

Also See: Web Development PPT

It’s a foundational language for web development and works alongside CSS (for styling) and JavaScript (for interactivity). While basic HTML is simple to learn, mastering it allows for building and organizing complex websites and online applications.

Also See: Bootstrap PPT

Table of Content for HTML PPT

  • What is HTML?
  • Versions of HTML
  • How Does HTML Works
  • Basic HTML Document
  • Difference between HTML4 and 5
  • The Most Used HTML Tags

Free Download Link

Hypertext Markup Language PPT

Related posts:

html presentation tags

Leave a Comment Cancel reply

Save my name, email, and website in this browser for the next time I comment.

HTML Tutorial

Html graphics, html examples, html references, html introduction.

HTML is the standard markup language for creating Web pages.

What is HTML?

  • HTML stands for Hyper Text Markup Language
  • HTML is the standard markup language for creating Web pages
  • HTML describes the structure of a Web page
  • HTML consists of a series of elements
  • 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.

A Simple HTML Document

Example explained.

  • The <!DOCTYPE html> declaration defines that this document is an HTML5 document
  • The <html> element is the root element of an HTML page
  • The <head> element contains meta information about the HTML page
  • The <title> element specifies a title for the HTML page (which is shown in the browser's title bar or in the page's tab)
  • The <body> element defines the document's body, and is a container for all the visible contents, such as headings, paragraphs, images, hyperlinks, tables, lists, etc.
  • The <h1> element defines a large heading
  • The <p> element defines a paragraph

What is an HTML Element?

An HTML element is defined by a start tag, some content, and an end tag:

The HTML element is everything from the start tag to the end tag:

Start tag Element content End tag
<h1> My First Heading </h1>
<p> My first paragraph. </p>
<br>

Note: Some HTML elements have no content (like the <br> element). These elements are called empty elements. Empty elements do not have an end tag!

Advertisement

Web Browsers

The purpose of a web browser (Chrome, Edge, Firefox, Safari) is to read HTML documents and display them correctly.

A browser does not display the HTML tags, but uses them to determine how to display the document:

View in Browser

HTML Page Structure

Below is a visualization of an HTML page structure:

Note: The content inside the <body> section will be displayed in a browser. The content inside the <title> element will be shown in the browser's title bar or in the page's tab.

HTML History

Since the early days of the World Wide Web, there have been many versions of HTML:

Year Version
1989 Tim Berners-Lee invented www
1991 Tim Berners-Lee invented HTML
1993 Dave Raggett drafted HTML+
1995 HTML Working Group defined HTML 2.0
1997 W3C Recommendation: HTML 3.2
1999 W3C Recommendation: HTML 4.01
2000 W3C Recommendation: XHTML 1.0
2008 WHATWG HTML5 First Public Draft
2012
2014
2016 W3C Candidate Recommendation: HTML 5.1
2017
2017

This tutorial follows the latest HTML5 standard.

Video: HTML Introduction

Tutorial on YouTube

COLOR PICKER

colorpicker

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail: [email protected]

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail: [email protected]

Top Tutorials

Top references, top examples, get certified.

IMAGES

  1. Free Download Basic HTML Tags Ppt Presentation Slides

    html presentation tags

  2. PPT

    html presentation tags

  3. presentation tags in html w3schools

    html presentation tags

  4. Working with HTML Presentation Tags

    html presentation tags

  5. PPT

    html presentation tags

  6. SOLUTION: Html tags presentation

    html presentation tags

VIDEO

  1. Live Edit: Reveal-JS The HTML Presentation Framework

  2. Basic HTML Tags

  3. bdo tag in HTML #learnhtml5 #bdotag #htmltutorial #short #viralvideo #trending #shorts

  4. HTML Details Tag Example 🤯🤯🤯 #css

  5. basic HTML tags

  6. H1 Tag in HTML5

COMMENTS

  1. How to Create Beautiful HTML & CSS Presentations with WebSlides

    Getting Started with WebSlides. To get started, first download WebSlides. Then, in the root folder, create a new folder and call it presentation. Inside the newly created presentation folder ...

  2. How to Create Presentation Slides With HTML and CSS

    Recall that presentationArea refers to the element that wraps the whole presentation. By adding the class full-screen to this element, we trigger the CSS that will expand it to take up the whole screen.. Since we're now in full-screen mode, we need to show the icon for reverting back to the small screen by adding the class .show to it. Finally, we update the variable screenStatus to 1.

  3. HTML BASICS Slides Presentation

    HTML / XHTML includes several specialty tags. These are used to describe special purpose text. They have default styling, but of course the styles can be modified with CSS. <quote> The quote tag is intended to display a single line quote: <quote>The weak can never forgive. Forgiveness is the attribute of the strong.</quote> Quote is an inline tag.

  4. HTML Tags

    HTML tags are the basic building blocks of any website. They are used to create web pages in various formats. HTML tags are enclosed in angle brackets < > and typically come in pairs, i.e. an opening tag and a closing tag. The closing tag has same text as the opening tag, but has an additional forward-slash ( / ) character.

  5. How To Create a Slideshow

    W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.

  6. How to Create Presentation Slides with HTML and CSS

    Create the Starter Markup. 3. Make It Pretty. 4. Enable Slide Navigation. Moving the Presentation to the Next and Previous Slides. Code for Showing the Presentation in Full Screen and Small Screen. Hidding Left and Right Icons in First and Last Slides. Updating and Displaying Slide Number.

  7. How to Create a Slideshow with HTML, CSS, and JavaScript

    The first step to changing which slides show is to select the slide wrapper (s) and then its slides. When you select the slides you have to go over each slide and add or remove an active class depending on the slide that you want to show. Then just repeat the process for a certain time interval. Keep it in mind that when you remove an active ...

  8. How To Build A Captivating Presentation Using HTML, CSS, & JavaScript

    Making a Presentation. Copy an existing presentation folder; Change the folder name (which should be located at public/slides) with the name day[num of day] ex(day2) Making a Slide. Making a slide is pretty simple. Just add a HTML section. <section> <!--slide content--> </section> inside the span with the class of "prez-root". Also keep in mind ...

  9. WebSlides: Create Beautiful HTML Presentations

    WebSlides is the easiest way to make HTML presentations. Just choose a demo and customize it in minutes. 120+ slides ready to use. Good karma. WebSlides is a beautiful solution for telling stories. ... HTML and CSS as narrative elements. Work better, faster. Designers, marketers, and journalists can now focus on the content. Simply choose a ...

  10. Create HTML presentations in seconds

    WebSlides = Create stories with Karma. Finally, everything you need to make HTML presentations, landings, and longforms in a beautiful way. Just a basic knowledge of HTML and CSS is required. Designers, marketers, and journalists can now focus on the content. — https://webslides.tv/demos.

  11. HTML: HyperText Markup Language

    HTML (HyperText Markup Language) is the most basic building block of the Web. It defines the meaning and structure of web content. Other technologies besides HTML are generally used to describe a web page's appearance/presentation (CSS) or functionality/behavior (JavaScript). "Hypertext" refers to links that connect web pages to one another ...

  12. The HTML presentation framework

    Create Stunning Presentations on the Web. reveal.js is an open source HTML presentation framework. It's a tool that enables anyone with a web browser to create fully-featured and beautiful presentations for free. Presentations made with reveal.js are built on open web technologies. That means anything you can do on the web, you can do in your ...

  13. HTML Structure and Presentation

    CSS is a presentation language. Its purpose is to provide a web browser with styling instructions for the HTML. CSS can be included directly in the HTML tags, in the head section of the HTML, or in an entirely separate document (CSS style sheet). CSS is a very powerful tool, enabling very complex and unique designs to be made possible.

  14. How to use HTML Elements

    HTML elements like headings, paragraphs, and text formatting tags are essential tools for structuring and presenting content on the web. They provide clarity, hierarchy, and readability to your webpages, making them accessible to both humans and machines.

  15. HTML Structure and Presentation

    HTML Tags. HTML tags are element names enclosed by angle brackets. HTML tags usually come in pairs. The first tag in a pair is the start tag, and the second tag is the end tag. The end tag is written like the start tag, but with a forward slash inserted before the tag name.

  16. An Introduction to HTML for Beginners

    This separation of content (HTML) and presentation (CSS) is a fundamental practice in web development. How Do You Write a Sentence in HTML? To create a sentence in HTML, you can employ the <p> (paragraph) tag, as mentioned earlier. However, HTML offers flexibility, allowing you to use other inline tags for shorter text snippets. Here's an example:

  17. css

    I found many different views on many articles on presentation tags, with some people thinking all tags are presentational, but some others do not think so. For example: in the HTML 5 specification, they do not think <small> is presentational.. In this list of tags - which are all HTML 5 supported - which tag is presentational and which is not?

  18. HTML and CSS Presentation Demo with WebSlides

    21. Console. Assets. Comments. This demo by Ivaylo Gerchev accompanies an article for SitePoint and illustrates how to create an HTML and CSS presentation about SVG using WebSlides. ...

  19. 5.4

    5.4 - Presentation Only Tags. In many cases it is convenient to indicate directly how the text is to be rendered, e.g. as italic, bold, underline or strike-through: These tags may be nested to combine effects, e.g. bold-italic-fixed-pitch text, and should be considered as hints rather than as binding obligations on the browser, e.g. Some <B><I ...

  20. 5 of the Best Free HTML5 Presentation Systems

    Google Slides Template. As you'd expect, Google has their own HTML5 presentation template (as well as the one offered in Google Docs). It's fairly basic when compared to Reveal.js or Impress ...

  21. HTML PPT: Meaning, Versions, Tags, Pros, Cons

    It structures content on the web by defining elements like headings, paragraphs, links, images, and more. HTML uses tags, written in angle brackets, to tell a browser how to display content. For example, the <p> tag is used for paragraphs, while the <a> tag creates hyperlinks.

  22. Introduction to HTML

    HTML stands for Hyper Text Markup Language. HTML is the standard markup language for creating Web pages. HTML describes the structure of a Web page. HTML consists of a series of elements. 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 ...

  23. Check Out This Engaging Introduction to HTML Tutorial Presentation

    Dominated by a cool blue hue, this PowerPoint and Google Slides template incorporates a modern, geometric style that will engage your students. Perfect for web development and coding lessons, this template will transform your presentation into an interactive learning experience. Grab this unique PPT template now and start empowering your ...

  24. Free PPT Slides for HTML Training

    HTML 5 Course. HTML Training (12 Slides) 5091 Views. Unlock a Vast Repository of HTML Training PPT Slides, Meticulously Curated by Our Expert Tutors and Institutes. Download Free and Enhance Your Learning!