HTML Exam Cheat Sheet - B.
Tech CSE (Galgotias)
BASIC STRUCTURE OF HTML PAGE:
<!DOCTYPE html>
<html>
<head>
<title>My Page</title>
</head>
<body>
<h1>Welcome</h1>
<p>This is a paragraph.</p>
</body>
</html>
COMMON TAGS:
<h1> to <h6> : Headings
<p> : Paragraph
<a href="url"> : Link
<img src="image.jpg" alt="desc"> : Image
<ul>, <ol>, <li> : Lists
<table>, <tr>, <td>, <th> : Tables
FORM EXAMPLE:
<form>
Name: <input type="text"><br>
Email: <input type="email"><br>
<input type="submit">
</form>
HTML5 SEMANTIC TAGS:
<header>, <footer>, <article>, <section>, <nav>, <aside>
INLINE VS BLOCK ELEMENTS:
Inline: <a>, <span>, <img>
Block: <div>, <p>, <h1>
DIFFERENCES: HTML vs HTML5
- HTML5 supports audio/video tags.
- HTML5 allows semantic tags.
- HTML5 supports local storage and geolocation.
THEORY LINES TO USE:
- HTML is a markup language for creating webpages.
- Tags are enclosed in angle brackets < >.
- HTML5 introduced semantic structure to content.
QUICK TIP:
Write neat code and close your tags. Use comments like <!-- comment --> to fill space smartly.