HTML_CSS_Explanation_Detailed
HTML_CSS_Explanation_Detailed
Detailed)
What is HTML and HTML5?
HTML stands for HyperText Markup Language. It's not a programming language. It
structures a webpage. HTML5 is the fifth and latest version. It added new features like
video/audio tags, mobile support, and modern elements like <header> and <footer>.
<!DOCTYPE html>
Tells the browser: This page uses HTML5, so follow modern rules.
<html lang="en">
Starts the HTML page. 'lang="en"' means the page is in English.
<head>
This section contains info about the page: metadata, fonts, title, and styles.
<title>JNA Secrets</title>
Sets the name in the browser tab. Used by search engines and bookmarks.
<style>
Starts the CSS section. CSS controls the page's appearance (colors, layout, fonts).
body
Sets font, removes spacing, applies a background image, text color, and dim effect.
*, *::before, *::after
Uses 'box-sizing: border-box' so widths include padding and borders.
.container
Centers content, limits width, and adds side padding.
header
Adds background color and centers the page title.
nav ul li a
Styles menu links. Removes underline, adds color. Changes on hover.
footer
Adds a peach-colored bottom area with centered text.
<body> content
The visible part of the page. Contains header, nav, sections, and footer.
<footer>
Shows a copyright message at the bottom.