Вы находитесь на странице: 1из 2

Text Editor: ATOM

> HTML Elements

<strong> is BOLD
<em> is italic
<div> is division
<p> is paragraph
<h1> to <h-n> is heading
<br> without </br> is break, <br> can't be used in side <ul> or <ol> because the
only valid element inside <ul> and <ol> is <li>
<ul> is unordered list, need to add <li> create bullet points.
<ol> is ordered list, need also <li> to create numbers

<img> adds image to page by adding attribute called source src


example <img src="URL" />

attribute alt adds description to image for SEO or visual impaired readers.
example: <img src="URL" alt="description" />

add video by using .


<video src="URL" width="whatever" height="whatever" controls (for play, skip, pause
functions)

then maybe adding video not supported after closing with > to show description if
the page is unable to load.

Letting browser knows it is opening a HTML file by starting the file with
<!DOCTYPE html>

after opening with DOCTYPE, follow by using <html> and </html> to set up html
structure and content.

after <html>, you can add information to the page (that is not visually shown in
the page itself) by adding <head> element which will be similar to body, except
<head> elemet doesn't show on the page itself.

add <title> to add title to the site, it will be visible in the tab of the page. a
title should be under 64 characters.

to add hyperlink and text that represents that hyperlink, use <a> as an anchor
element and including the text of the link inside, then use <a href="URL"> to
reference the path for the link to go.
<a href="https://en.wikipedia.org/wiki/Brown_bear"> Learn More </a>

to open links in a new window or new tab, add attribute target and set a value to
_blank so it leads the link to a blank window.
<a href="https://en.wikipedia.org/wiki/Brown_bear" target="_blank"> Learn More </a>

in the same project folder with many html file, link to local html by using ./
<a href="./localfile.html"> name of file </a>

to open link through clicking on image or video, wrap the image in anchor element
<a> then add target _blank to show the path, then <img and source and alt.
<a href="https://en.wikipedia.org/wiki/Opuntia" target="_blank"><img src="URL"
alt="A red prickly pear fruit"/></a>

in order to link to content on the same page, first you must give that section of
content an id, an id is given when you put it inside the opening tag of the
element: <div id="something"> or <p id="someone">
now to link to that section (or division), use # in the code following:
<a href="#something"> Something </a>

add a comment to html file by using <!-- and -->


purpose is to add comment for reviewing or for fast checking, and also to gray out
part of code that need to be reviewed without having to delete it.
<!-- The following is dumb quote mate -->

Вам также может понравиться