0% found this document useful (0 votes)
15 views14 pages

Unit 1

The document provides an introduction to web development, explaining the roles of clients and servers in web communication, and the HTTP protocol that facilitates their interaction. It details the structure of HTML documents, including essential tags and elements that form the skeleton of a webpage. Additionally, it outlines various HTML elements for content organization, metadata, and text semantics, crucial for creating accessible and well-structured web pages.

Uploaded by

jdpvadher21
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views14 pages

Unit 1

The document provides an introduction to web development, explaining the roles of clients and servers in web communication, and the HTTP protocol that facilitates their interaction. It details the structure of HTML documents, including essential tags and elements that form the skeleton of a webpage. Additionally, it outlines various HTML elements for content organization, metadata, and text semantics, crucial for creating accessible and well-structured web pages.

Uploaded by

jdpvadher21
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Full Stack Development

Unit-1 Introduction to Web


 Introduction to Web:
How the web works provides a high-level description of what happens when you use a web
browser to navigate to a web page, explaining the magic that goes on behind the scenes to
deliver the relevant code to your computer for the browser to assemble into something you can
look at.

 Clients and servers:


Computers connected to the internet are called clients and servers. A simplified diagram of how
they interact might look like this:

o Clients are the typical web user's internet-connected devices (for example, your computer
connected to your Wi-Fi, or your phone connected to your mobile network) and web-
accessing software available on those devices (usually a web browser like Firefox or Chrome).
o Servers are computers that store webpages, sites, or apps. When a client wants to access a
webpage, a copy of the webpage code is downloaded from the server onto the client
machine to render by the browser and displayed to the user.

 Communication Protocol:
Hypertext Transfer Protocol (HTTP) is an application protocol that defines a language for
clients and servers to speak to each other. HTTP is a protocol for fetching resources such as
HTML documents. It is the foundation of any data exchange on the Web and it is a client-server
protocol, which means requests are initiated by the recipient, usually the Web browser. A
complete document is typically constructed from resources such as text content, layout
instructions, images, videos, scripts, and more.
Full Stack Development

Clients and servers communicate by exchanging individual messages (as opposed to a stream of
data). The messages sent by the client are called requests and the messages sent by the server as
an answer are called responses.

When a client wants to communicate with a server, either the final server or an intermediate
proxy, it performs the following steps:

1. Open a TCP connection: The TCP connection is used to send a request, or several, and receive an
answer. The client may open a new connection, reuse an existing connection, or open several
TCP connections to the servers.
2. Send an HTTP message: HTTP messages (before HTTP/2) are human-readable. With HTTP/2,
these simple messages are encapsulated in frames, making them impossible to read directly, but
the principle remains the same. For example:
Full Stack Development

3. Read the response sent by the server, such as:

4. Close or reuse the connection for further requests.


Full Stack Development
 Structure of HTML Documents

An HTML document consists of specific tags that form the skeleton of the page. Here’s a look at
a basic HTML document structure

1. <!DOCTYPE HTML>: The <!DOCTYPE html> declaration is placed at the beginning of the
document. It tells the browser that the document follows HTML5 standards, ensuring
consistent rendering across browsers.
2. <html> Tag: The <html> tag wraps the entire document, serving as the root element of an
HTML page. It typically includes the lang attribute to specify the language of the content.
3. <head> Section: The <head> section contains metadata, scripts, styles, and other information
not displayed directly on the page but essential for functionality and SEO.
4. <body> Section: The <body> section contains all the visible content of the web page,
including text, images, videos, links, and more. This is where you’ll add the main elements to
display on the page.

Anatomy of an HTML element:


Full Stack Development

 Basic Markup tags

1. Main root
Element Description

Represents the root (top-level element) of an HTML document, so it is also


<html> referred to as the root element. All other elements must be descendants of this
element.

2. Document metadata

Metadata contains information about the page. This includes information about styles, scripts and
data to help software use and render the page. Metadata for styles and scripts may be defined in
the page or linked to another file that has the information.
Element Description

Contains machine-readable information (metadata) about the document, like


<head> its title, scripts, and style sheets.

Specifies relationships between the current document and an external resource.


This element is most commonly used to link to CSS but is also used to establish
<link> site icons (both "favicon" style icons and icons for the home screen and apps on
mobile devices) among other things.

Represents metadata that cannot be represented by other HTML meta-related


<meta> elements, like <base>, <link>, <script>, <style> and <title>.
Full Stack Development
Element Description

Contains style information for a document or part of a document. It contains CSS,


<style> which is applied to the contents of the document containing this element.

Defines the document's title that is shown in a browser's title bar or a page's tab. It
<title> only contains text; HTML tags within the element, if any, are also treated as plain
text.

3. Sectioning root

Element Description

Represents the content of an HTML document. There can be only one such
<body> element in a document.

4. Content sectioning

Content sectioning elements allow you to organize the document content into logical pieces. Use
the sectioning elements to create a broad outline for your page content, including header and
footer navigation, and heading elements to identify sections of content.
Element Description

Indicates that the enclosed HTML provides contact information for a person or
<address> people, or for an organization.

Represents a self-contained composition in a document, page, application, or site,


which is intended to be independently distributable or reusable (e.g., in
<article> syndication). Examples include a forum post, a magazine or newspaper article, a
blog entry, a product card, a user-submitted comment, an interactive widget or
gadget, or any other independent item of content.

Represents a portion of a document whose content is only indirectly related to the


<aside> document's main content. Asides are frequently presented as sidebars or call-out
boxes.

Represents a footer for its nearest ancestor sectioning content or sectioning


<footer> root element. A <footer> typically contains information about the author of the
section, copyright data, or links to related documents.

Represents introductory content, typically a group of introductory or navigational


<header> aids. It may contain some heading elements but also a logo, a search form, an
author name, and other elements.

<h1>, <h2>, < Represent six levels of section headings. <h1> is the highest section level
h3>, <h4>, <h and <h6> is the lowest.
Full Stack Development
Element Description

5>, <h6>
Represents a heading grouped with any secondary content, such as subheadings,
<hgroup> an alternative title, or a tagline.

Represents the dominant content of the body of a document. The main content
<main> area consists of content that is directly related to or expands upon the central topic
of a document, or the central functionality of an application.

Represents a section of a page whose purpose is to provide navigation links,


<nav> either within the current document or to other documents. Common examples of
navigation sections are menus, tables of contents, and indexes.

Represents a generic standalone section of a document, which doesn't have a


<section> more specific semantic element to represent it. Sections should always have a
heading, with very few exceptions.

Represents a part that contains a set of form controls or other content related to
<search> performing a search or filtering operation.

5. Text content

Use HTML text content elements to organize blocks or sections of content placed between the
opening <body> and closing </body> tags. Important for accessibility and SEO, these elements
identify the purpose or structure of that content.
Element Description
Indicates that the enclosed text is an extended quotation. Usually, this is rendered
visually by indentation. A URL for the source of the quotation may be given using
<blockquote> the cite attribute, while a text representation of the source can be given using
the <cite> element.

Provides the description, definition, or value for the preceding term (<dt>) in a
<dd> description list (<dl>).

The generic container for flow content. It has no effect on the content or layout until
<div> styled in some way using CSS (e.g., styling is directly applied to it, or some kind of
layout model like flexbox is applied to its parent element).

Represents a description list. The element encloses a list of groups of terms


(specified using the <dt> element) and descriptions (provided by <dd> elements).
<dl> Common uses for this element are to implement a glossary or to display metadata (a
list of key-value pairs).

Specifies a term in a description or definition list, and as such must be used inside
<dt>
a <dl> element. It is usually followed by a <dd> element; however,
Full Stack Development
Element Description
multiple <dt> elements in a row indicate several terms that are all defined by the
immediate next <dd> element.

Represents a caption or legend describing the rest of the contents of its


<figcaption> parent <figure> element.

Represents self-contained content, potentially with an optional caption, which is


<figure> specified using the <figcaption> element. The figure, its caption, and its contents are
referenced as a single unit.

Represents a thematic break between paragraph-level elements: for example, a


<hr> change of scene in a story, or a shift of topic within a section.

Represents an item in a list. It must be contained in a parent element: an ordered list


(<ol>), an unordered list (<ul>), or a menu (<menu>). In menus and unordered lists,
<li> list items are usually displayed using bullet points. In ordered lists, they are usually
displayed with an ascending counter on the left, such as a number or letter.

A semantic alternative to <ul>, but treated by browsers (and exposed through the
<menu> accessibility tree) as no different than <ul>. It represents an unordered list of items
(which are represented by <li> elements).

<ol> Represents an ordered list of items — typically rendered as a numbered list.

Represents a paragraph. Paragraphs are usually represented in visual media as blocks


of text separated from adjacent blocks by blank lines and/or first-line indentation,
<p> but HTML paragraphs can be any structural grouping of related content, such as
images or form fields.

Represents preformatted text which is to be presented exactly as written in the


<pre> HTML file. The text is typically rendered using a non-proportional, or monospaced,
font. Whitespace inside this element is displayed as written.

<ul> Represents an unordered list of items, typically rendered as a bulleted list.

6. Inline text semantics

Use the HTML inline text semantic to define the meaning, structure, or style of a word, line, or
any arbitrary piece of text.
Element Description

Together with its href attribute, creates a hyperlink to web pages, files, email
<a> addresses, locations within the current page, or anything else a URL can address.

<abbr> Represents an abbreviation or acronym.


Full Stack Development
Element Description

Produces a line break in text (carriage-return). It is useful for writing a poem or an


<br> address, where the division of lines is significant.

Used to mark up the title of a cited creative work. The reference may be in an
<cite> abbreviated form according to context-appropriate conventions related to citation
metadata.

Displays its contents styled in a fashion intended to indicate that the text is a short
<code> fragment of computer code. By default, the content text is displayed using the user
agent's default monospace font.

Links a given piece of content with a machine-readable translation. If the content is


<data> time- or date-related, the <time> element must be used.

Used to indicate the term being defined within the context of a definition phrase or
<dfn> sentence. The ancestor <p> element, the <dt>/<dd> pairing, or the nearest section
ancestor of the <dfn> element, is considered to be the definition of the term.

Marks text that has stress emphasis. The <em> element can be nested, with each
<em> nesting level indicating a greater degree of emphasis.

Represents a range of text that is set off from the normal text for some reason, such
as idiomatic text, technical terms, and taxonomical designations, among others.
<i> Historically, these have been presented using italicized type, which is the original
source of the <i> naming of this element.

Represents text which is marked or highlighted for reference or notation purposes


<mark> due to the marked passage's relevance in the enclosing context.

Indicates that the enclosed text is a short inline quotation. Most modern browsers
implement this by surrounding the text in quotation marks. This element is
<q> intended for short quotations that don't require paragraph breaks; for long
quotations use the <blockquote> element.

Used to provide fall-back parentheses for browsers that do not support the display
of ruby annotations using the <ruby> element. One <rp> element should enclose
<rp> each of the opening and closing parentheses that wrap the <rt> element that
contains the annotation's text.

Specifies the ruby text component of a ruby annotation, which is used to provide
<rt> pronunciation, translation, or transliteration information for East Asian typography.
The <rt> element must always be contained within a <ruby> element.

Represents small annotations that are rendered above, below, or next to base text,
<ruby>
usually used for showing the pronunciation of East Asian characters. It can also be
Full Stack Development
Element Description

used for annotating other kinds of text, but this usage is less common.

Renders text with a strikethrough, or a line through it. Use the <s> element to
represent things that are no longer relevant or no longer accurate. However, <s> is
<s> not appropriate when indicating document edits; for that, use
the <del> and <ins> elements, as appropriate.

Used to enclose inline text which represents sample (or quoted) output from a
<samp> computer program. Its contents are typically rendered using the browser's default
monospaced font (such as Courier or Lucida Console).

Represents side-comments and small print, like copyright and legal text,
<small> independent of its styled presentation. By default, it renders text within it one font
size smaller, such as from small to x-small.

A generic inline container for phrasing content, which does not inherently represent
anything. It can be used to group elements for styling purposes (using
the class or id attributes), or because they share attribute values, such as lang. It
<span> should be used only when no other semantic element is appropriate. <span> is very
much like a div element, but div is a block-level element whereas a <span> is
an inline-level element.

Indicates that its contents have strong importance, seriousness, or urgency.


<strong> Browsers typically render the contents in bold type.

Specifies inline text which should be displayed as subscript for solely


<sub> typographical reasons. Subscripts are typically rendered with a lowered baseline
using smaller text.

Specifies inline text which is to be displayed as superscript for solely typographical


<sup> reasons. Superscripts are usually rendered with a raised baseline using smaller text.

Represents a specific period in time. It may include the datetime attribute to


<time> translate dates into machine-readable format, allowing for better search engine
results or custom features such as reminders.

Represents a span of inline text which should be rendered in a way that indicates
<u> that it has a non-textual annotation. This is rendered by default as a single solid
underline but may be altered using CSS.

Represents the name of a variable in a mathematical expression or a programming


<var> context. It's typically presented using an italicized version of the current typeface,
although that behavior is browser-dependent.

<wbr> Represents a word break opportunity—a position within text where the browser
Full Stack Development
Element Description

may optionally break a line, though its line-breaking rules would not otherwise
create a break at that location.

7. Image and multimedia


HTML supports various multimedia resources such as images, audio, and video.
Element Description

Defines an area inside an image map that has predefined clickable areas.
<area> An image map allows geometric areas on an image to be associated
with hyperlink.

Used to embed sound content in documents. It may contain one or more audio
sources, represented using the src attribute or the source element: the browser will
<audio> choose the most suitable one. It can also be the destination for streamed media,
using a MediaStream.

<img> Embeds an image into the document.

<map> Used with <area> elements to define an image map (a clickable link area).

Used as a child of the media elements, audio and video. It lets you specify timed
<track> text tracks (or time-based data), for example to automatically handle subtitles. The
tracks are formatted in WebVTT format (.vtt files)—Web Video Text Tracks.

Embeds a media player which supports video playback into the document. You
<video> can also use <video> for audio content, but the audio element may provide a more
appropriate user experience.

8. Embedded content
In addition to regular multimedia content, HTML can include a variety of other content, even if
it's not always easy to interact with.
Element Description

Embeds external content at the specified point in the document. This content is
<embed> provided by an external application or other source of interactive content such as
a browser plug-in.

Represents a nested browsing context, like <iframe> but with more native privacy
<fencedframe> features built in.

Represents a nested browsing context, embedding another HTML page into the
<iframe> current one.

<object> Represents an external resource, which can be treated as an image, a nested


Full Stack Development
Element Description

browsing context, or a resource to be handled by a plugin.

Contains zero or more <source> elements and one <img> element to offer
<picture> alternative versions of an image for different display/device scenarios.

Specifies multiple media resources for the picture, the audio element, or the video
element. It is a void element, meaning that it has no content and does not have a
<source> closing tag. It is commonly used to offer the same media content in multiple file
formats in order to provide compatibility with a broad range of browsers given
their differing support for image file formats and media file formats.

9. SVG and MathML


You can embed SVG and MathML content directly into HTML documents, using
the <svg> and <math> elements.
Element Description

Container defining a new coordinate system and viewport. It is used as the


<svg> outermost element of SVG documents, but it can also be used to embed an SVG
fragment inside an SVG or HTML document.

The top-level element in MathML. Every valid MathML instance must be wrapped
<math> in it. In addition, you must not nest a second <math> element in another, but you
can have an arbitrary number of other child elements in it.

10. Scripting
To create dynamic content and Web applications, HTML supports the use of scripting languages,
most prominently JavaScript. Certain elements support this capability.
Element Description

Container element to use with either the canvas scripting API or the WebGL
<canvas> API to draw graphics and animations.

Defines a section of HTML to be inserted if a script type on the page is


<noscript> unsupported or if scripting is currently turned off in the browser.

Used to embed executable code or data; this is typically used to embed or refer to
<script> JavaScript code. The <script> element can also be used with other languages,
such as WebGL's GLSL shader programming language and JSON.

11. Table content


The elements here are used to create and handle tabular data.
Element Description

<caption> Specifies the caption (or title) of a table.


Full Stack Development
Element Description

Defines one or more columns in a column group represented by its implicit or explicit
<col> parent <colgroup> element. The <col> element is only valid as a child of
a <colgroup> element that has no span attribute defined.

<colgroup> Defines a group of columns within a table.

Represents tabular data—that is, information presented in a two-dimensional table


<table> comprised of rows and columns of cells containing data.

Encapsulates a set of table rows (<tr> elements), indicating that they comprise the body o
<tbody> table's (main) data.

<td> A child of the <tr> element, it defines a cell of a table that contains data.

Encapsulates a set of table rows (<tr> elements), indicating that they comprise the foot of
<tfoot> table with information about the table's columns. This is usually a summary of the column
e.g., a sum of the given numbers in a column.

A child of the <tr> element, it defines a cell as the header of a group of table cells. The
<th> nature of this group can be explicitly defined by the scope and headers attributes.

Encapsulates a set of table rows (<tr> elements), indicating that they comprise the head o
<thead> table with information about the table's columns. This is usually in the form of column
headers (<th> elements).

Defines a row of cells in a table. The row's cells can then be established using a mix
<tr> of <td> (data cell) and <th> (header cell) elements.

12. Forms
HTML provides several elements that can be used together to create forms that the user can fill
out and submit to the website or application. Further information about this available in
the HTML forms guide.
Element Description
An interactive element activated by a user with a mouse, keyboard, finger, voice
<button> command, or other assistive technology. Once activated, it performs an action, such as
submitting a form or opening a dialog.

Contains a set of <option> elements that represent the permissible or recommended


<datalist> options available to choose from within other controls.

<fieldset> Used to group several controls as well as labels (<label>) within a web form.

Represents a document section containing interactive controls for submitting


<form> information.
Full Stack Development
Element Description
Used to create interactive controls for web-based forms to accept data from the user; a
wide variety of types of input data and control widgets are available, depending on the
<input> device and user agent. The <input> element is one of the most powerful and complex in
all of HTML due to the sheer number of combinations of input types and attributes.

<label> Represents a caption for an item in a user interface.

<legend> Represents a caption for the content of its parent <fieldset>.

<meter> Represents either a scalar value within a known range or a fractional value.

<optgroup> Creates a grouping of options within a <select> element.


Used to define an item contained in a select, an <optgroup>, or a <datalist> element. As
<option> such, <option> can represent menu items in popups and other lists of items in an HTML
document.

Container element into which a site or app can inject the results of a calculation or the
<output> outcome of a user action.

Displays an indicator showing the completion progress of a task, typically displayed as a


<progress> progress bar.

<select> Represents a control that provides a menu of options.

Represents a multi-line plain-text editing control, useful when you want to allow users
<textarea> to enter a sizeable amount of free-form text, for example, a comment on a review or
feedback form.

You might also like