Class Notes (1) - converted
Class Notes (1) - converted
Element
Basic HTML Page
<!DOCTYPE html> tells browser you are using HTML5
</html>
Quick Points
Html tag is parent of head & body tag
Most of html elements have opening & closing tags
with content in between
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
h6 (least important
)
Paragraph Tag
Used to add paragraphs in HTML
relative url
Br Tag
Used to add next line(line breaks) to your page
<br>
Bold, Italic & Underline Tags
Used to highlight text in your page
b Bold </b>
< >
i Italic </i>
< >
<hr>
Subscript & Superscript Tag
Used to display a horizontal ruler, used to separate content
b
<su > b c ipt </sub>
su s r
HO 2
p
<su > superscript </sup>
A +B n
Pre Tag
Used to display text as it is (without ignoring spaces & next line)
<pre> This
is a sample
text.
</ pre>
Level 3
Page Layout Techniques
using Semantic tags for layout
using the Right Tags
<header>
<main>
<footer>
Inside Main Tag
Section Tag For a section on your page
<section>
clickable pic
Revisiting Image Tag
set height
set width
Div Tag
Div is a container used for other HTML elements
Block Element (takes full width)
List : Div Tags
<address> <fieldset> <nav>
<figcaption> <noscript>
<article>
<figure> <ol>
<aside>
<footer> <p>
<blockquote>
<form> <pre>
<canvas>
<h1>-<h6> <section>
<dd>
<header> <table>
<div>
<hr> <tfoot>
<dl>
<li> <ul>
<dt>
<main> <video>
Span Tag
Span is also a container used for other HTML elements
Inline Element (takes width as per size)
<code>
<output>
<em>
<a> <samp>
<i>
<abbr> <script>
<img>
<acronym> <select>
<input>
<b> <small>
<kbd>
<bdo> <span>
<label>
<big> <strong>
<map>
<br> <sub>
<object>
<button> <sup>
<tt>
<cite> <textarea>
<var>
<time>
Level Pro
List in HTML
Lists are used to represent real life list data.
unordered ordered
<u > l <ol>
<li> Apple </li> <li> Apple </li>
<tr>
<th> Name </th>
<th> Roll No </th>
</tr>
<tr>
<td> Shradha </th>
<th> 1664 </th>
</tr>
</table>
Caption in Tables
<caption> Student Data </caption>
Student Data
Name Roll No
Shradha 1664
thead & tbody in Tables
Data
Shradha 1664
Aman 1890
Form in HTML
Forms are used to collect data from the user
Eg- sign up/login/help requests/contact me
<form>
form content
</form>
Action in Form
Action attribute is used to define what action needs to be
performed when a form is submitted
</label>
<label for="id2">
</label>
Class & Id
<div id="id1" class="group1">
</div>
</div>
Checkbox
<label for="id1">
<label for="id2">
</textarea>
Select
<select name="city" id="city">
Attributes
- controls
- height
- width
- loop
- autoplay
All the very best in your future
journey :)
- Aman bhaiya & Shradha didi