In HTML you need to close every <something> with </something>
You should always start with <!Doctype html> to tell the browser that we are using HTML
You continue with <html> to show that everything in that is HTML conetnt
Head of a HTML page is where that information like; the title, the meta tags etc. about the page are
Body of an HTML page is where all the visible stuff is. You can add; titles, paragraphs, imeges, links, buttons, videos etc. to the body of an HTML page
Common tags:
Headers:
Headers are usualy used for titles or subtitles. They are automaticly bold and come in sizes.
Header Sizes & Their Tags:
<h1>
<h2>
<h3>
<h4>
<h5>
<h6>
Paragraphs:
Paragraphs are blocks of text that are automaticly given a size.
To call a paragraph you use the tag: <p>
Hyperlinks:
To add an hyperlink use the code on the right
Href means Hypertext REFerance
You can
anter the <a> with;
href which is the URL of the page
target which can eaither
be _self(opens the link in
the same tab) or _blank(opens
the link in a new tab)
title which is the text that
shows up when you hover over
the link
id which is
allows you to identify
the link when using
javascript or css
To add an imege to your page you use the <img>, should also eneter a src(source) imege to display.
Just like other tags you can set parameters and style.
The code imege by the right is an example to the use of imege tag
Adding Audio & Videos:
To add any audio to you page you use the <audio>, to add an video to your page you use <video>.
One of the parameters you need to add is controls, they are needed for the user to control the audio or the video.
Example: The Nyan Cat Video
Lists:
There are 3 types of lists:
Unordered Lists:
Opened by <ul>
State each elemet by <li>
Elemets have a circle before them
Ordered Lists
Opemed by <ol>
State each elemet by <li>
Each element can be oredered by numbers, roman numerals and letters
Description Lists
Opened by <ul>
State lists elements by <dt>(description term) and <dd>(description description)
Text Formating:
Output:
Input:
Drawing tables
You open a <table> tag
To set table rows you use <tr>(which means Table Row)
While setting values for table row elements you can use <th>(Table Header) or <td>(Table Data). The difference is table headder tag is already bolded and centered while table data tag is left-aligned and normal weight.
Meta Tags:
Meta = Data about data
Meta tags are placed in the head of the page and they are not visible.
You can set information about the page like; which character set you use(japanese, latin, arabic, etc.), the author of the page, description of the page content, or the page width.