Web Development Articles

Page 343 of 801

Including an external stylesheet file in your HTML document

varma
varma
Updated on 15-Mar-2026 651 Views

The element can be used to include an external style sheet file in your HTML document. An external style sheet is a separate text file with .css extension. You define all the Style rules within this text file and then you can include this file in any HTML document using element. Creating an External CSS File Consider a simple style sheet file with a name new.css having the following rules: h1, h2, h3 { color: #36C; font-weight: normal; letter-spacing: .4em; ...

Read More

What are the essential tags for an HTML Document?

Shakira Thasleem
Shakira Thasleem
Updated on 15-Mar-2026 2K+ Views

HTML (HyperText Markup Language) is the standard markup language for creating web pages and web applications. Understanding the essential HTML tags is crucial for building properly structured documents that browsers can interpret correctly. An HTML tag consists of three components: an opening tag that marks the start, content that displays in the browser, and a closing tag marked with a forward slash like . All HTML tags should be written in lowercase for best practices. Note: Some HTML tags are self-closing and don't require a closing tag, such as and . Every HTML document requires four ...

Read More

How to use the tag to define a relationship to an external resource?

Johar Ali
Johar Ali
Updated on 15-Mar-2026 320 Views

The tag is used in HTML to define a relationship to an external resource. It is most commonly used to link external style sheets to HTML documents. The tag is placed inside the section and is a self-closing tag, meaning it does not require a closing tag. Syntax Key Attributes The tag uses several important attributes: rel - Specifies the relationship between the current document and the linked resource href - Specifies the URL of the external resource type - Specifies the media type of the linked resource ...

Read More

Rules to override Style Sheet Rule in CSS

varun
varun
Updated on 15-Mar-2026 3K+ Views

CSS follows a specific hierarchy when multiple styles are applied to the same element. Understanding the cascade and specificity rules helps you control which styles take precedence. CSS Cascade Priority Order CSS applies styles based on the following priority order, from highest to lowest: Inline styles - Styles applied directly to HTML elements using the style attribute Internal stylesheets - Styles defined within tags in the HTML document External stylesheets - Styles defined in separate CSS files linked to the HTML document Example: Style Override Hierarchy ...

Read More

How to include inline JavaScript inside an HTML page?

Shubham Vora
Shubham Vora
Updated on 15-Mar-2026 9K+ Views

In this tutorial, we will learn how to include inline JavaScript inside an HTML page. Inline JavaScript allows you to write JavaScript code directly within HTML event attributes, making it useful for simple interactions without external script files. Using Inline JavaScript to Show an Alert Message One of the simplest ways to understand inline JavaScript is by using the alert method. The alert method opens a pop-up window containing a message. Inline JavaScript code is written within event attributes and executes when that event is triggered. Syntax // inline JavaScript within the onclick attribute of ...

Read More

How to call a JavaScript function on a click event?

Saurabh Jaiswal
Saurabh Jaiswal
Updated on 15-Mar-2026 25K+ Views

To call a function on click event in JavaScript, you can use either the addEventListener method or the onclick event attribute. The addEventListener method is a general way to attach an event handler to a DOM element, and it allows you to specify the event and the callback function to be called when the event occurs. The onclick attribute is a specific event attribute that allows you to specify a JavaScript function to be called when the element is clicked. Both methods allow you to specify a function to be called when the element is clicked, but the addEventListener ...

Read More

How to integrate Google AdSense into your webpage?

Anjana
Anjana
Updated on 15-Mar-2026 533 Views

If your website has sufficient content and good page views, you can start adding advertisements to earn money. Google AdSense is a free and easy way to monetize your website by displaying targeted ads. Integrating Google AdSense involves both account setup and technical implementation. Let's explore the complete process. Setting Up Your AdSense Account Follow these steps to create and configure your AdSense account: Go to the official AdSense website and sign in with your Google Account. Set up your account with all required details including website ...

Read More

How to add comments in the style sheet blocks

Samual Sam
Samual Sam
Updated on 15-Mar-2026 304 Views

You may need to put additional comments in your stylesheet blocks. Therefore, it is very easy to comment any part of the style sheet. You can simply put your comments inside /*...this is a comment in style sheet...*/. You can use /* ... */ to comment multi-line blocks in a similar way you do in C and C++ programming languages. Syntax /* Single-line comment */ /* Multi-line comment can span multiple lines */ Example: Adding Comments to CSS ...

Read More

How do we upload external file on a website using HTML forms?

radhakrishna
radhakrishna
Updated on 15-Mar-2026 5K+ Views

If you want to allow a user to upload an external file to your website, you need to use a file upload box, also known as a file select box. This is created using the element with the type attribute set to file. HTML File Upload Form Choose file... Browse No file chosen Basic File Upload Example Here's a simple HTML form with a file upload input: File ...

Read More

How to use the submit button in HTML forms?

mkotla
mkotla
Updated on 15-Mar-2026 5K+ Views

Submit button automatically submits a form on click. Using HTML forms, you can easily take user input. The tag is used to get user input, by adding the form elements. Different types of form elements include text input, radio button input, submit button, etc. Let's learn about how to use the submit button in HTML forms. It is created using HTML tag with the type attribute set to "submit". HTML Form with Submit Button ...

Read More
Showing 3421–3430 of 8,010 articles
« Prev 1 341 342 343 344 345 801 Next »
Advertisements