Skip to main content

Posts

Showing posts with the label hyperlink

Let's Create A Very Simple Web Page

Now we have learned the basic HTML elements and attributes. The first assignment from the course is to write a simple web page, which requires to include: Header, text, list, image, and hyperlink. Before we write any code, we need to know how to combine all the elements into an entire HTML page.  According to MDN Web Doc, it states that a HTML page must includes the following elements: <!DOCTYPE html> :  It is the shortest string of characters that counts as a valid doctype. <html></html> : This element wraps all the content on the entire page, and is sometimes known as the root element. <head></head> : This element acts as a container for all the stuff you want to include on the HTML page that  isn't  the content you are showing to your page's viewers. This includes things like keywords and a page description that you want to appear in search results. <meta charset="utf-8"> : This element sets the character set you...

Learn HTML: How to Write Hyperlink Element?

In many websites, we can see a lot of call-to-action such as  click here, know more, buy now, etc.  When users click the "buy now", it will direct to a shopping page.  So, "buy now" is linking to another page web address. How can we add hyperlink on the text? It is simple, all we need to insert attributes inside the element. Attributes Attributes are adding extra information to tags, but they are not showing in the actual content.                  <tag name="value" ></tag> The name="value" part is the attribute. It is inside a tag and includes an attribute name, followed by an "=" sign, and an attribute value. In the example below, <a></a> stands for "anchor" and will make the text into a hyperlink.  And the   href ="https://www.google.com" is a link attribute, which will direct to Google Homepage when someone click on "my favorite website". As we can s...