You are on page 1of 8

HTML Notes

HTML Basics Elements:


<!-- This is a Comment -->
Element to Define a comment.

<!DOCTYPE html>
Element to declaration of the version of HTML5.

<html>
Element to Define an HTML document.

<head>
Element Contains metadata/information for the document.

<title>
Element to Define a title for the document.

<body>
Element to Define the document's body.

<meta>
Defines metadata about an HTML document.
This element is used to specify the character set, page description,
keywords, author of the document, and viewport settings.
Example :
● <meta charset="UTF-8">
● <meta name="description" content="type your description">

<link>
Defines the relationship between a document and an external resource.

<script>
Defines a client-side script.
HTML Formatting Tags:

<b> => Bold

<Strong> => Bold ==> Important Text

<I> => Italic

<em> => Emphasized

<mark> => Marked Text Or Highlighted Text

<u> => Line Under The Word

<small> => Smaller Text

<Del> => Deleted Text

<ins> => Inserted Text

<sub> => Subscript

<sup> => Superscript

<h1><h2><h3><h4><h5><h6> => Heading Elements.

<progress> =>
Represents the progress of a task.

<blockquote> =>
Defines a section that is quoted from another source.

<abbr> =>
Defines an abbreviation or an acronym.

<time> =>
Defines a specific time (or datetime).
HTML Anchor Tag:
<a href=" your link "> Clickable Text </a>
Example:
<a href="https://www.google.com/" target="_blank" title="GO To Google">Google</a>
Href: HyperText Reference.
Target = “_blank”: This element uses to open the link text in a new tab.
Title: When you stand on the link text for 1 second; the title which you
typed will appear.

HTML img Tag:


<img src="source of the image" alt="Alternate Text">
Defines an image.

HTML Lists Tags:


<ul> => an unordered list.
<ol> => an ordered list.
Attributes:
reversed : Reverse the ordering.
start : Start From Position.
type : Typing Of Ordering.
<li> => a list item.
<dl> => a description list
<dt> => a term/name in a description list.
<dd> => a description of a term/name in a description list.

HTML Table Tags:


<table> => Defines a table.
<caption> => Defines a table caption.
<th> => Defines a header cell in a table.
<tr> => Defines a row in a table.
<td> => Defines a cell in a table.
<thead> => Groups the header content in a table.
<tbody> => Groups the body content in a table.
<tfoot> => Groups the footer content in a table.
HTML Span & div Tags:
<span> =>
span element is used to determine or focus on a specific word.

<div> =>
tag is used as a container for HTML elements.

<br> =>
Break - if we use this tag with a word or a phrase it will move it to a new
line.

<hr> =>
Horizontal Line - It is used to make a line separating each sentence
from the second.

HTML Entities Tags:


Character entities are used to display reserved characters in
HTML.
HTML Semantic Elements: A semantic element clearly
describes its meaning to both the browser and the developer.
<header>
the element represents a container for introductory content or a set of
navigational links.

<nav>
the element defines a set of navigation links.

<main>
Specifies the main content of a document.

<aside>
the element defines some content aside from the content it is placed in
(like a sidebar).

<section>
the element defines a section in a document.

<article>
theelement specifies independent, self-contained content.

<footer>
the element defines a footer for a document or section.

<figure>
the tag specifies self-contained content, like illustrations, diagrams,
photos, code listings, etc.

<figcaption>
tag defines a caption for a <figure> element.

<details>
Defines additional details that the user can view or hide.

<summary>
Defines a visible heading for a <details> element.
HTML Audio & Video Tags:

<audio>
Defines sound content.
<audio controls autoplay loop muted>
<source src="horse.ogg" type="audio/ogg">
<source src="horse.mp3" type="audio/mpeg">
Your browser does not support the audio tag.
</audio>
Controls: Specifies that audio controls should be displayed.
Autoplay: Specifies that the audio will start playing as soon as it is ready.
Loop: Specifies that the audio will start over again, every time it is finished.
Muted: Specifies that the audio output should be muted.
Type: An attribute used to declaration the mime type of the audio extension.

<video>
the tag is used to embed video content in a document, such as a movie
clip or other video streams.
<track>
we can use this element to put subtitles or descriptions
on the video.
<video width="320" height="240" controls autoplay loop poster=”pic”>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
<track src="my_file_en.vtt" kind="subtitles" srclang="en"
label="English">
</video>
Controls: Specifies that video controls should be displayed.
Autoplay: Specifies that the video will start playing as soon as it is ready.
Loop: Specifies that the video will start over again, every time it is finished.
Muted: Specifies that the video output should be muted.
Type: An attribute used to declaration the mime type of the video extension.
poster: Specifies an image to be shown while the video is downloading, or until the
user hits the play button.
width: Sets the width of the video player.
height: Sets the height of the video player.
kind: Specifies the kind of text track.
srclang: Specifies the language of the track text data.
label: Specifies the title of the text track
HTML Form Tags:
<form>
Defines an HTML form for user input.
<form action="/action_page.php" method="get">
name: Specifies the name of a form.
action: Specifies where to send the form-data when a form is submitted.
method: Specifies the HTTP method to use when sending form-data.
autocomplete: Specifies whether a form should have autocomplete.
<input>
Defines an input control.
<input type="txt" required placeholder="Username" name="user">
required: an input field must be filled out before submitting the form.
placeholder: Specifies a short hint that describes the expected value.
name: Specifies the name of an <input> element.
max-min length: the maximum and a minimum number of characters
allowed.
value: Specifies the value of an <input> element.
autofocus: element should automatically get focus when the page loads.
disabled: element should be disabled.
readonly: an input field is read-only
for: he id of the form element the label should
be bound to.

<label>
Defines a label for an <input> element.

<select>
Defines a drop-down list.

<optgroup>
Defines a group of related options in a
drop-down list.

<option>
Defines an option in a drop-down list.

<textarea>
Defines a multiline input control (text area).
HTML References

HTML Reference

Html Quick

W3schools

Your Html Source

MDN

Author

Hasaan Muhammed Saeed

Facebook Profile

You might also like