Posts

Showing posts from May, 2025

hide and show div tag in JS

**  Setting the display property of an element only changes  how the element is displayed , NOT what kind of element it is. So, an inline element with  display: block;  is not allowed to have other block elements inside it. The  display  property is used to specify how an element is shown on a web page. Every HTML element has a default display value, depending on what type of element it is. The default display value for most elements is  block  or  inline . The   display   property is used to change the default display behavior of HTML elements. display: none;  is commonly used with JavaScript to hide and show elements without deleting and recreating them. visibility:hidden;  also hides an element. However, the element will still take up the same space as before. The element will be hidden, but still affect the layout: Example h1.hidden  {   visibility :  hidden ; }       <!DOCTYPE htm...

Standard URL Syntax

  Standard URL Syntax The Thymeleaf standard dialects –called  Standard  and  SpringStandard – offer a way to easily create URLs in your web applications so that they include any required  URL preparation  artifacts. This is done by means of the so-called  link expressions , a type of  Thymeleaf Standard Expression :  @{...} Absolute URLs Absolute URLs allow you to create links to other servers. They start by specifying a protocol name ( http://  or  https:// ) < a th: href = " @{http://www.thymeleaf/documentation.html} " > They are not modified at all (unless you have an  URL Rewriting  filter configured at your server and performing modifications at the  HttpServletResponse.encodeUrl(...)  method): < a href = " http://www.thymeleaf/documentation.html " > Context-relative URLs The most used type of URLs are  context-relative  ones. These are URLs which are supposed to be relative to the w...