Professional Documents
Culture Documents
WT PPT U1
WT PPT U1
Web Technology
Unit –I Web Essentials and Mark-up language- HTML
► HTML was created by Tim Berners-Lee in 1991. The first-ever version of HTML was
HTML 1.0, but the first standard version was HTML 2.0, published in 1995.
► <!DOCTYPE>: It defines the document type or it instruct the browser about the
version of HTML.
► <html > :This tag informs the browser that it is an HTML document. Text between
html tag describes the web document. It is a container for all other elements of HTML
except <!DOCTYPE>
► <head>: It should be the first element inside the <html> element, which contains the
metadata(information about the document). It must be closed before the body tag opens.
► <title>: As its name suggested, it is used to add the title of that HTML page which
appears at the top of the browser window. It must be placed inside the head tag and
should close immediately. (Optional)
• An HTML file is a text file, so to create an HTML file we can use any text editors.
• Text editors are the programs which allow editing in a written text, hence to create a
web page we need to write our code in some text editor.
• There are various types of text editors available which you can directly download, but
for a beginner, the best text editor is Notepad (Windows) or TextEdit (Mac).
• After learning the basics, you can easily use other professional text editors which
are, Notepad++, Sublime Text, Vim, etc.
► An HTML element is a collection of start and end tags with the content inserted in
between them.
► Syntax:
► <tagname > Contents... </tagname>
► HTML Elements without any content i.e., that do not print anything are called Empty
elements.
► Empty HTML elements do not have an ending tag.
► For instance. <br>, <hr>, etc are HTML empty elements.
► The div tag is known as Division tag. The div tag is used in HTML to make divisions of
content in the web page like (text, images, header, footer, navigation bar, etc).
► Div tag has both open (<div>) and closing (</div>) tag and it is mandatory to close the
tag.
► The Div is the most usable tag in web development because it helps us to separate out
data in the web page and we can create a particular section for particular data or
function in the web pages.
<tr>
<td> Sam </td>
<td> Singh </td>
<td> 1233445 </td>
</tr>
</table>
MET Bhujbal Knowledge City
HTML Lists
► A list is a record of short pieces of related information or used to display the data or any
information on web pages in the ordered or unordered form.
► li tag is used to add list in html.
► ul : unordered list
► ol : ordered list
<h3>Subjects</h3>
<ol>
<li>WT</li>
<li>DBMS</li>
<li>CN</li>
<li>AI</li>
</ol>
► Block Level Elements: A block-level element always starts on a new line and stretches
out to the left and right as far as it can i.e, it occupies the whole horizontal space of its
parent element & the height is equal to the content’s height.
► Inline Elements: An inline element is the opposite of the block-level element. It does
not start on a new line and takes up only the necessary width ie., it only occupies the
space bounded by the tags defining the HTML element, instead of breaking the flow of
the content.
► The iframe in HTML stands for Inline Frame. The ” iframe ” tag defines a rectangular
region within the document in which the browser can display a separate document,
including scrollbars and borders.
► <iframe src="URL" title="description“ height =“200” width =“200”></iframe>
► An HTML form is a section of a document that contains controls such as text fields,
password fields, checkboxes, radio buttons, submit button, menus, etc.
<form> content </form>
► Input element: It is used to create form fields, and to take input from the user.
<form>
Enter your name <br>
<input type="text" name="username">
</form>
► If you will omit the 'name' attribute then the text filed input will not be
submitted to the server.
</form>
► The email field is new in HTML 5. It validates the text for the correct email address.
You must use @ and . in this field.
► <label for ="email"> email Id </label>
<input type ="email" id ="email" name ="email">
► Radio Button Control: The radio button is used to select one option from multiple
options.
► <label for ="gender"> Gender: </label>
<input type ="radio" id ="gender" name= "gender" value ="female" /> female
<input type ="radio" id ="gender" name="gender" value="male"/>male
• HTML5 supports both audio and video while none of them were part of.
• HTML cannot allow JavaScript to run within the web browser, while HTML5 provides
full support for running JavaScript.
• In HTML5, inline mathML and SVG can be used in a text, while in HTML it is not
possible.
• HTML5 supports new types of form controls, such as date and time, email, number,
category, title, Url, search, etc.
• Many elements have been introduced in HTML5. Some of the most important are time,
audio, description, embed, fig, shape, footer, article, canvas, navy, output, section,
source, track, video, etc.
<!DOCTYPE>
<html>
<head>
<Title>External CSS </Title>
<link rel="stylesheet" href="css_sheet.css">
</head>
<body>
<div class="GFG"> Welcome to Web Tech Lecture </div>
<div class="Main"> Today we will read CSS </div>
<div class ="png"> CSS is used to provide style to the website</div>
</body>
</html>
MET Bhujbal Knowledge City
► Priorities of CSS: Inline CSS has the highest priority, then comes Internal/Embedded
followed by External CSS which has the least priority. Multiple style sheets can be
defined on one page.
</body>
<head>
<title>CSS Icon</title>
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awe
some.min.css">
</head
Add this link in head section
► CSS property can be used to style the links in various different ways.
► States of Link:
► There are four states of links given below:
• a:link => This is a normal, unvisited link.
• a:visited => This is a link visited by user at least once
• a:hover => This is a link when mouse hovers over it
• a:active => This is a link that is just clicked.
<!DOCTYPE html>
<html>
<head>
<title>CSS links</title>
<style>
p{
font-size: 25px;
text-align: center; }
</style> </head>
<body>
<p> <a href="https://metbkcengg.ac.in/"> MET BKC</a> </p>
</body>
</html>
MET Bhujbal Knowledge City
► CSS Properties of Links: Some basic CSS properties of links are given below:
• color
• font-family
• text-decoration (to add or remove underline): text-decoration: none (remove underline)
• background-color
• Syntax:
a:link {
color:red;
}
► It controls how CSS is applied to HTML and how conflicts between style declarations
are resolved.
► For example, at some point, you will be working on a project and you will find that the
CSS you thought should be applied to an element is not working.
► Often, the problem is that you create two rules that apply different values of the same
property to the same element.
► Cascade and specificity are mechanisms that control which rule applies when there is
such a conflict.
h1 {
color: blue;
}
<h1 class="main-heading">This is my heading.</h1>
(main heading is applied)
► Some CSS property values set on parent elements are inherited by their child
elements, and some aren’t.
► For example, if you set a color and font-family on an element, every element
inside it will also be styled with that color and font, unless you've directly
applied different color and font values to them.