completes the document and the web page will stop loading at this point.

Here is the above web page file when you open it with your browser.

browser view

As you can see, it is easy to create a web page even if you don’t have a web server. All you need is to create an HTML file and load it with your

How HTML Works

Obviously, most of the pages are not stored on your computer. Instead, they are stored on web servers on the Internet. So when you visit an article or other content on a website, the server sends your browser the .html file that contains the content of that page.

You can view the HTML code of any web page in the Chrome browser by right-clicking anywhere on the page and selecting Show page source.

see page source

This will show you the code behind the web page. You can see that this is an HTML file by the first tag at the top of the file.

html source

However, you will also notice that the source code contains other types of tags that are not HTML tags at all.

Scripts embedded in HTML files

For example, you can see code that calls .php or .js files. These are PHP and JavaScript scripts that allow dynamic web pages that load different content based on user input or the output of other scripts executed on the web server or browser and deliver content in the same HTML file that your browser reads.

other code

Since HTML is a “static” method used to format the content of a web page, web designers need a more dynamic way to modify the content of the page depending on where browsers hover or click. Browsers can read and interpret JavaScript code, changing formatting or other elements of a web page based on user interaction.

For example, this is how menus on a page change color each time you hover over each menu item.

javascript example

The PHP code embedded in the web page allows things like dynamic buttons to work properly. For example, the comments The button at the bottom of the articles that you will see on this site is driven by the PHP code that runs on the server and will deliver the comments posted on each article.

comments button

PHP also allows web administrators to create innovative features like infinite scrolling that keeps loading new articles as you scroll down the main page of the site.

Thanks to modern web-based scripting languages, today’s web pages are no longer just static, which HTML code alone allows.

Other HTML tags

If you are ready to start creating your own HTML files, you should know how to use the most common HTML tags beyond the basic tags described above.

Here are some examples of additional HTML tags you can use when coding your own web pages.

HREF to insert links

To embed a link in your web page, use a href.

Find your iPhone with Hey Siri

This will link the text “Find your iPhone using Hey Siri” to the URL link you included in double quotes after “href =”.

IMG SRC to insert images

You can insert images into a web page using img src.

My profile photo

This will extract the my-picture.jpg image from the web server and display it on the page where you placed this tag, with a width of 150 pixels and a height of 120 pixels.

the alt The setting displays the text “my profile picture” in browsers that cannot display the picture. If you do not include the “style” parameter, the image will display at its original resolution, which may be too large or too small for the area of ​​the page where you are embedding it.

UL and OL to create lists

If you want to use bulleted or numbered lists in your content, there are two tags that allow you to do that.

The following code inserts an unnumbered (bulleted) list:

Use

at the bottom of the list. Place each element in the tags

  • and
  • .

    You can use the same approach for a numbered list using

      which stands for “Ordered List”.


      1. Article 1

      2. Article 2

      3. Article 3

      Inserting tables

      Web designers used large tables to format web pages. But with the advent of Cascading Style Sheets (CSS), this is no longer necessary. Instead, CSS files are stored on the web server and HTML pages call these files to determine how to format things like margins, font sizes and colors, etc.

      However, tables are still useful for displaying things like data. To insert a table, surround the start of the content with

      and end it with
      .

      Circle each line with

      and and each individual column header of and . Each normal cell, circle it with and .



      Last name


      Address


      Phone number




      Ryan dube


      100 Jones Way; Johnson City, Tennessee


      317-555-1212



      This will display a web page as follows:

      example table

      With just these basic elements, you can create static web pages useful for displaying your content on the Internet. All you need if you want to make it public and visible to the world is to sign up for a web hosting account and store your files in your account’s public folder.

      In fact, launching your own website is surprisingly easy, especially if you choose to use a content management platform like WordPress.



      Source link