HTML Notes by Ankit
HTML Notes by Ankit
HTML: Structure/layout
LEVEL 1:
HTML
Hyper Text Markup Language
HTML is the code that is used to structure a web page and its content.
The component used to design the structure of websites are called HTML tags.
HTML Tag:
A container for some content or other HTML tags
<p> This is a paragraph</P>
{ CONTENT }
</head>
<body> contains all data rendered by the browser
</body>
</html>
Quick Points:
Html tag is parent of head & body tag
Most of html elements have opening & closing tags with content in between
Some tags have no content in between, eg - <br>
We can use inspect element/view page source to edit html.
Comments in HTML:
This is part of code that should not be parsed.
<p> = <P>
<head> = <HEAD>
<body> = <BODY>
LEVEL 2:
Basic HTML Tags
HTML Attributes:
Attributes are used to add more information to the tag
<html lang="en">
Heading Tag:
Used to display headings in HTML
h1 (most important)
h2
h3
h4
h5 (least important)
Paragraph Tag:
Used to add paragraphs in HTML
Anchor Tag:
Used to add links to your page
Image Tag:
Used to add images to your page
relative url
Br Tag:
Used to add next line(line breaks) to your page
<br>
Hr Tag:
Used to display a horizontal ruler, used to separate content
<hr>
H2 O
A^n + B
Pre Tag:
Used to display text as it is (without ignoring spaces & next line)
</pre>
LEVEL 3
Page Layout Techniques:
using Semantic tags for layout
<header>
<main>
<footer>
<section>
<article>
<aside>
{clickable pic}
{ set height}
{ set width}
Div Tag:
Div is a container used for other HTML elements
<main> <video>
Span Tag:
Span is also a container used for other HTML elements
<var> <time>
Level Pro:
List in HTML
Unordered ordered
<ul> <ol>
</ul> </ol>
Tables in HTML
Tables are used to represent real life table data.
Tables in HTML
Name Roll No