HTML
Seoul National University of Science and Technology
Information Technology Management
Lecture slides index
March 10, 2025
Words + images
HTML
CSS
JavaScript
Hyper: over/above/beyond
Text: words and/or alphanumeric characters
Markup: the result of preparing text or indicating the relationship between parts of text before displaying
Language: a system of symbols used to communicate ideas
In other words… HTML defines the meaning and structure of web content(i.e., text, images, etc.)
<!DOCTYPE html>
<html lang="en">
<head>
<title>Web Programming ITM</title>
</head>
<body>
Welcome to Spring Semester!
</body>
</html>
Main HTML tags
<!DOCTYPE html>
tells the browser to interpret our page’s code as HTML5<html>
Represents the root (top-level element) of an HTML document<head>
Contains machine-readable information (metadata) about the document (not rendered)<body>
contains the page’s content<body>
A semantic element clearly describes its meaning to both the browser and the developer
<main>
<body>
<header>
<footer>
<h1>
…<h6>
<h1>
: highest importance, <h2>
: second highest importance etc.Do not confuse this tags
<head>
vs. <header>
vs. <h1>
…<h6>
<ol>
and unordered <ul>
lists<ul>
for an unordered list (typically a bulleted list)<ol>
for an ordered list (typically a numbered list)<li>
tags are used within both unordered AND ordered lists<li>
list item tag. Representative of an item in a list<img>
Inserts a graphical image onto the page (inline)
src
attribute specifies the image URLalt
attribute describing the image, which improves accessibility for users who can’t otherwise see it.Example
<a>
Links, or “anchors”, to other pages (inline)1
Uses the href (Hypertext REFerence) attribute to specify the destination URL Can be absolute (to another web site) or relative (to another page on this site)
Example
Output
Search for it on Google!
Relative: paths are relative to the document linking to the path. - Linked files within the same directory: “filename.png”
Absolute: paths refer to a specific location of a file, including the domain and protocol.
"https://validator.w3.org/"
<table>
Allows web developers to arrange data into rows and columns.
<td>
defines a table cell (table data)<tr>
defines a table row<th>
defines a table header (optional)<thead>
groups the header content in a table<tbody>
groups the body content in a table<form>
It is used to create an HTML form for user input.
<input type="text">
displays a single-line text input field<input type="submit">
Displays a submit button (for submitting the form)<input type="button">
Displays a clickable buttonGive style to our HTML document with CSS
Web Programming