Web Devlopment
Web Devlopment
WITH
HTML AND CSS
SUBMITTED BY: SHRISTI YADAV
ROLL NO: 2119213
B.TECH (3rd SEM)
TABLE OF CONTENTS
0 INTRODUCTION TO
02
1 INTRODUCTION HTML
0
5 HTML TAGS
CONTINUE……….
0
INTRODUCTION OF CSS 07 ADVANTAGES OF CSS
6
0
8 BASIC SYNTAX 09 CSS ID AND CLASS
1
0 CSS TYPES
11 CSS BOX MODEL
INTRODUCTION
Web Development refers to the building, creating, and maintaining of websites.
It includes aspects such as web design, web publishing, web programming, and
database management. It is the creation of an application that works over the
internet i.e. websites.
- Right click on a webpage and select “View Page Source” to see the HTML
HTML DOCUMENT STRUCTURE
Html used predefined tags and attributes to tell the browser how to display content, means in
which format, style, font size, and images to display. Html is a case insensitive language. Case
insensitive means there is no difference in upper case and lower case ( capital and small letters)
both treated as the same, for r example ‘D’ and ‘d’ both are the same here.
There are generally two types of tags in HTML:
- Paired Tags: These tags come in pairs. That is they have both opening(< >) and closing(</ >)
tags.
- Empty Tags: These tags do not require to be closed.
SYNTAX
An HTML Document is mainly divided into two parts:
- HEAD: This contains the information about the HTML document. For Example, the Title of the
page, version of HTML, Meta Data, etc.
- BODY: This contains everything you want to display on the Web Page.
- Selector: Selector indicates the HTML element you want to style. It could be any tag
like <h1>, <title> etc.
- Declaration Block: The declaration block can contain one or more declarations
separated by a semicolon. For the above example, there are two declarations:
color: yellow;
font-size: 11 px;
CSS ID & CLASS
The id and class Selectors
In addition to setting a style for a HTML element, CSS allows you to specify your own selectors
called "id" and "class".
The id Selector
- The id selector is used to specify a style for a single, unique element.
- The id selector uses the id attribute of the HTML element, and is defined with a "#".
The class Selector
- The class selector is used to specify a style for a group of elements. Unlike the id selector, the
class selector is most often used on several elements.
- This allows you to set a particular style for any HTML elements with the same class.
- The class selector uses the HTML class attribute, and is defined with a "."
CSS TYPES
Cascading Style Sheet(CSS) is used to set the style in web pages that contain HTML elements. It
sets the background color, font-size, font-family, color, … etc property of elements on a web
page.
There are three types of CSS which are given below:
• Inline CSS
• Internal or Embedded CSS
• External CSS
● Inline CSS: Inline CSS contains the CSS property in the body section attached with element
is known as inline CSS. This kind of style is specified within an HTML tag using the style
attribute.
CONTINUE……
● Internal or Embedded CSS: This can be used when a single HTML document must be
styled uniquely. The CSS rule set should be within the HTML file in the head section i.e. the
CSS is embedded within the HTML file.
● External CSS: External CSS contains separate CSS file which contains only style property
with the help of tag attributes (For example class, id, heading, … etc.). CSS property written
in a separate file with .css extension and should be linked to the HTML document
using link tag. This means that for each element, style can be set only once and that will be
applied across web pages.
CSS BOX MODEL
In CSS, the term "box model" is used when talking about design and layout.
The CSS box model is essentially a box that wraps around every HTML element. It consists of:
margins, borders, padding, and the actual content. The image below illustrates the box model:
CONTINUE……
Explanation of the different parts:
- Content - The content of the box, where text and images appear
- Padding - Clears an area around the content. The padding is transparent
- Border - A border that goes around the padding and content
- Margin - Clears an area outside the border. The margin is transparent
EXAMPLE: -
div {
width: 300px;
border: 15px solid green;
padding: 50px;
margin: 20px;
}
THANK YOU!!