Aug 6, 2024
index.html
file (home page).<!DOCTYPE html>
to define the document type.<html>
(start and end tags)<head>
(meta information about the page)
<title>
to name the webpage.<body>
(content displayed to users).<h1>
).<h1>Hello</h1>
).<h1>
to <h6>
for headings of different sizes.<p>
for paragraphs.<br>
for line breaks (self-closing).<hr>
to create horizontal lines (self-closing).<!-- Comment here -->
to add comments that won't display on the webpage.<a>
tags to create hyperlinks:
href
attribute for the URL.target
attribute to open in a new tab with _blank
.<img>
tags to insert images:
src
for the image source.alt
attribute for accessibility.width
and height
attributes.<img>
with <a>
tags.<audio>
tags with controls
, autoplay
, muted
, and loop
attributes.<video>
tags similarly, with nested <source>
tags for backups.<b>
<i>
<sub>
<sup>
<del>
<ins>
<mark>
<ul>
for bullet points.
<li>
.<ol>
for numbered lists.<dl>
with <dt>
for terms and <dd>
for definitions.<table>
with <tr>
for rows, <th>
for headers, and <td>
for data cells.style
attribute within tags to set CSS properties (e.g., background-color
, color
).<head>
section and are self-closing.src
to the URL or file path.<button>
tags to create buttons.<form>
tags.action
, method
, and required
.