Basic HTML Tutorial for Beginners
Basic HTML Tutorial for Beginners
BASIC HTML|Carlos
HTML Tutorial
Research work: 1
HTML TUTORIAL
Introduction to HTML
What does HTML mean? And a first example of this manual.
2
The first tag of the file is <html>. This indicates to the browser that it
It is about an HTML file. To close the file we use </html>. Everything that
it is located between the two tags is the HTML code of the page.
Then we see the <head> tag. What follows until its closing
</head>, it is the header of the document and is not displayed on the screen. Here
we put information such as the page title (<title>My first
web page</title>, keywords for search engines, a
description of the page and other data of the document.
Between the <body> and </body> tags is the body of the document.
y el contenido que se coloque en esta sección es el que veremos en pantalla,
Hello everyone.
Note: observe that all closing tags are different from those of
opening by having '/' before the name.
HTML Tutorial
Basic rules
The tags are enclosed between the signs "<" and ">".
They usually come in pairs <p> and </p>.
The first is for opening and the second is for closing.
The text found between two tags is the content of
element.
The labels are not case sensitive, that is
<b> is the same as <B>.
HTML Tags
The HTML element begins with the opening tag <b> (the tag that gives us
show the text in bold.
The content of that element is: This text is in bold.
The end of the HTML element is with the closing tag </b>.
The HTML element starts with the opening tag <body> (tag that 5
define the body of the document.
The content of that element is: Hello everyone. <b>This text is in
bold
The end of the HTML element is with the closing tag </body>.
Headings
6
They define the size of a title or header.
Paragraphs
Comments
The tag <!-- ... --> is used to insert a comment within the code
that we are writing. It is ignored by the browser at the moment.
to read it. Comments help us better explain the code and are for
great help when we need to edit it.
Note that the exclamation mark is placed only at the beginning of the code.
Line break
Draw a line
The <hr> tag allows us to draw a horizontal line like those that separate
the different sections of this tutorial.
8
HTML Tutorial
HTML allows us to define the display format of the text on the screen.
Very useful when we want to highlight or emphasize a particular text.
Also very used to underline or write subscripts or superscripts.
These are just a few examples of what we can do with these elements.
To do this we use the following labels:
HTML Tutorial
10
Special characters
The names of the entities are composed of the sign (&), then the
name of the entity and at the end (";" - semicolon). The numbers of these
characters are composed of (&), then (#- numeral), the number of the
entity and at the end (';' - semicolon).
Another very common use is to insert accents into the html code through
of the entity numbers
HTML Tutorial
12
HTML Tutorial
Links in HTML
The most important property of the Internet is the ability to connect with each other.
with the others.
13
an image
a video
a sound file
websites (another website)
send an email
For this we must use the <a> tag which comes from the first letter of the
anchor
The example below will open the document in a new browser page.
14
Once the destination is defined, we can create a link to it from the same.
document or from a different one, using a character '#' followed by the
name of the element.
For example:
16
HTML Tutorial
17
Standard attributes
Intrinsic events
HTML Tutorial
Frames in HTML
We divided the page into smaller parts and in each of them we visualize
different documents.
18
What are frames?
This allows certain information to remain visible while other views are
are displaced or replaced.
The <frame> tag defines which document we will place in each frame.
In the example, we divide the screen into a column of 25% and another of 75%.
The first column contains the document '[Link]' and the second
column the document '[Link]'. The <frame> tag should not have
closing label.
HTML Tutorial
20
HTML Tutorial
21
Standard attributes
Intrinsic events
HTML Tutorial
HTML tables
We use them to compose a site or simply as a data table.
Characteristics of tables
23
Note: by not placing the border attribute, the borders are not visible but the
table exists.
Table headers
Cell margins
It is the space that is between the edges of the cell and its content.
We define the margins with the attribute cellpadding.
HTML Tutorial
24
Note: in this example we can see that the attribute cellpadding leaves 20
minimum pixels between words within each cell and the edges of the
same.
25
HTML Tutorial
26
HTML Tutorial
27
HTML Tutorial
28
HTML Tutorial
Lists - Listings
Lists are ideal for menu design.
Ordered.
Disordered.
Of definition.
Ordered Lists
They are those that order the list by placing numbers, letters, or signs in front.
Ordered lists start with the <ol> tag and for each of the
items from it, we use the <li> tag.
Unordered Lists
Definition lists 30
31
HTML Tutorial
HTML forms
Practical guide on how to design HTML forms for your site.
Types of controls:
Buttons
Checkboxes
Radiobuttons (radio buttons)
Menus
Text input
File selection
Hidden controls
Object controls
Inside the <form> tag, there is the action attribute. This gives us
It will specify the document that will handle the completed and submitted form.
We also have the attributemethod. It defines the method for us by
which will send the user's data to the server.
Text
33
Note: in this example we can observe the following:
Radio buttons
They are used when we want the user to choose a single option from among a
series of possibilities.
Checkbox
Allows the user to choose multiple options from all the possibilities.
34
Password
It works the same as text, but the input text is presented through a
serie de asteriscos. Es utilizado generalmente para ingresar contraseñas.
Submit
Reset
35
37
HTML Tutorial
38
HTML Tutorial
39
HTML Tutorial
40
HTML Tutorial
Images in HTML
Images, graphics, and photos bring life and color to web pages.
This label is empty, meaning that we must use it with the src attribute.
It shows the image. The <img> tag does not have a closing tag.
Note: the <img> attribute inserts the image using the src attribute
[Link] located at the address "[Link]/images/"
This text appears when hovering the pointer over the image or in many cases
when the browser, for some reason, does not display the images and in its
place this alternative text inside a box.
43
HTML Tutorial
Wallpapers
It is the background of every webpage.
The value of this attribute is the URL of the image we wish to place.
Examples
Examples
Important!
ADDITIONAL INFORMATION:
The brands or labels
The parts of the label that are enclosed in '[]' are optional. A label
it always goes between "<...>". Optionally, it can have a set of
attributes and values. Some attributes do not have an associated value; these
attributes are often referred to as compact. In case of having a value
associated, the value of the attribute must be in quotes. The content of the
label can be text, or other labels. Some labels have no
content. Normally, all tags must be closed.
All the content of an HTML document is found between the tags
<html>
45
</html>. Each page is further divided into a header (delimited between the
head tags <head> </head>) and body (delimited between the tags
The information included in the header is not
renders when viewing the document. It is considered 'meta information'.
a good practice to include a title within the header of the web page,
using the <title> tag. This will be the title that our web browser
show in your bar. This title is also considered by search engines
Internet, like Google, when it comes to determining what our
page.
Special characters
As in any programming language, there are some characters in HTML that
it has special meaning, such as < and >. Therefore, they cannot
should not be employed directly in the HTML code, but should be used a
equivalent escape sequence. In the following table we show the
most common escape sequences:
HTML Tutorial
46