HTML
Hyper Text Markup Language
HTML
• HTML means Hypertext Markup Language.
• Its basically just a text file with codes that tell the
browser how to display the information. For
example, you can let the browser know that a
certain string of text should be displayed as a
header with bold font, or that the text should be
centered on the page.
• To let the browser know the text file contains
HTML, we use the file extension .html rather than
.doc or .txt or .rtf.
HTML is the standard
HTML stands for Hyper HTML describes the
markup language for
Text Markup Language structure of a Web page
creating Web pages
HTML elements label
HTML elements tell the pieces of content such as
HTML consists of a series
browser how to display "this is a heading", "this
of elements
the content is a paragraph", "this is a
link", etc.
HTML tags are the fundamental
building blocks of web development
used to structure, organize, and format
content on a webpage.
HTML tags They act as instructions or keywords
enclosed within angle brackets (< >)
that tell a web browser exactly how to
interpret and render text, images, links,
or media.
An HTML element typically consists of three distinct parts:
an opening tag, the content, and a closing tag.
Opening Tag (<tagname>): Signals where an element
begins.
Anatomy of Content: The actual text, image, or media being modified.
an HTML
Tag Closing Tag (</tagname>): Signals the end of the element,
identical to the opening tag but with a forward slash (/).
<p>This is a paragraph element.</p>
What are HTML tags?
HTML tags are used to mark-up HTML elements
HTML tags are surrounded by the two characters < and >
The surrounding characters are called angle brackets
HTML tags normally come in pairs like < and >
The first tag in a pair is the start tag, the second tag is the end tag
The text between the start and end tags is the element content
HTML tags are not case sensitive, <b> means the same as <B>
Logical vs. Physical Tags
• Logical tags are designed to describe (to the browser) the enclosed
text's meaning. An example of a logical tag is the <strong>
</strong>tag. By placing text in between these tags you are telling the
browser that the text has some greater importance. By default all
browsers make the text appear bold when in between the <strong>
and </strong> tags.
• Physical tags on the other hand provide specific instructions on how
to display the text they enclose. Examples of physical tags include:
✓<b> : Makes the text bold
✓<big> : Makes the text usually one size bigger than what's around it.
Tag Attributes
Tags can have attributes. Attributes can provide additional information about the HTML
Have elements on your page. The <tag> tells the browser to do something, while the
attribute tells the browser how to do it.
Attributes always come in name/value pairs like this: name="value". Attributes are
Name always added to the start tag of an HTML element and the value is surrounded by
quotes.
With an added border attribute, you can tell the browser that the table should have no
Tell borders: <table border=“0”>
HTML Element
An HTML element is a basic building block of a web page. It tells the
web browser how to display content such as text, images, links, or
tables.
Most HTML elements have an opening tag, content, and a closing tag.
For example, in <p>This is a paragraph.</p>, the <p> and </p> tags
create a paragraph element, and the text between them is the content.
HTML elements help organize and structure a web page.
Types of HTML
Elements:
• Block Elements – These elements start
on a new line and take up the full width
available. They are used to create
sections or blocks of content. Examples:
<h1>, <p>, <div>.
Features:
• Start on a new line.
• Take up the entire width available.
• Can contain other block and inline
elements.
• Inline Elements – These elements do not start on a new line and only
take up as much width as needed. They are used within other
content. Examples: <span>, <a>, <b>.
Features:
• Do not start on a new line.
• Occupy only the required width.
• Usually used within block elements.