0% found this document useful (0 votes)
17 views

Definitions of HTML Tags

Uploaded by

experimentprueba
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Definitions of HTML Tags

Uploaded by

experimentprueba
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Definitions of HTML Tags

HTML: Hyper Text Markup Language, the standard markup language for
Web pages.
HTML5: The latest version of HTML

Required elements for your first web page!

The <!DOCTYPE html> declaration defines that this document is an HTML5 document

This is the first element in your web page.

The <html> element is the root element of an HTML page

This is the second element in your web page. There must be a closing tag like this
</html> at the end of your web page.

The <head> element contains meta information about the HTML page

This is the third element in your web page. There must be a closing tag like this
</head> at the end of the head section of your web 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)

This element goes inside the head section of your web age. There must be a closing
tag like this </title> at the end of the title. The title of the page is what you want to be
shown in the browser’s title bar or in the page’s tab. Here is an example:

<title>My First Web Page</title>

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.

This element goes after the closing tag for the head section. There must be a closing
tag like this </body> at the end of all the contents of your web page.

The <h1> element defines a large heading

This element defines a first level heading. There must be a closing tag like this </h1>
at the end of the heading. Here is an example:

<h1>A First Level Heading</h1>


There are six heading levels defined in HTML. The heading levels usually have
decreasing font sizes, with h1 being the largest and h6 being the smallest. You can
have as many heading tags in your page as you want.

The <p>element defines a paragraph

This element defines a paragraph. There must be a closing tag like this </p> at the
end of the paragraph. Here is an example:

<p>The quick brown fox jumps over the lazy dog.</p>

You can have as many paragraphs of any length in your web page as you want.

The <a> element defines a link

This element is used to create a link to another web page. There must be a closing
tag like this </a> at the end of the link. The page being linked to is specified with the
href attribute. Here is an example:

<a href="https://www.w3schools.com">This is a link</a>

The link's destination is specified in the href attribute. The web page this link
links to is the home page of the website with the URL https://www.w3schools.com.
Notice the URL is enclosed in quotes.

The <img> element defines an image.

This element is used to insert an image into a web page. This element
does not need a closing tag. Key attributes of this element include name
of the source image file (src), alternative text (alt), width, and height.

Here are two examples:

The first example shows the width and height expressed as the number of
pixels. You get this information from your image editor.

<img src="Welcome Aboard.gif" alt="Welcome Aboard!" width="500"


height="257">

The second example shows the width and height expressed as


percentages. This is a good option if the original picture you want to
include is too big and you don’t want to bother creating a smaller version
of it in your image editor.<img src="a day in the life.png" alt="Walking
the dogs" width="50%" height="50%">

The <audio> element defines an audio file.


This element is used to include audio in your web page. The example
below includes the controls attribute which provides player controls for
the user. Key attributes used in the source include the name of the audio
file (src), and the type of audio file (type). The text after the source tag is
displayed if the user’s browser does not support the audio tag.

<audio controls>

<source src="Welcome Aboard!.m4a" type="audio/mpeg">

Your browser does not support the audio element.

</audio>

The <video> element defines an video file.

Key attributes include the width, and height in addition to controls.


Attributes used in the source include the name of the video file (src), and
the type of video file (type). The text after the source tag is displayed if
the user’s browser does not support the audio tag. Here is an example:

<video width="320" height="240" controls>

<source src="mov_bbb.mp4" type="video/mp4">

Your browser does not support the video tag.

</video>

The HTML <iframe> tag specifies an inline frame.

An inline frame is used to embed another document within the current


HTML document. Here is an example copied from a YouTube source.

You can copy the code to include a YouTube video from YouTube by
clicking on the Share button and then the embed option under Share.

<iframe width="560" height="315" title="Lofi music playing from


Youtube" src="https://www.youtube.com/embed/5qap5aO4i9A"
frameborder="0" allow="accelerometer; autoplay; encrypted-media;
gyroscope; picture-in-picture" allowfullscreen></iframe>

You might also like