Join Regular Classroom : Visit ClassroomTech

HTML – codewindow.in

Related Topics

CSS

Introduction
CSS Page 1
CSS Page 2
CSS Page 3
CSS Page 4

CSS Selectors and the Box Model
CSS Page 5
CSS Page 6
CSS Page 7

CSS Layout and Display Properties
CSS Page 8
CSS Page 9
CSS Page 10
CSS Page 11

CSS Text and Font Properties
CSS Page 12
CSS Page 13
CSS Page 14
CSS Page 15

CSS Backgrounds and Borders
CSS Page 16
CSS Page 17
CSS Page 18
CSS Page 19
CSS Page 20

CSS Colors and Transparency
CSS Page 21
CSS Page 22
CSS Page 23
CSS Page 24

CSS Gradients and Shadows
CSS Page 25
CSS Page 26

CSS Transformations and Animations
CSS Page 27
CSS Page 28
CSS Page 29

CSS Flexbox and Grid Layout
CSS Page 30
CSS Page 31
CSS Page 32

CSS Media Queries and Responsive Design

CSS Page 33
CSS Page 34
CSS Page 35

CSS Transitions and Transforms
CSS Page 36
CSS Page 37
CSS Page 38

CSS Preprocessors (Sass, Less, etc.)
CSS Page 39
CSS Page 40
CSS Page 41

CSS Best Practices and Debugging Techniques.
CSS Page 42
CSS Page 43
CSS Page 44

HTML

<button onclick="window.location.href='https://www.example.com';">Go to Example Website</button>

Using the <a> tag with CSS styling:

<a href="https://www.example.com" class="button">Go to Example Website</a>

<style>
  .button {
    display: inline-block;
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    font-size: 16px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
  }
</style>

In the above example, the link is styled as a button using CSS. The display: inline-block property is used to make the link appear as a block element, while the background-color, color, padding, text-align, text-decoration, font-size, border-radius, border, and cursor properties are used to style the button.

<a href="example.pdf" download>Download Example PDF</a>

In the above example, the href attribute specifies the URL of the file that the link should download, and the download attribute tells the browser to download the file when the link is clicked. The text between the opening and closing <a> tags is the text that will be displayed for the link.

You can also specify a different name for the downloaded file using the download attribute. For example:

<a href="example.pdf" download="myexample.pdf">Download My Example PDF</a>

In the above example, the downloaded file will be named “myexample.pdf” instead of “example.pdf”.

<a href="https://www.example.com" title="Visit Example.com">Example Website</a>

In the above example, the title attribute provides a brief description of the link destination (“Visit Example.com”). When a user hovers over the link, this text will be displayed in a tooltip, giving them more information about the link before they click on it.

<a href="https://www.example.com" rel="nofollow">Example Website</a>

In the above example, the rel attribute is used to specify the relationship between the current page and the linked page. The value of the rel attribute is set to “nofollow”, indicating that search engines should not follow the link when crawling the page.

It’s worth noting that while the nofollow attribute can be used to prevent search engines from following a link, it does not prevent users from clicking on the link and visiting the linked page. The nofollow attribute is primarily intended as a hint to search engines, and its effectiveness can vary depending on the search engine and other factors.

<a href="https://www.example.com" onclick="location.replace(this.href); return false;">Replace current page</a>

In the above example, the href attribute of the link specifies the URL of the new page to be loaded when the link is clicked. The onclick attribute contains JavaScript code that uses the location.replace() method to replace the current page with the new one, and then returns false to prevent the link from behaving like a regular hyperlink (i.e. navigating to the linked page).

It’s worth noting that using JavaScript to replace the current page can be a disruptive user experience, as it can make it difficult for users to navigate back to the previous page. In most cases, it’s better to use regular HTML links that load new pages in a new tab or window, rather than replacing the current page.

      

Popular Category

Topics for You

CSS

Introduction
CSS Page 1
CSS Page 2
CSS Page 3
CSS Page 4

CSS Selectors and the Box Model
CSS Page 5
CSS Page 6
CSS Page 7

CSS Layout and Display Properties
CSS Page 8
CSS Page 9
CSS Page 10
CSS Page 11

CSS Text and Font Properties
CSS Page 12
CSS Page 13
CSS Page 14
CSS Page 15

CSS Backgrounds and Borders
CSS Page 16
CSS Page 17
CSS Page 18
CSS Page 19
CSS Page 20

CSS Colors and Transparency
CSS Page 21
CSS Page 22
CSS Page 23
CSS Page 24

CSS Gradients and Shadows
CSS Page 25
CSS Page 26

CSS Transformations and Animations
CSS Page 27
CSS Page 28
CSS Page 29

CSS Flexbox and Grid Layout
CSS Page 30
CSS Page 31
CSS Page 32

CSS Media Queries and Responsive Design

CSS Page 33
CSS Page 34
CSS Page 35

CSS Transitions and Transforms
CSS Page 36
CSS Page 37
CSS Page 38

CSS Preprocessors (Sass, Less, etc.)
CSS Page 39
CSS Page 40
CSS Page 41

CSS Best Practices and Debugging Techniques.
CSS Page 42
CSS Page 43
CSS Page 44

Go through our study material. Your Job is awaiting.

Recent Posts
Categories